blob: 3c3b471ea496225e5a53029b92cfd5eeee658e43 [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>
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 Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/init.h>
14#include <linux/dmi.h>
Yinghai Lu1176fa92008-07-25 02:17:21 -070015#include <asm/bigsmp/apicdef.h>
Yinghai Lu4696ca52008-07-11 18:43:10 -070016#include <linux/smp.h>
Yinghai Lu1176fa92008-07-25 02:17:21 -070017#include <asm/bigsmp/apic.h>
18#include <asm/bigsmp/ipi.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070019#include <asm/mach-default/mach_mpparse.h>
20
21static int dmi_bigsmp; /* can be set by dmi scanners */
22
Jeff Garzik18552562007-10-03 15:15:40 -040023static int hp_ht_bigsmp(const struct dmi_system_id *d)
Linus Torvalds1da177e2005-04-16 15:20:36 -070024{
Linus Torvalds1da177e2005-04-16 15:20:36 -070025 printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident);
26 dmi_bigsmp = 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -070027 return 0;
28}
29
30
Jeff Garzik18552562007-10-03 15:15:40 -040031static const struct dmi_system_id bigsmp_dmi_table[] = {
Paolo Ciarrocchi637cba02008-02-20 00:18:52 +010032 { hp_ht_bigsmp, "HP ProLiant DL760 G2",
33 { DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
34 DMI_MATCH(DMI_BIOS_VERSION, "P44-"),}
35 },
Linus Torvalds1da177e2005-04-16 15:20:36 -070036
Paolo Ciarrocchi637cba02008-02-20 00:18:52 +010037 { hp_ht_bigsmp, "HP ProLiant DL740",
38 { DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
39 DMI_MATCH(DMI_BIOS_VERSION, "P47-"),}
40 },
Linus Torvalds1da177e2005-04-16 15:20:36 -070041 { }
42};
43
Yinghai Lu497c9a12008-08-19 20:50:28 -070044static cpumask_t vector_allocation_domain(int cpu)
45{
46 return cpumask_of_cpu(cpu);
47}
Linus Torvalds1da177e2005-04-16 15:20:36 -070048
William Lee Irwin IIIaf669c92007-05-23 13:58:23 -070049static int probe_bigsmp(void)
Paolo Ciarrocchi637cba02008-02-20 00:18:52 +010050{
Venkatesh Pallipadi911a62d2005-09-03 15:56:31 -070051 if (def_to_bigsmp)
Yinghai Lue0da3362008-06-08 18:29:22 -070052 dmi_bigsmp = 1;
Venkatesh Pallipadi911a62d2005-09-03 15:56:31 -070053 else
54 dmi_check_system(bigsmp_dmi_table);
Paolo Ciarrocchi637cba02008-02-20 00:18:52 +010055 return dmi_bigsmp;
56}
Linus Torvalds1da177e2005-04-16 15:20:36 -070057
Paolo Ciarrocchi637cba02008-02-20 00:18:52 +010058struct genapic apic_bigsmp = APIC_INIT("bigsmp", probe_bigsmp);