blob: 59d7717145590b4f70f7e75daad74bff953d8b3a [file] [log] [blame]
Paolo Ciarrocchi637cba02008-02-20 00:18:52 +01001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * APIC driver for "bigsmp" XAPIC machines with more than 8 virtual CPUs.
3 * Drives the local APIC in "clustered mode".
4 */
5#define APIC_DEFINITION 1
Linus Torvalds1da177e2005-04-16 15:20:36 -07006#include <linux/threads.h>
7#include <linux/cpumask.h>
Andi Kleen874c4fe2006-09-26 10:52:26 +02008#include <asm/smp.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07009#include <asm/mpspec.h>
10#include <asm/genapic.h>
11#include <asm/fixmap.h>
12#include <asm/apicdef.h>
13#include <linux/kernel.h>
14#include <linux/smp.h>
15#include <linux/init.h>
16#include <linux/dmi.h>
17#include <asm/mach-bigsmp/mach_apic.h>
18#include <asm/mach-bigsmp/mach_apicdef.h>
19#include <asm/mach-bigsmp/mach_ipi.h>
20#include <asm/mach-default/mach_mpparse.h>
21
22static int dmi_bigsmp; /* can be set by dmi scanners */
23
Jeff Garzik18552562007-10-03 15:15:40 -040024static int hp_ht_bigsmp(const struct dmi_system_id *d)
Linus Torvalds1da177e2005-04-16 15:20:36 -070025{
Linus Torvalds1da177e2005-04-16 15:20:36 -070026 printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident);
27 dmi_bigsmp = 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -070028 return 0;
29}
30
31
Jeff Garzik18552562007-10-03 15:15:40 -040032static const struct dmi_system_id bigsmp_dmi_table[] = {
Paolo Ciarrocchi637cba02008-02-20 00:18:52 +010033 { hp_ht_bigsmp, "HP ProLiant DL760 G2",
34 { DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
35 DMI_MATCH(DMI_BIOS_VERSION, "P44-"),}
36 },
Linus Torvalds1da177e2005-04-16 15:20:36 -070037
Paolo Ciarrocchi637cba02008-02-20 00:18:52 +010038 { hp_ht_bigsmp, "HP ProLiant DL740",
39 { DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
40 DMI_MATCH(DMI_BIOS_VERSION, "P47-"),}
41 },
Linus Torvalds1da177e2005-04-16 15:20:36 -070042 { }
43};
44
45
William Lee Irwin IIIaf669c92007-05-23 13:58:23 -070046static int probe_bigsmp(void)
Paolo Ciarrocchi637cba02008-02-20 00:18:52 +010047{
Venkatesh Pallipadi911a62d2005-09-03 15:56:31 -070048 if (def_to_bigsmp)
Yinghai Lue0da3362008-06-08 18:29:22 -070049 dmi_bigsmp = 1;
Venkatesh Pallipadi911a62d2005-09-03 15:56:31 -070050 else
51 dmi_check_system(bigsmp_dmi_table);
Paolo Ciarrocchi637cba02008-02-20 00:18:52 +010052 return dmi_bigsmp;
53}
Linus Torvalds1da177e2005-04-16 15:20:36 -070054
Paolo Ciarrocchi637cba02008-02-20 00:18:52 +010055struct genapic apic_bigsmp = APIC_INIT("bigsmp", probe_bigsmp);