diff options
author | Andi Kleen <ak@suse.de> | 2006-09-26 04:52:37 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 04:52:37 -0400 |
commit | 151f8cc1169f9052095b2be36183ab132d75c6c2 (patch) | |
tree | f3aae7a7e2fc15e88a8471256b2aa43c4850ad0f /arch/x86_64/kernel/smp.c | |
parent | 34464a5b8937b79801776dfb6970c1b949fed4be (diff) |
[PATCH] Remove safe_smp_processor_id()
And replace all users with ordinary smp_processor_id. The function
was originally added to get some basic oops information out even
if the GS register was corrupted. However that didn't
work for some anymore because printk is needed to print the oops
and it uses smp_processor_id() already. Also GS register corruptions
are not particularly common anymore.
This also helps the Xen port which would otherwise need to
do this in a special way because it can't access the local APIC.
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64/kernel/smp.c')
-rw-r--r-- | arch/x86_64/kernel/smp.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c index 2df988bbf312..4f67697f5036 100644 --- a/arch/x86_64/kernel/smp.c +++ b/arch/x86_64/kernel/smp.c | |||
@@ -522,26 +522,3 @@ asmlinkage void smp_call_function_interrupt(void) | |||
522 | } | 522 | } |
523 | } | 523 | } |
524 | 524 | ||
525 | int safe_smp_processor_id(void) | ||
526 | { | ||
527 | unsigned apicid, i; | ||
528 | |||
529 | if (disable_apic || !apic_mapped) | ||
530 | return 0; | ||
531 | |||
532 | apicid = hard_smp_processor_id(); | ||
533 | if (apicid < NR_CPUS && x86_cpu_to_apicid[apicid] == apicid) | ||
534 | return apicid; | ||
535 | |||
536 | for (i = 0; i < NR_CPUS; ++i) { | ||
537 | if (x86_cpu_to_apicid[i] == apicid) | ||
538 | return i; | ||
539 | } | ||
540 | |||
541 | /* No entries in x86_cpu_to_apicid? Either no MPS|ACPI, | ||
542 | * or called too early. Either way, we must be CPU 0. */ | ||
543 | if (x86_cpu_to_apicid[0] == BAD_APICID) | ||
544 | return 0; | ||
545 | |||
546 | return 0; /* Should not happen */ | ||
547 | } | ||