From 659a06d967b53853d4d27273928c2dd7d9082214 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Mon, 12 Sep 2005 18:49:24 +0200 Subject: [PATCH] --- yaml --- r: 8575 b: refs/heads/master c: 70556463487f33bc6728a7596b97f86b811aad22 h: refs/heads/master i: 8573: 44495707844018ea702a192b1c62ab48531de18d 8571: 814142b3516332233ec9fece07d35bc9b6fdbdde 8567: 8985cbf7bf6120a1565bf6ffc0f12a3699033afc 8559: 4dc1b6d669047ee43f63ea10e634425b0a85de82 8543: 2d1981a80b9ce3073d55ee9706566e8e69529c4a 8511: d2fe88e71b1de6033a3ca26b36419cbd5bf1bddd 8447: f1e3c5bc151647eb3a5e0720d35a63195bfe7665 v: v3 --- [refs] | 2 +- trunk/arch/x86_64/kernel/genapic.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 4fd707bff791..5f5134edbe1b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5a40b7c2abdedcf53c9a6ee790991acfcef5b6c7 +refs/heads/master: 70556463487f33bc6728a7596b97f86b811aad22 diff --git a/trunk/arch/x86_64/kernel/genapic.c b/trunk/arch/x86_64/kernel/genapic.c index b1c144f73149..f3159a496e39 100644 --- a/trunk/arch/x86_64/kernel/genapic.c +++ b/trunk/arch/x86_64/kernel/genapic.c @@ -45,7 +45,7 @@ void __init clustered_apic_check(void) u8 clusters, max_cluster; u8 id; u8 cluster_cnt[NUM_APIC_CLUSTERS]; - int num_cpus = 0; + int max_apic = 0; #if defined(CONFIG_ACPI) /* @@ -64,7 +64,8 @@ void __init clustered_apic_check(void) id = bios_cpu_apicid[i]; if (id == BAD_APICID) continue; - num_cpus++; + if (id > max_apic) + max_apic = id; cluster_cnt[APIC_CLUSTERID(id)]++; } @@ -79,7 +80,7 @@ void __init clustered_apic_check(void) we have ACPI platform support for CPU hotplug we should detect hotplug capablity from ACPI tables and only do this when really needed. -AK */ - if (num_cpus <= 8) + if (max_apic <= 8) genapic = &apic_flat; #endif goto print;