| Yinghai Lu | d49c428 | 2008-06-08 18:31:54 -0700 | [diff] [blame] | 1 | /* | 
|  | 2 | * APIC driver for the IBM NUMAQ chipset. | 
|  | 3 | */ | 
|  | 4 | #define APIC_DEFINITION 1 | 
|  | 5 | #include <linux/threads.h> | 
|  | 6 | #include <linux/cpumask.h> | 
| Yinghai Lu | d49c428 | 2008-06-08 18:31:54 -0700 | [diff] [blame] | 7 | #include <asm/mpspec.h> | 
|  | 8 | #include <asm/genapic.h> | 
|  | 9 | #include <asm/fixmap.h> | 
|  | 10 | #include <asm/apicdef.h> | 
|  | 11 | #include <linux/kernel.h> | 
|  | 12 | #include <linux/string.h> | 
|  | 13 | #include <linux/init.h> | 
| Yinghai Lu | edb181a | 2008-07-25 02:17:55 -0700 | [diff] [blame] | 14 | #include <asm/numaq/apicdef.h> | 
| Yinghai Lu | 4696ca5 | 2008-07-11 18:43:10 -0700 | [diff] [blame] | 15 | #include <linux/smp.h> | 
| Yinghai Lu | edb181a | 2008-07-25 02:17:55 -0700 | [diff] [blame] | 16 | #include <asm/numaq/apic.h> | 
|  | 17 | #include <asm/numaq/ipi.h> | 
|  | 18 | #include <asm/numaq/mpparse.h> | 
|  | 19 | #include <asm/numaq/wakecpu.h> | 
| Yinghai Lu | d49c428 | 2008-06-08 18:31:54 -0700 | [diff] [blame] | 20 | #include <asm/numaq.h> | 
|  | 21 |  | 
|  | 22 | static int mps_oem_check(struct mp_config_table *mpc, char *oem, | 
|  | 23 | char *productid) | 
|  | 24 | { | 
|  | 25 | numaq_mps_oem_check(mpc, oem, productid); | 
|  | 26 | return found_numaq; | 
|  | 27 | } | 
|  | 28 |  | 
|  | 29 | static int probe_numaq(void) | 
|  | 30 | { | 
|  | 31 | /* already know from get_memcfg_numaq() */ | 
|  | 32 | return found_numaq; | 
|  | 33 | } | 
|  | 34 |  | 
|  | 35 | /* Hook from generic ACPI tables.c */ | 
|  | 36 | static int acpi_madt_oem_check(char *oem_id, char *oem_table_id) | 
|  | 37 | { | 
|  | 38 | return 0; | 
|  | 39 | } | 
|  | 40 |  | 
| Yinghai Lu | 497c9a1 | 2008-08-19 20:50:28 -0700 | [diff] [blame] | 41 | static cpumask_t vector_allocation_domain(int cpu) | 
|  | 42 | { | 
|  | 43 | /* Careful. Some cpus do not strictly honor the set of cpus | 
|  | 44 | * specified in the interrupt destination when using lowest | 
|  | 45 | * priority interrupt delivery mode. | 
|  | 46 | * | 
|  | 47 | * In particular there was a hyperthreading cpu observed to | 
|  | 48 | * deliver interrupts to the wrong hyperthread when only one | 
|  | 49 | * hyperthread was specified in the interrupt desitination. | 
|  | 50 | */ | 
|  | 51 | cpumask_t domain = { { [0] = APIC_ALL_CPUS, } }; | 
|  | 52 | return domain; | 
|  | 53 | } | 
|  | 54 |  | 
| Yinghai Lu | d49c428 | 2008-06-08 18:31:54 -0700 | [diff] [blame] | 55 | struct genapic apic_numaq = APIC_INIT("NUMAQ", probe_numaq); |