diff options
Diffstat (limited to 'include/asm-x86/genapic_32.h')
| -rw-r--r-- | include/asm-x86/genapic_32.h | 105 |
1 files changed, 50 insertions, 55 deletions
diff --git a/include/asm-x86/genapic_32.h b/include/asm-x86/genapic_32.h index 33e3ffe1766c..f1b96932746b 100644 --- a/include/asm-x86/genapic_32.h +++ b/include/asm-x86/genapic_32.h | |||
| @@ -14,23 +14,22 @@ | |||
| 14 | * Copyright 2003 Andi Kleen, SuSE Labs. | 14 | * Copyright 2003 Andi Kleen, SuSE Labs. |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | struct mpc_config_translation; | ||
| 18 | struct mpc_config_bus; | 17 | struct mpc_config_bus; |
| 19 | struct mp_config_table; | 18 | struct mp_config_table; |
| 20 | struct mpc_config_processor; | 19 | struct mpc_config_processor; |
| 21 | 20 | ||
| 22 | struct genapic { | 21 | struct genapic { |
| 23 | char *name; | 22 | char *name; |
| 24 | int (*probe)(void); | 23 | int (*probe)(void); |
| 25 | 24 | ||
| 26 | int (*apic_id_registered)(void); | 25 | int (*apic_id_registered)(void); |
| 27 | cpumask_t (*target_cpus)(void); | 26 | cpumask_t (*target_cpus)(void); |
| 28 | int int_delivery_mode; | 27 | int int_delivery_mode; |
| 29 | int int_dest_mode; | 28 | int int_dest_mode; |
| 30 | int ESR_DISABLE; | 29 | int ESR_DISABLE; |
| 31 | int apic_destination_logical; | 30 | int apic_destination_logical; |
| 32 | unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid); | 31 | unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid); |
| 33 | unsigned long (*check_apicid_present)(int apicid); | 32 | unsigned long (*check_apicid_present)(int apicid); |
| 34 | int no_balance_irq; | 33 | int no_balance_irq; |
| 35 | int no_ioapic_check; | 34 | int no_ioapic_check; |
| 36 | void (*init_apic_ldr)(void); | 35 | void (*init_apic_ldr)(void); |
| @@ -38,28 +37,21 @@ struct genapic { | |||
| 38 | 37 | ||
| 39 | void (*setup_apic_routing)(void); | 38 | void (*setup_apic_routing)(void); |
| 40 | int (*multi_timer_check)(int apic, int irq); | 39 | int (*multi_timer_check)(int apic, int irq); |
| 41 | int (*apicid_to_node)(int logical_apicid); | 40 | int (*apicid_to_node)(int logical_apicid); |
| 42 | int (*cpu_to_logical_apicid)(int cpu); | 41 | int (*cpu_to_logical_apicid)(int cpu); |
| 43 | int (*cpu_present_to_apicid)(int mps_cpu); | 42 | int (*cpu_present_to_apicid)(int mps_cpu); |
| 44 | physid_mask_t (*apicid_to_cpu_present)(int phys_apicid); | 43 | physid_mask_t (*apicid_to_cpu_present)(int phys_apicid); |
| 45 | int (*mpc_apic_id)(struct mpc_config_processor *m, | 44 | void (*setup_portio_remap)(void); |
| 46 | struct mpc_config_translation *t); | ||
| 47 | void (*setup_portio_remap)(void); | ||
| 48 | int (*check_phys_apicid_present)(int boot_cpu_physical_apicid); | 45 | int (*check_phys_apicid_present)(int boot_cpu_physical_apicid); |
| 49 | void (*enable_apic_mode)(void); | 46 | void (*enable_apic_mode)(void); |
| 50 | u32 (*phys_pkg_id)(u32 cpuid_apic, int index_msb); | 47 | u32 (*phys_pkg_id)(u32 cpuid_apic, int index_msb); |
| 51 | 48 | ||
| 52 | /* mpparse */ | 49 | /* mpparse */ |
| 53 | void (*mpc_oem_bus_info)(struct mpc_config_bus *, char *, | ||
| 54 | struct mpc_config_translation *); | ||
| 55 | void (*mpc_oem_pci_bus)(struct mpc_config_bus *, | ||
| 56 | struct mpc_config_translation *); | ||
| 57 | |||
| 58 | /* When one of the next two hooks returns 1 the genapic | 50 | /* When one of the next two hooks returns 1 the genapic |
| 59 | is switched to this. Essentially they are additional probe | 51 | is switched to this. Essentially they are additional probe |
| 60 | functions. */ | 52 | functions. */ |
| 61 | int (*mps_oem_check)(struct mp_config_table *mpc, char *oem, | 53 | int (*mps_oem_check)(struct mp_config_table *mpc, char *oem, |
| 62 | char *productid); | 54 | char *productid); |
| 63 | int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id); | 55 | int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id); |
| 64 | 56 | ||
| 65 | unsigned (*get_apic_id)(unsigned long x); | 57 | unsigned (*get_apic_id)(unsigned long x); |
| @@ -72,7 +64,7 @@ struct genapic { | |||
| 72 | void (*send_IPI_allbutself)(int vector); | 64 | void (*send_IPI_allbutself)(int vector); |
| 73 | void (*send_IPI_all)(int vector); | 65 | void (*send_IPI_all)(int vector); |
| 74 | #endif | 66 | #endif |
| 75 | }; | 67 | }; |
| 76 | 68 | ||
| 77 | #define APICFUNC(x) .x = x, | 69 | #define APICFUNC(x) .x = x, |
| 78 | 70 | ||
| @@ -85,43 +77,46 @@ struct genapic { | |||
| 85 | #define IPIFUNC(x) | 77 | #define IPIFUNC(x) |
| 86 | #endif | 78 | #endif |
| 87 | 79 | ||
| 88 | #define APIC_INIT(aname, aprobe) { \ | 80 | #define APIC_INIT(aname, aprobe) \ |
| 89 | .name = aname, \ | 81 | { \ |
| 90 | .probe = aprobe, \ | 82 | .name = aname, \ |
| 91 | .int_delivery_mode = INT_DELIVERY_MODE, \ | 83 | .probe = aprobe, \ |
| 92 | .int_dest_mode = INT_DEST_MODE, \ | 84 | .int_delivery_mode = INT_DELIVERY_MODE, \ |
| 93 | .no_balance_irq = NO_BALANCE_IRQ, \ | 85 | .int_dest_mode = INT_DEST_MODE, \ |
| 94 | .ESR_DISABLE = esr_disable, \ | 86 | .no_balance_irq = NO_BALANCE_IRQ, \ |
| 95 | .apic_destination_logical = APIC_DEST_LOGICAL, \ | 87 | .ESR_DISABLE = esr_disable, \ |
| 96 | APICFUNC(apic_id_registered) \ | 88 | .apic_destination_logical = APIC_DEST_LOGICAL, \ |
| 97 | APICFUNC(target_cpus) \ | 89 | APICFUNC(apic_id_registered) \ |
| 98 | APICFUNC(check_apicid_used) \ | 90 | APICFUNC(target_cpus) \ |
| 99 | APICFUNC(check_apicid_present) \ | 91 | APICFUNC(check_apicid_used) \ |
| 100 | APICFUNC(init_apic_ldr) \ | 92 | APICFUNC(check_apicid_present) \ |
| 101 | APICFUNC(ioapic_phys_id_map) \ | 93 | APICFUNC(init_apic_ldr) \ |
| 102 | APICFUNC(setup_apic_routing) \ | 94 | APICFUNC(ioapic_phys_id_map) \ |
| 103 | APICFUNC(multi_timer_check) \ | 95 | APICFUNC(setup_apic_routing) \ |
| 104 | APICFUNC(apicid_to_node) \ | 96 | APICFUNC(multi_timer_check) \ |
| 105 | APICFUNC(cpu_to_logical_apicid) \ | 97 | APICFUNC(apicid_to_node) \ |
| 106 | APICFUNC(cpu_present_to_apicid) \ | 98 | APICFUNC(cpu_to_logical_apicid) \ |
| 107 | APICFUNC(apicid_to_cpu_present) \ | 99 | APICFUNC(cpu_present_to_apicid) \ |
| 108 | APICFUNC(mpc_apic_id) \ | 100 | APICFUNC(apicid_to_cpu_present) \ |
| 109 | APICFUNC(setup_portio_remap) \ | 101 | APICFUNC(setup_portio_remap) \ |
| 110 | APICFUNC(check_phys_apicid_present) \ | 102 | APICFUNC(check_phys_apicid_present) \ |
| 111 | APICFUNC(mpc_oem_bus_info) \ | 103 | APICFUNC(mps_oem_check) \ |
| 112 | APICFUNC(mpc_oem_pci_bus) \ | 104 | APICFUNC(get_apic_id) \ |
| 113 | APICFUNC(mps_oem_check) \ | 105 | .apic_id_mask = APIC_ID_MASK, \ |
| 114 | APICFUNC(get_apic_id) \ | 106 | APICFUNC(cpu_mask_to_apicid) \ |
| 115 | .apic_id_mask = APIC_ID_MASK, \ | 107 | APICFUNC(acpi_madt_oem_check) \ |
| 116 | APICFUNC(cpu_mask_to_apicid) \ | 108 | IPIFUNC(send_IPI_mask) \ |
| 117 | APICFUNC(acpi_madt_oem_check) \ | 109 | IPIFUNC(send_IPI_allbutself) \ |
| 118 | IPIFUNC(send_IPI_mask) \ | 110 | IPIFUNC(send_IPI_all) \ |
| 119 | IPIFUNC(send_IPI_allbutself) \ | 111 | APICFUNC(enable_apic_mode) \ |
| 120 | IPIFUNC(send_IPI_all) \ | 112 | APICFUNC(phys_pkg_id) \ |
| 121 | APICFUNC(enable_apic_mode) \ | 113 | } |
| 122 | APICFUNC(phys_pkg_id) \ | ||
| 123 | } | ||
| 124 | 114 | ||
| 125 | extern struct genapic *genapic; | 115 | extern struct genapic *genapic; |
| 126 | 116 | ||
| 117 | enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC}; | ||
| 118 | #define get_uv_system_type() UV_NONE | ||
| 119 | #define is_uv_system() 0 | ||
| 120 | |||
| 121 | |||
| 127 | #endif | 122 | #endif |
