diff mbox

sparc: use symbolic names for tsb indexing

Message ID 1482203828-22017-1-git-send-email-mike.kravetz@oracle.com
State Accepted
Delegated to: David Miller
Headers show

Commit Message

Mike Kravetz Dec. 20, 2016, 3:17 a.m. UTC
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>
---
 arch/sparc/include/asm/mmu_context_64.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Sam Ravnborg Dec. 20, 2016, 11:22 a.m. UTC | #1
On Mon, Dec 19, 2016 at 07:17:08PM -0800, Mike Kravetz wrote:
> 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>

	Sam
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Dec. 27, 2016, 6:57 p.m. UTC | #2
From: Mike Kravetz <mike.kravetz@oracle.com>
Date: Mon, 19 Dec 2016 19:17:08 -0800

> 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>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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,