|
|
@@ -2451,51 +2451,6 @@ static void apic_pm_activate(void) { }
|
|
|
|
|
|
#ifdef CONFIG_X86_64
|
|
|
|
|
|
-static int apic_cluster_num(void)
|
|
|
-{
|
|
|
- int i, clusters, zeros;
|
|
|
- unsigned id;
|
|
|
- u16 *bios_cpu_apicid;
|
|
|
- DECLARE_BITMAP(clustermap, NUM_APIC_CLUSTERS);
|
|
|
-
|
|
|
- bios_cpu_apicid = early_per_cpu_ptr(x86_bios_cpu_apicid);
|
|
|
- bitmap_zero(clustermap, NUM_APIC_CLUSTERS);
|
|
|
-
|
|
|
- for (i = 0; i < nr_cpu_ids; i++) {
|
|
|
- /* are we being called early in kernel startup? */
|
|
|
- if (bios_cpu_apicid) {
|
|
|
- id = bios_cpu_apicid[i];
|
|
|
- } else if (i < nr_cpu_ids) {
|
|
|
- if (cpu_present(i))
|
|
|
- id = per_cpu(x86_bios_cpu_apicid, i);
|
|
|
- else
|
|
|
- continue;
|
|
|
- } else
|
|
|
- break;
|
|
|
-
|
|
|
- if (id != BAD_APICID)
|
|
|
- __set_bit(APIC_CLUSTERID(id), clustermap);
|
|
|
- }
|
|
|
-
|
|
|
- /* Problem: Partially populated chassis may not have CPUs in some of
|
|
|
- * the APIC clusters they have been allocated. Only present CPUs have
|
|
|
- * x86_bios_cpu_apicid entries, thus causing zeroes in the bitmap.
|
|
|
- * Since clusters are allocated sequentially, count zeros only if
|
|
|
- * they are bounded by ones.
|
|
|
- */
|
|
|
- clusters = 0;
|
|
|
- zeros = 0;
|
|
|
- for (i = 0; i < NUM_APIC_CLUSTERS; i++) {
|
|
|
- if (test_bit(i, clustermap)) {
|
|
|
- clusters += 1 + zeros;
|
|
|
- zeros = 0;
|
|
|
- } else
|
|
|
- ++zeros;
|
|
|
- }
|
|
|
-
|
|
|
- return clusters;
|
|
|
-}
|
|
|
-
|
|
|
static int multi_checked;
|
|
|
static int multi;
|
|
|
|
|
|
@@ -2540,20 +2495,7 @@ static void dmi_check_multi(void)
|
|
|
int apic_is_clustered_box(void)
|
|
|
{
|
|
|
dmi_check_multi();
|
|
|
- if (multi)
|
|
|
- return 1;
|
|
|
-
|
|
|
- if (!is_vsmp_box())
|
|
|
- return 0;
|
|
|
-
|
|
|
- /*
|
|
|
- * ScaleMP vSMPowered boxes have one cluster per board and TSCs are
|
|
|
- * not guaranteed to be synced between boards
|
|
|
- */
|
|
|
- if (apic_cluster_num() > 1)
|
|
|
- return 1;
|
|
|
-
|
|
|
- return 0;
|
|
|
+ return multi;
|
|
|
}
|
|
|
#endif
|
|
|
|