aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJann Horn <[email protected]>2019-03-29 00:09:39 +0100
committerBorislav Petkov <[email protected]>2019-03-29 14:55:31 +0100
commita72a19327b92e09dab0eb9fd2bc83466465cbffb (patch)
tree50852cb46b83716fb73875e09e6d5effb4ba0911
parent766460852cfaeca4042e5f3aeb9616b3689147bc (diff)
x86/mm/tlb: Define LOADED_MM_SWITCHING with pointer-sized number
sparse complains that LOADED_MM_SWITCHING's definition casts an int to a pointer: arch/x86/mm/tlb.c:409:17: warning: non size-preserving integer to pointer cast Use a pointer-sized integer constant instead. Signed-off-by: Jann Horn <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Mukesh Ojha <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Dave Hansen <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Sai Praneeth <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: x86-ml <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
-rw-r--r--arch/x86/include/asm/tlbflush.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index f4204bf377fc..90926e8dd1f8 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -167,7 +167,7 @@ struct tlb_state {
*/
struct mm_struct *loaded_mm;
-#define LOADED_MM_SWITCHING ((struct mm_struct *)1)
+#define LOADED_MM_SWITCHING ((struct mm_struct *)1UL)
/* Last user mm for optimizing IBPB */
union {