linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sparc: use symbolic names for tsb indexing
@ 2016-12-20  3:17 Mike Kravetz
  2016-12-20 11:22 ` Sam Ravnborg
  2016-12-27 18:57 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Mike Kravetz @ 2016-12-20  3:17 UTC (permalink / raw)
  To: sparclinux, linux-kernel; +Cc: David S . Miller, Sam Ravnborg, Mike Kravetz

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

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] sparc: use symbolic names for tsb indexing
  2016-12-20  3:17 [PATCH] sparc: use symbolic names for tsb indexing Mike Kravetz
@ 2016-12-20 11:22 ` Sam Ravnborg
  2016-12-27 18:57 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2016-12-20 11:22 UTC (permalink / raw)
  To: Mike Kravetz; +Cc: sparclinux, linux-kernel, David S . Miller

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sparc: use symbolic names for tsb indexing
  2016-12-20  3:17 [PATCH] sparc: use symbolic names for tsb indexing Mike Kravetz
  2016-12-20 11:22 ` Sam Ravnborg
@ 2016-12-27 18:57 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-12-27 18:57 UTC (permalink / raw)
  To: mike.kravetz; +Cc: sparclinux, linux-kernel, sam

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-27 18:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-20  3:17 [PATCH] sparc: use symbolic names for tsb indexing Mike Kravetz
2016-12-20 11:22 ` Sam Ravnborg
2016-12-27 18:57 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).