summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/genapic_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/genapic_64.c')
-rw-r--r--arch/x86/kernel/genapic_64.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/genapic_64.c b/arch/x86/kernel/genapic_64.c
index 9546ef408b9..cbaaf69bedb 100644
--- a/arch/x86/kernel/genapic_64.c
+++ b/arch/x86/kernel/genapic_64.c
@@ -51,7 +51,7 @@ void __init setup_apic_routing(void)
else
#endif
- if (cpus_weight(cpu_possible_map) <= 8)
+ if (num_possible_cpus() <= 8)
genapic = &apic_flat;
else
genapic = &apic_physflat;
@@ -83,7 +83,7 @@ unsigned int read_apic_id(void)
{
unsigned int id;
- WARN_ON(preemptible());
+ WARN_ON(preemptible() && num_online_cpus() > 1);
id = apic_read(APIC_ID);
if (uv_system_type >= UV_X2APIC)
id |= __get_cpu_var(x2apic_extra_bits);