diff options
Diffstat (limited to 'arch/x86/kernel/vsyscall_64.c')
-rw-r--r-- | arch/x86/kernel/vsyscall_64.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c index 61efa2f7d564..c87cbd84c3e5 100644 --- a/arch/x86/kernel/vsyscall_64.c +++ b/arch/x86/kernel/vsyscall_64.c | |||
@@ -249,7 +249,7 @@ static ctl_table kernel_root_table2[] = { | |||
249 | doesn't violate that. We'll find out if it does. */ | 249 | doesn't violate that. We'll find out if it does. */ |
250 | static void __cpuinit vsyscall_set_cpu(int cpu) | 250 | static void __cpuinit vsyscall_set_cpu(int cpu) |
251 | { | 251 | { |
252 | unsigned long *d; | 252 | unsigned long d; |
253 | unsigned long node = 0; | 253 | unsigned long node = 0; |
254 | #ifdef CONFIG_NUMA | 254 | #ifdef CONFIG_NUMA |
255 | node = cpu_to_node(cpu); | 255 | node = cpu_to_node(cpu); |
@@ -260,11 +260,11 @@ static void __cpuinit vsyscall_set_cpu(int cpu) | |||
260 | /* Store cpu number in limit so that it can be loaded quickly | 260 | /* Store cpu number in limit so that it can be loaded quickly |
261 | in user space in vgetcpu. | 261 | in user space in vgetcpu. |
262 | 12 bits for the CPU and 8 bits for the node. */ | 262 | 12 bits for the CPU and 8 bits for the node. */ |
263 | d = (unsigned long *)(get_cpu_gdt_table(cpu) + GDT_ENTRY_PER_CPU); | 263 | d = 0x0f40000000000ULL; |
264 | *d = 0x0f40000000000ULL; | 264 | d |= cpu; |
265 | *d |= cpu; | 265 | d |= (node & 0xf) << 12; |
266 | *d |= (node & 0xf) << 12; | 266 | d |= (node >> 4) << 48; |
267 | *d |= (node >> 4) << 48; | 267 | write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_PER_CPU, &d, DESCTYPE_S); |
268 | } | 268 | } |
269 | 269 | ||
270 | static void __cpuinit cpu_vsyscall_init(void *arg) | 270 | static void __cpuinit cpu_vsyscall_init(void *arg) |