diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2006-12-06 20:14:03 -0500 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-12-06 20:14:03 -0500 |
commit | b2938f880890ebfcccad356275e0000193153623 (patch) | |
tree | f2dcde93e6bd449369e4d305f081e9c12af99948 /arch/i386/kernel/entry.S | |
parent | 49d26b6eaa8e970c8cf6e299e6ccba2474191bf5 (diff) |
[PATCH] i386: Implement smp_processor_id() with the PDA
Use the cpu_number in the PDA to implement raw_smp_processor_id. This is a
little simpler than using thread_info, though the cpu field in thread_info
cannot be removed since it is used for things other than getting the current
CPU in common code.
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Chuck Ebbert <76306.1226@compuserve.com>
Cc: Zachary Amsden <zach@vmware.com>
Cc: Jan Beulich <jbeulich@novell.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'arch/i386/kernel/entry.S')
-rw-r--r-- | arch/i386/kernel/entry.S | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index b99d4a160078..d7423efaeea4 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S | |||
@@ -524,8 +524,7 @@ syscall_badsys: | |||
524 | 524 | ||
525 | #define FIXUP_ESPFIX_STACK \ | 525 | #define FIXUP_ESPFIX_STACK \ |
526 | /* since we are on a wrong stack, we cant make it a C code :( */ \ | 526 | /* since we are on a wrong stack, we cant make it a C code :( */ \ |
527 | GET_THREAD_INFO(%ebp); \ | 527 | movl %gs:PDA_cpu, %ebx; \ |
528 | movl TI_cpu(%ebp), %ebx; \ | ||
529 | PER_CPU(cpu_gdt_descr, %ebx); \ | 528 | PER_CPU(cpu_gdt_descr, %ebx); \ |
530 | movl GDS_address(%ebx), %ebx; \ | 529 | movl GDS_address(%ebx), %ebx; \ |
531 | GET_DESC_BASE(GDT_ENTRY_ESPFIX_SS, %ebx, %eax, %ax, %al, %ah); \ | 530 | GET_DESC_BASE(GDT_ENTRY_ESPFIX_SS, %ebx, %eax, %ax, %al, %ah); \ |