diff options
author | Richard Braun <rbraun@sceen.net> | 2014-09-05 23:15:53 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2014-09-05 23:15:53 +0200 |
commit | e660f1900912a5a446e51f2ab095dd46ab123802 (patch) | |
tree | a0d53d986e0c1daf664ea221b6ad83f34c4ec58a /arch/x86/machine/cpu.c | |
parent | eed59b8076e7668b5e0f874bd3ed28230f470bb1 (diff) |
kern/percpu: fix setup of BSP percpu area
Relocating percpu data is actually tricky, for the same reason relocating
memory in general is. There may be pointers to such variables which then
become invalid. Instead, keep using the percpu section as the percpu area
for the BSP and store the content of the percpu section in dedicated
kernel virtual memory. In addition, remove the notification kludge from
the x86 cpu module.
Diffstat (limited to 'arch/x86/machine/cpu.c')
-rw-r--r-- | arch/x86/machine/cpu.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/arch/x86/machine/cpu.c b/arch/x86/machine/cpu.c index 0f36252..7e729d7 100644 --- a/arch/x86/machine/cpu.c +++ b/arch/x86/machine/cpu.c @@ -495,31 +495,6 @@ cpu_info(const struct cpu *cpu) } void __init -cpu_fixup_bsp_percpu_area(void) -{ - struct cpu_pseudo_desc gdtr; - struct cpu *cpu; - void *pcpu_area; - - /* - * It's important to use the percpu interface here, and not the cpu_local - * accessors : this function updates the GDTR (and the GDT on i386), as a - * result it must reference the future version of the GDT from the newly - * allocated percpu area. - */ - cpu = percpu_ptr(cpu_desc, 0); - pcpu_area = percpu_area(0); - -#ifndef __LP64__ - cpu_seg_set_data(cpu->gdt, CPU_GDT_SEL_PERCPU, (unsigned long)pcpu_area); -#endif /* __LP64__ */ - - cpu_init_gdtr(&gdtr, cpu); - cpu_load_gdt(&gdtr); - cpu_set_percpu_area(cpu, pcpu_area); -} - -void __init cpu_mp_register_lapic(unsigned int apic_id, int is_bsp) { struct cpu *cpu; |