|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 05 of 36] x86_64: use write_gdt_entry in vsyscall_set
Use write_gdt_entry to generate the special vgetcpu descriptor in the
vsyscall page.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
---
arch/x86/kernel/vsyscall_64.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c
--- a/arch/x86/kernel/vsyscall_64.c
+++ b/arch/x86/kernel/vsyscall_64.c
@@ -250,7 +250,7 @@
doesn't violate that. We'll find out if it does. */
static void __cpuinit vsyscall_set_cpu(int cpu)
{
- unsigned long *d;
+ unsigned long d;
unsigned long node = 0;
#ifdef CONFIG_NUMA
node = cpu_to_node(cpu);
@@ -261,11 +261,11 @@
/* Store cpu number in limit so that it can be loaded quickly
in user space in vgetcpu.
12 bits for the CPU and 8 bits for the node. */
- d = (unsigned long *)(get_cpu_gdt_table(cpu) + GDT_ENTRY_PER_CPU);
- *d = 0x0f40000000000ULL;
- *d |= cpu;
- *d |= (node & 0xf) << 12;
- *d |= (node >> 4) << 48;
+ d = 0x0f40000000000ULL;
+ d |= cpu;
+ d |= (node & 0xf) << 12;
+ d |= (node >> 4) << 48;
+ write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_PER_CPU, &d,
DESCTYPE_S);
}
static void __cpuinit cpu_vsyscall_init(void *arg)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH 02 of 36] x86: add memory clobber to save/loadsegment, (continued)
- [Xen-devel] [PATCH 02 of 36] x86: add memory clobber to save/loadsegment, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 01 of 36] x86: asm-x86/pgtable.h: fix compiler warning, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 04 of 36] x86: remove open-coded save/load segment operations, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 09 of 36] x86_64: Use __pgd() on mk_kernel_pgd(), Jeremy Fitzhardinge
- [Xen-devel] [PATCH 08 of 36] x86_64: Add gate_offset() and gate_segment() macros, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 07 of 36] x86_64: unify early_ioremap, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 06 of 36] x86_64: use p??_populate() to attach pages to pagetable, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 13 of 36] x86_64: add prototype for x86_64_start_kernel(), Jeremy Fitzhardinge
- [Xen-devel] [PATCH 11 of 36] x86: unify mmu_context.h, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 10 of 36] x86: unify pgd_index, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 05 of 36] x86_64: use write_gdt_entry in vsyscall_set_cpu,
Jeremy Fitzhardinge <=
- [Xen-devel] [PATCH 12 of 36] x86_64: replace end_pfn with num_physpages, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 14 of 36] x86_64: add sync_cmpxchg, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 18 of 36] x86/paravirt: add debugging for missing operations, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 15 of 36] x86: simplify vmalloc_sync_all, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 17 of 36] x86: preallocate and prepopulate separately, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 16 of 36] x86/paravirt: add a pgd_alloc/free hooks, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 22 of 36] x86_64: split x86_64_start_kernel, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 21 of 36] x86-64: add FIX_PARAVIRT_BOOTMAP fixmap slot, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 20 of 36] paravirt/x86_64: move __PAGE_OFFSET to leave a space for hypervisor, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 19 of 36] paravirt_ops: define PARA_INDIRECT for indirect asm calls, Jeremy Fitzhardinge
|
|
|
|
|