diff options
Diffstat (limited to 'arch/x86/include/asm/io_apic.h')
-rw-r--r-- | arch/x86/include/asm/io_apic.h | 56 |
1 files changed, 34 insertions, 22 deletions
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index 90f97b4b9347..0aeed5ca356e 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
@@ -98,6 +98,8 @@ struct IR_IO_APIC_route_entry { | |||
98 | #define IOAPIC_AUTO -1 | 98 | #define IOAPIC_AUTO -1 |
99 | #define IOAPIC_EDGE 0 | 99 | #define IOAPIC_EDGE 0 |
100 | #define IOAPIC_LEVEL 1 | 100 | #define IOAPIC_LEVEL 1 |
101 | #define IOAPIC_MAP_ALLOC 0x1 | ||
102 | #define IOAPIC_MAP_CHECK 0x2 | ||
101 | 103 | ||
102 | #ifdef CONFIG_X86_IO_APIC | 104 | #ifdef CONFIG_X86_IO_APIC |
103 | 105 | ||
@@ -118,9 +120,6 @@ extern int mp_irq_entries; | |||
118 | /* MP IRQ source entries */ | 120 | /* MP IRQ source entries */ |
119 | extern struct mpc_intsrc mp_irqs[MAX_IRQ_SOURCES]; | 121 | extern struct mpc_intsrc mp_irqs[MAX_IRQ_SOURCES]; |
120 | 122 | ||
121 | /* non-0 if default (table-less) MP configuration */ | ||
122 | extern int mpc_default_type; | ||
123 | |||
124 | /* Older SiS APIC requires we rewrite the index register */ | 123 | /* Older SiS APIC requires we rewrite the index register */ |
125 | extern int sis_apic_bug; | 124 | extern int sis_apic_bug; |
126 | 125 | ||
@@ -133,9 +132,6 @@ extern int noioapicquirk; | |||
133 | /* -1 if "noapic" boot option passed */ | 132 | /* -1 if "noapic" boot option passed */ |
134 | extern int noioapicreroute; | 133 | extern int noioapicreroute; |
135 | 134 | ||
136 | /* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */ | ||
137 | extern int timer_through_8259; | ||
138 | |||
139 | /* | 135 | /* |
140 | * If we use the IO-APIC for IRQ routing, disable automatic | 136 | * If we use the IO-APIC for IRQ routing, disable automatic |
141 | * assignment of PCI IRQ's. | 137 | * assignment of PCI IRQ's. |
@@ -145,24 +141,17 @@ extern int timer_through_8259; | |||
145 | 141 | ||
146 | struct io_apic_irq_attr; | 142 | struct io_apic_irq_attr; |
147 | struct irq_cfg; | 143 | struct irq_cfg; |
148 | extern int io_apic_set_pci_routing(struct device *dev, int irq, | ||
149 | struct io_apic_irq_attr *irq_attr); | ||
150 | void setup_IO_APIC_irq_extra(u32 gsi); | ||
151 | extern void ioapic_insert_resources(void); | 144 | extern void ioapic_insert_resources(void); |
152 | 145 | ||
153 | extern int native_setup_ioapic_entry(int, struct IO_APIC_route_entry *, | 146 | extern int native_setup_ioapic_entry(int, struct IO_APIC_route_entry *, |
154 | unsigned int, int, | 147 | unsigned int, int, |
155 | struct io_apic_irq_attr *); | 148 | struct io_apic_irq_attr *); |
156 | extern int native_setup_ioapic_entry(int, struct IO_APIC_route_entry *, | ||
157 | unsigned int, int, | ||
158 | struct io_apic_irq_attr *); | ||
159 | extern void eoi_ioapic_irq(unsigned int irq, struct irq_cfg *cfg); | 149 | extern void eoi_ioapic_irq(unsigned int irq, struct irq_cfg *cfg); |
160 | 150 | ||
161 | extern void native_compose_msi_msg(struct pci_dev *pdev, | 151 | extern void native_compose_msi_msg(struct pci_dev *pdev, |
162 | unsigned int irq, unsigned int dest, | 152 | unsigned int irq, unsigned int dest, |
163 | struct msi_msg *msg, u8 hpet_id); | 153 | struct msi_msg *msg, u8 hpet_id); |
164 | extern void native_eoi_ioapic_pin(int apic, int pin, int vector); | 154 | extern void native_eoi_ioapic_pin(int apic, int pin, int vector); |
165 | int io_apic_setup_irq_pin_once(unsigned int irq, int node, struct io_apic_irq_attr *attr); | ||
166 | 155 | ||
167 | extern int save_ioapic_entries(void); | 156 | extern int save_ioapic_entries(void); |
168 | extern void mask_ioapic_entries(void); | 157 | extern void mask_ioapic_entries(void); |
@@ -171,15 +160,40 @@ extern int restore_ioapic_entries(void); | |||
171 | extern void setup_ioapic_ids_from_mpc(void); | 160 | extern void setup_ioapic_ids_from_mpc(void); |
172 | extern void setup_ioapic_ids_from_mpc_nocheck(void); | 161 | extern void setup_ioapic_ids_from_mpc_nocheck(void); |
173 | 162 | ||
163 | enum ioapic_domain_type { | ||
164 | IOAPIC_DOMAIN_INVALID, | ||
165 | IOAPIC_DOMAIN_LEGACY, | ||
166 | IOAPIC_DOMAIN_STRICT, | ||
167 | IOAPIC_DOMAIN_DYNAMIC, | ||
168 | }; | ||
169 | |||
170 | struct device_node; | ||
171 | struct irq_domain; | ||
172 | struct irq_domain_ops; | ||
173 | |||
174 | struct ioapic_domain_cfg { | ||
175 | enum ioapic_domain_type type; | ||
176 | const struct irq_domain_ops *ops; | ||
177 | struct device_node *dev; | ||
178 | }; | ||
179 | |||
174 | struct mp_ioapic_gsi{ | 180 | struct mp_ioapic_gsi{ |
175 | u32 gsi_base; | 181 | u32 gsi_base; |
176 | u32 gsi_end; | 182 | u32 gsi_end; |
177 | }; | 183 | }; |
178 | extern struct mp_ioapic_gsi mp_gsi_routing[]; | ||
179 | extern u32 gsi_top; | 184 | extern u32 gsi_top; |
180 | int mp_find_ioapic(u32 gsi); | 185 | |
181 | int mp_find_ioapic_pin(int ioapic, u32 gsi); | 186 | extern int mp_find_ioapic(u32 gsi); |
182 | void __init mp_register_ioapic(int id, u32 address, u32 gsi_base); | 187 | extern int mp_find_ioapic_pin(int ioapic, u32 gsi); |
188 | extern u32 mp_pin_to_gsi(int ioapic, int pin); | ||
189 | extern int mp_map_gsi_to_irq(u32 gsi, unsigned int flags); | ||
190 | extern void mp_unmap_irq(int irq); | ||
191 | extern void __init mp_register_ioapic(int id, u32 address, u32 gsi_base, | ||
192 | struct ioapic_domain_cfg *cfg); | ||
193 | extern int mp_irqdomain_map(struct irq_domain *domain, unsigned int virq, | ||
194 | irq_hw_number_t hwirq); | ||
195 | extern void mp_irqdomain_unmap(struct irq_domain *domain, unsigned int virq); | ||
196 | extern int mp_set_gsi_attr(u32 gsi, int trigger, int polarity, int node); | ||
183 | extern void __init pre_init_apic_IRQ0(void); | 197 | extern void __init pre_init_apic_IRQ0(void); |
184 | 198 | ||
185 | extern void mp_save_irq(struct mpc_intsrc *m); | 199 | extern void mp_save_irq(struct mpc_intsrc *m); |
@@ -217,14 +231,12 @@ extern void io_apic_eoi(unsigned int apic, unsigned int vector); | |||
217 | 231 | ||
218 | #define io_apic_assign_pci_irqs 0 | 232 | #define io_apic_assign_pci_irqs 0 |
219 | #define setup_ioapic_ids_from_mpc x86_init_noop | 233 | #define setup_ioapic_ids_from_mpc x86_init_noop |
220 | static const int timer_through_8259 = 0; | ||
221 | static inline void ioapic_insert_resources(void) { } | 234 | static inline void ioapic_insert_resources(void) { } |
222 | #define gsi_top (NR_IRQS_LEGACY) | 235 | #define gsi_top (NR_IRQS_LEGACY) |
223 | static inline int mp_find_ioapic(u32 gsi) { return 0; } | 236 | static inline int mp_find_ioapic(u32 gsi) { return 0; } |
224 | 237 | static inline u32 mp_pin_to_gsi(int ioapic, int pin) { return UINT_MAX; } | |
225 | struct io_apic_irq_attr; | 238 | static inline int mp_map_gsi_to_irq(u32 gsi, unsigned int flags) { return gsi; } |
226 | static inline int io_apic_set_pci_routing(struct device *dev, int irq, | 239 | static inline void mp_unmap_irq(int irq) { } |
227 | struct io_apic_irq_attr *irq_attr) { return 0; } | ||
228 | 240 | ||
229 | static inline int save_ioapic_entries(void) | 241 | static inline int save_ioapic_entries(void) |
230 | { | 242 | { |