x86: remove mpc_oem_pci_bus()
[linux-2.6] / include / asm-x86 / genapic_32.h
1 #ifndef _ASM_GENAPIC_H
2 #define _ASM_GENAPIC_H 1
3
4 #include <asm/mpspec.h>
5
6 /*
7  * Generic APIC driver interface.
8  *
9  * An straight forward mapping of the APIC related parts of the
10  * x86 subarchitecture interface to a dynamic object.
11  *
12  * This is used by the "generic" x86 subarchitecture.
13  *
14  * Copyright 2003 Andi Kleen, SuSE Labs.
15  */
16
17 struct mpc_config_translation;
18 struct mpc_config_bus;
19 struct mp_config_table;
20 struct mpc_config_processor;
21
22 struct genapic { 
23         char *name; 
24         int (*probe)(void); 
25
26         int (*apic_id_registered)(void);
27         cpumask_t (*target_cpus)(void);
28         int int_delivery_mode;
29         int int_dest_mode; 
30         int ESR_DISABLE;
31         int apic_destination_logical;
32         unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid);
33         unsigned long (*check_apicid_present)(int apicid); 
34         int no_balance_irq;
35         int no_ioapic_check;
36         void (*init_apic_ldr)(void);
37         physid_mask_t (*ioapic_phys_id_map)(physid_mask_t map);
38
39         void (*setup_apic_routing)(void);
40         int (*multi_timer_check)(int apic, int irq);
41         int (*apicid_to_node)(int logical_apicid); 
42         int (*cpu_to_logical_apicid)(int cpu);
43         int (*cpu_present_to_apicid)(int mps_cpu);
44         physid_mask_t (*apicid_to_cpu_present)(int phys_apicid);
45         void (*setup_portio_remap)(void); 
46         int (*check_phys_apicid_present)(int boot_cpu_physical_apicid);
47         void (*enable_apic_mode)(void);
48         u32 (*phys_pkg_id)(u32 cpuid_apic, int index_msb);
49
50         /* mpparse */
51         void (*mpc_oem_bus_info)(struct mpc_config_bus *, char *, 
52                                  struct mpc_config_translation *);
53
54         /* When one of the next two hooks returns 1 the genapic
55            is switched to this. Essentially they are additional probe 
56            functions. */
57         int (*mps_oem_check)(struct mp_config_table *mpc, char *oem, 
58                               char *productid);
59         int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id);
60
61         unsigned (*get_apic_id)(unsigned long x);
62         unsigned long apic_id_mask;
63         unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask);
64
65 #ifdef CONFIG_SMP
66         /* ipi */
67         void (*send_IPI_mask)(cpumask_t mask, int vector);
68         void (*send_IPI_allbutself)(int vector);
69         void (*send_IPI_all)(int vector);
70 #endif
71 }; 
72
73 #define APICFUNC(x) .x = x,
74
75 /* More functions could be probably marked IPIFUNC and save some space
76    in UP GENERICARCH kernels, but I don't have the nerve right now
77    to untangle this mess. -AK  */
78 #ifdef CONFIG_SMP
79 #define IPIFUNC(x) APICFUNC(x)
80 #else
81 #define IPIFUNC(x)
82 #endif
83
84 #define APIC_INIT(aname, aprobe) { \
85         .name = aname, \
86         .probe = aprobe, \
87         .int_delivery_mode = INT_DELIVERY_MODE, \
88         .int_dest_mode = INT_DEST_MODE, \
89         .no_balance_irq = NO_BALANCE_IRQ, \
90         .ESR_DISABLE = esr_disable, \
91         .apic_destination_logical = APIC_DEST_LOGICAL, \
92         APICFUNC(apic_id_registered) \
93         APICFUNC(target_cpus) \
94         APICFUNC(check_apicid_used) \
95         APICFUNC(check_apicid_present) \
96         APICFUNC(init_apic_ldr) \
97         APICFUNC(ioapic_phys_id_map) \
98         APICFUNC(setup_apic_routing) \
99         APICFUNC(multi_timer_check) \
100         APICFUNC(apicid_to_node) \
101         APICFUNC(cpu_to_logical_apicid) \
102         APICFUNC(cpu_present_to_apicid) \
103         APICFUNC(apicid_to_cpu_present) \
104         APICFUNC(setup_portio_remap) \
105         APICFUNC(check_phys_apicid_present) \
106         APICFUNC(mpc_oem_bus_info) \
107         APICFUNC(mps_oem_check) \
108         APICFUNC(get_apic_id) \
109         .apic_id_mask = APIC_ID_MASK, \
110         APICFUNC(cpu_mask_to_apicid) \
111         APICFUNC(acpi_madt_oem_check) \
112         IPIFUNC(send_IPI_mask) \
113         IPIFUNC(send_IPI_allbutself) \
114         IPIFUNC(send_IPI_all) \
115         APICFUNC(enable_apic_mode) \
116         APICFUNC(phys_pkg_id) \
117         }
118
119 extern struct genapic *genapic;
120
121 #endif