[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    sparc: use symbolic names for tsb indexing
From:       "Linux Kernel Mailing List" <linux-kernel () vger ! kernel ! org>
Date:       2017-01-30 23:49:34
Message-ID: 20170130234934.96107660BDA () gitolite ! kernel ! org
[Download RAW message or body]

Web:        https://git.kernel.org/torvalds/c/4bbc84ffd137fe43d68aa633d317b0a96de8a828
Commit:     4bbc84ffd137fe43d68aa633d317b0a96de8a828
Parent:     ba6d973f78eb62ffebb32f6ef3334fc9a3b33d22
Refname:    refs/heads/master
Author:     Mike Kravetz <mike.kravetz@oracle.com>
AuthorDate: Mon Dec 19 19:17:08 2016 -0800
Committer:  David S. Miller <davem@davemloft.net>
CommitDate: Tue Dec 27 10:56:55 2016 -0800

    sparc: use symbolic names for tsb indexing
    
    Use symbolic names MM_TSB_BASE and MM_TSB_HUGE instead of numeric values
    0 and 1 in __tsb_context_switch.  Code cleanup only, no functional change.
    
    Suggested-by: Sam Ravnborg <sam@ravnborg.org>
    Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
    Acked-by: Sam Ravnborg <sam@ravnborg.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
---
 arch/sparc/include/asm/mmu_context_64.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/sparc/include/asm/mmu_context_64.h b/arch/sparc/include/asm/mmu_context_64.h
index b84be67..d031799 100644
--- a/arch/sparc/include/asm/mmu_context_64.h
+++ b/arch/sparc/include/asm/mmu_context_64.h
@@ -35,15 +35,15 @@ void __tsb_context_switch(unsigned long pgd_pa,
 static inline void tsb_context_switch(struct mm_struct *mm)
 {
 	__tsb_context_switch(__pa(mm->pgd),
-			     &mm->context.tsb_block[0],
+			     &mm->context.tsb_block[MM_TSB_BASE],
 #if defined(CONFIG_HUGETLB_PAGE) || defined(CONFIG_TRANSPARENT_HUGEPAGE)
-			     (mm->context.tsb_block[1].tsb ?
-			      &mm->context.tsb_block[1] :
+			     (mm->context.tsb_block[MM_TSB_HUGE].tsb ?
+			      &mm->context.tsb_block[MM_TSB_HUGE] :
 			      NULL)
 #else
 			     NULL
 #endif
-			     , __pa(&mm->context.tsb_descr[0]));
+			     , __pa(&mm->context.tsb_descr[MM_TSB_BASE]));
 }
 
 void tsb_grow(struct mm_struct *mm,
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic