[PATCH] x86: add an accessor function for getting the per-CPU gdt
Add an accessor function for getting the per-CPU gdt. Callee must already have the CPU. Signed-off-by: Zachary Amsden <zach@vmware.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
72e12b76fe
commit
251e6912df
@@ -108,7 +108,7 @@ static inline unsigned long get_segment_eip(struct pt_regs *regs,
|
||||
desc = (void *)desc + (seg & ~7);
|
||||
} else {
|
||||
/* Must disable preemption while reading the GDT. */
|
||||
desc = (u32 *)&per_cpu(cpu_gdt_table, get_cpu());
|
||||
desc = (u32 *)get_cpu_gdt_table(get_cpu());
|
||||
desc = (void *)desc + (seg & ~7);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user