public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* clean up TLB_FLUSH_ALL definition?
@ 2012-05-10  2:23 Alex Shi
  0 siblings, 0 replies; only message in thread
From: Alex Shi @ 2012-05-10  2:23 UTC (permalink / raw)
  To: Thomas Gleixner, H. Peter Anvin, Ingo Molnar,
	linux-kernel@vger.kernel.org


why we need the different definition for TLB_FLUSH_ALL in 32 or 64 bits mode in commit d291cf83639? 


 #ifdef CONFIG_X86_32
-# include "tlbflush_32.h"
+# define TLB_FLUSH_ALL 0xffffffff
 #else
-# include "tlbflush_64.h"
+# define TLB_FLUSH_ALL -1ULL
+#endif

If it's possible to unify it as following?

#define TLB_FLUSH_ALL -1UL 

-----------------

>From 928db8019f7f66470a6a6188f870ec9a6f108a8c Mon Sep 17 00:00:00 2001
From: Alex Shi <alex.shi@intel.com>
Date: Thu, 10 May 2012 18:01:59 +0800
Subject: [PATCH] x86/tlb: clean up and unify TLB_FLUSH_ALL definition

Since sizeof(long) is 4 in x86_32 mode, and it's 8 in x86_64 mode,
sizeof(long long) is also 8 byte in x86_64 mode.
use long mode can fit TLB_FLUSH_ALL defination here both in 32 or
64 bits mode.

Signed-off-by: Alex Shi <alex.shi@intel.com>
---
 arch/x86/include/asm/tlbflush.h |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index c0e108e..7e8a096 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -62,11 +62,7 @@ static inline void __flush_tlb_one(unsigned long addr)
 		__flush_tlb();
 }
 
-#ifdef CONFIG_X86_32
-# define TLB_FLUSH_ALL	0xffffffff
-#else
-# define TLB_FLUSH_ALL	-1ULL
-#endif
+#define TLB_FLUSH_ALL	-1UL
 
 /*
  * TLB flushing:
-- 
1.7.0.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-10  2:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-10  2:23 clean up TLB_FLUSH_ALL definition? Alex Shi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox