[PATCH 2/2] x86: Enable named address spaces for percpu data

From: Matthew Wilcox
Date: Wed Sep 12 2018 - 10:44:57 EST


From: Richard Henderson <rth@xxxxxxxxxxx>

For ease of disabling this feature, split the actual enabling into its
own patch.

Signed-off-by: Richard Henderson <rth@xxxxxxxxxxx>
Signed-off-by: Matthew Wilcox <willy@xxxxxxxxxxxxx>
---
arch/x86/include/asm/percpu.h | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h
index 30a08d0d95ee..f3c5eebcbc86 100644
--- a/arch/x86/include/asm/percpu.h
+++ b/arch/x86/include/asm/percpu.h
@@ -5,9 +5,15 @@
#ifdef CONFIG_X86_64
#define __percpu_seg gs
#define __percpu_mov_op movq
+# ifdef __SEG_GS
+# define __percpu_addrspace __seg_gs
+# endif
#else
#define __percpu_seg fs
#define __percpu_mov_op movl
+# ifdef __SEG_FS
+# define __percpu_addrspace __seg_fs
+# endif
#endif

#ifdef __ASSEMBLY__
--
2.18.0