Paolo Ciarrocchi | 637cba0 | 2008-02-20 00:18:52 +0100 | [diff] [blame] | 1 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | #include <linux/threads.h> |
| 7 | #include <linux/cpumask.h> |
| 8 | #include <asm/mpspec.h> |
| 9 | #include <asm/genapic.h> |
| 10 | #include <asm/fixmap.h> |
| 11 | #include <asm/apicdef.h> |
| 12 | #include <linux/kernel.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | #include <linux/init.h> |
| 14 | #include <linux/dmi.h> |
Yinghai Lu | 1176fa9 | 2008-07-25 02:17:21 -0700 | [diff] [blame] | 15 | #include <asm/bigsmp/apicdef.h> |
Yinghai Lu | 4696ca5 | 2008-07-11 18:43:10 -0700 | [diff] [blame] | 16 | #include <linux/smp.h> |
Yinghai Lu | 1176fa9 | 2008-07-25 02:17:21 -0700 | [diff] [blame] | 17 | #include <asm/bigsmp/apic.h> |
| 18 | #include <asm/bigsmp/ipi.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | #include <asm/mach-default/mach_mpparse.h> |
| 20 | |
| 21 | static int dmi_bigsmp; /* can be set by dmi scanners */ |
| 22 | |
Jeff Garzik | 1855256 | 2007-10-03 15:15:40 -0400 | [diff] [blame] | 23 | static int hp_ht_bigsmp(const struct dmi_system_id *d) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident); |
| 26 | dmi_bigsmp = 1; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | return 0; |
| 28 | } |
| 29 | |
| 30 | |
Jeff Garzik | 1855256 | 2007-10-03 15:15:40 -0400 | [diff] [blame] | 31 | static const struct dmi_system_id bigsmp_dmi_table[] = { |
Paolo Ciarrocchi | 637cba0 | 2008-02-20 00:18:52 +0100 | [diff] [blame] | 32 | { hp_ht_bigsmp, "HP ProLiant DL760 G2", |
| 33 | { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), |
| 34 | DMI_MATCH(DMI_BIOS_VERSION, "P44-"),} |
| 35 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | |
Paolo Ciarrocchi | 637cba0 | 2008-02-20 00:18:52 +0100 | [diff] [blame] | 37 | { hp_ht_bigsmp, "HP ProLiant DL740", |
| 38 | { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), |
| 39 | DMI_MATCH(DMI_BIOS_VERSION, "P47-"),} |
| 40 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 41 | { } |
| 42 | }; |
| 43 | |
| 44 | |
William Lee Irwin III | af669c9 | 2007-05-23 13:58:23 -0700 | [diff] [blame] | 45 | static int probe_bigsmp(void) |
Paolo Ciarrocchi | 637cba0 | 2008-02-20 00:18:52 +0100 | [diff] [blame] | 46 | { |
Venkatesh Pallipadi | 911a62d | 2005-09-03 15:56:31 -0700 | [diff] [blame] | 47 | if (def_to_bigsmp) |
Yinghai Lu | e0da336 | 2008-06-08 18:29:22 -0700 | [diff] [blame] | 48 | dmi_bigsmp = 1; |
Venkatesh Pallipadi | 911a62d | 2005-09-03 15:56:31 -0700 | [diff] [blame] | 49 | else |
| 50 | dmi_check_system(bigsmp_dmi_table); |
Paolo Ciarrocchi | 637cba0 | 2008-02-20 00:18:52 +0100 | [diff] [blame] | 51 | return dmi_bigsmp; |
| 52 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | |
Paolo Ciarrocchi | 637cba0 | 2008-02-20 00:18:52 +0100 | [diff] [blame] | 54 | struct genapic apic_bigsmp = APIC_INIT("bigsmp", probe_bigsmp); |