diff options
| -rw-r--r-- | arch/x86/include/asm/hw_irq.h | 33 | ||||
| -rw-r--r-- | arch/x86/include/asm/io_apic.h | 20 | ||||
| -rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 10 | ||||
| -rw-r--r-- | arch/x86/kernel/crash.c | 1 | ||||
| -rw-r--r-- | arch/x86/kernel/machine_kexec_32.c | 1 | ||||
| -rw-r--r-- | arch/x86/kernel/machine_kexec_64.c | 1 | ||||
| -rw-r--r-- | arch/x86/kernel/reboot.c | 1 | ||||
| -rw-r--r-- | drivers/pci/hotplug/ibmphp_core.c | 1 |
8 files changed, 34 insertions, 34 deletions
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h index a7235777a478..9662290e0b20 100644 --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h | |||
| @@ -159,39 +159,6 @@ static inline void lock_vector_lock(void) {} | |||
| 159 | static inline void unlock_vector_lock(void) {} | 159 | static inline void unlock_vector_lock(void) {} |
| 160 | #endif /* CONFIG_X86_LOCAL_APIC */ | 160 | #endif /* CONFIG_X86_LOCAL_APIC */ |
| 161 | 161 | ||
| 162 | /* IOAPIC */ | ||
| 163 | #ifdef CONFIG_X86_IO_APIC | ||
| 164 | struct io_apic_irq_attr { | ||
| 165 | int ioapic; | ||
| 166 | int ioapic_pin; | ||
| 167 | int trigger; | ||
| 168 | int polarity; | ||
| 169 | }; | ||
| 170 | |||
| 171 | static inline void set_io_apic_irq_attr(struct io_apic_irq_attr *irq_attr, | ||
| 172 | int ioapic, int ioapic_pin, | ||
| 173 | int trigger, int polarity) | ||
| 174 | { | ||
| 175 | irq_attr->ioapic = ioapic; | ||
| 176 | irq_attr->ioapic_pin = ioapic_pin; | ||
| 177 | irq_attr->trigger = trigger; | ||
| 178 | irq_attr->polarity = polarity; | ||
| 179 | } | ||
| 180 | |||
| 181 | extern void setup_IO_APIC(void); | ||
| 182 | extern void enable_IO_APIC(void); | ||
| 183 | extern void disable_IO_APIC(void); | ||
| 184 | extern void setup_ioapic_dest(void); | ||
| 185 | extern int IO_APIC_get_PCI_irq_vector(int bus, int devfn, int pin); | ||
| 186 | extern void print_IO_APICs(void); | ||
| 187 | |||
| 188 | extern unsigned long io_apic_irqs; | ||
| 189 | #define IO_APIC_IRQ(x) (((x) >= NR_IRQS_LEGACY) || ((1 << (x)) & io_apic_irqs)) | ||
| 190 | #else /* CONFIG_X86_IO_APIC */ | ||
| 191 | #define IO_APIC_IRQ(x) 0 | ||
| 192 | static inline void print_IO_APICs(void) {} | ||
| 193 | #endif /* CONFIG_X86_IO_APIC */ | ||
| 194 | |||
| 195 | /* Statistics */ | 162 | /* Statistics */ |
| 196 | extern atomic_t irq_err_count; | 163 | extern atomic_t irq_err_count; |
| 197 | extern atomic_t irq_mis_count; | 164 | extern atomic_t irq_mis_count; |
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index bdd45c25023a..b7f1499d177f 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
| @@ -132,6 +132,10 @@ extern int noioapicquirk; | |||
| 132 | /* -1 if "noapic" boot option passed */ | 132 | /* -1 if "noapic" boot option passed */ |
| 133 | extern int noioapicreroute; | 133 | extern int noioapicreroute; |
| 134 | 134 | ||
| 135 | extern unsigned long io_apic_irqs; | ||
| 136 | |||
| 137 | #define IO_APIC_IRQ(x) (((x) >= NR_IRQS_LEGACY) || ((1 << (x)) & io_apic_irqs)) | ||
| 138 | |||
| 135 | /* | 139 | /* |
| 136 | * If we use the IO-APIC for IRQ routing, disable automatic | 140 | * If we use the IO-APIC for IRQ routing, disable automatic |
| 137 | * assignment of PCI IRQ's. | 141 | * assignment of PCI IRQ's. |
| @@ -139,7 +143,6 @@ extern int noioapicreroute; | |||
| 139 | #define io_apic_assign_pci_irqs \ | 143 | #define io_apic_assign_pci_irqs \ |
| 140 | (mp_irq_entries && !skip_ioapic_setup && io_apic_irqs) | 144 | (mp_irq_entries && !skip_ioapic_setup && io_apic_irqs) |
| 141 | 145 | ||
| 142 | struct io_apic_irq_attr; | ||
| 143 | struct irq_cfg; | 146 | struct irq_cfg; |
| 144 | extern void ioapic_insert_resources(void); | 147 | extern void ioapic_insert_resources(void); |
| 145 | 148 | ||
| @@ -157,6 +160,13 @@ extern int restore_ioapic_entries(void); | |||
| 157 | extern void setup_ioapic_ids_from_mpc(void); | 160 | extern void setup_ioapic_ids_from_mpc(void); |
| 158 | extern void setup_ioapic_ids_from_mpc_nocheck(void); | 161 | extern void setup_ioapic_ids_from_mpc_nocheck(void); |
| 159 | 162 | ||
| 163 | struct io_apic_irq_attr { | ||
| 164 | int ioapic; | ||
| 165 | int ioapic_pin; | ||
| 166 | int trigger; | ||
| 167 | int polarity; | ||
| 168 | }; | ||
| 169 | |||
| 160 | enum ioapic_domain_type { | 170 | enum ioapic_domain_type { |
| 161 | IOAPIC_DOMAIN_INVALID, | 171 | IOAPIC_DOMAIN_INVALID, |
| 162 | IOAPIC_DOMAIN_LEGACY, | 172 | IOAPIC_DOMAIN_LEGACY, |
| @@ -226,11 +236,19 @@ static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned | |||
| 226 | 236 | ||
| 227 | extern void io_apic_eoi(unsigned int apic, unsigned int vector); | 237 | extern void io_apic_eoi(unsigned int apic, unsigned int vector); |
| 228 | 238 | ||
| 239 | extern void setup_IO_APIC(void); | ||
| 240 | extern void enable_IO_APIC(void); | ||
| 241 | extern void disable_IO_APIC(void); | ||
| 242 | extern void setup_ioapic_dest(void); | ||
| 243 | extern int IO_APIC_get_PCI_irq_vector(int bus, int devfn, int pin); | ||
| 244 | extern void print_IO_APICs(void); | ||
| 229 | #else /* !CONFIG_X86_IO_APIC */ | 245 | #else /* !CONFIG_X86_IO_APIC */ |
| 230 | 246 | ||
| 247 | #define IO_APIC_IRQ(x) 0 | ||
| 231 | #define io_apic_assign_pci_irqs 0 | 248 | #define io_apic_assign_pci_irqs 0 |
| 232 | #define setup_ioapic_ids_from_mpc x86_init_noop | 249 | #define setup_ioapic_ids_from_mpc x86_init_noop |
| 233 | static inline void ioapic_insert_resources(void) { } | 250 | static inline void ioapic_insert_resources(void) { } |
| 251 | static inline void print_IO_APICs(void) {} | ||
| 234 | #define gsi_top (NR_IRQS_LEGACY) | 252 | #define gsi_top (NR_IRQS_LEGACY) |
| 235 | static inline int mp_find_ioapic(u32 gsi) { return 0; } | 253 | static inline int mp_find_ioapic(u32 gsi) { return 0; } |
| 236 | static inline u32 mp_pin_to_gsi(int ioapic, int pin) { return UINT_MAX; } | 254 | static inline u32 mp_pin_to_gsi(int ioapic, int pin) { return UINT_MAX; } |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index b1acb68e19c7..8dcdb7b1e848 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
| @@ -3023,6 +3023,16 @@ int mp_ioapic_registered(u32 gsi_base) | |||
| 3023 | return 0; | 3023 | return 0; |
| 3024 | } | 3024 | } |
| 3025 | 3025 | ||
| 3026 | static inline void set_io_apic_irq_attr(struct io_apic_irq_attr *irq_attr, | ||
| 3027 | int ioapic, int ioapic_pin, | ||
| 3028 | int trigger, int polarity) | ||
| 3029 | { | ||
| 3030 | irq_attr->ioapic = ioapic; | ||
| 3031 | irq_attr->ioapic_pin = ioapic_pin; | ||
| 3032 | irq_attr->trigger = trigger; | ||
| 3033 | irq_attr->polarity = polarity; | ||
| 3034 | } | ||
| 3035 | |||
| 3026 | int mp_irqdomain_map(struct irq_domain *domain, unsigned int virq, | 3036 | int mp_irqdomain_map(struct irq_domain *domain, unsigned int virq, |
| 3027 | irq_hw_number_t hwirq) | 3037 | irq_hw_number_t hwirq) |
| 3028 | { | 3038 | { |
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index f5ab56d14287..aceb2f90c716 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <asm/nmi.h> | 28 | #include <asm/nmi.h> |
| 29 | #include <asm/hw_irq.h> | 29 | #include <asm/hw_irq.h> |
| 30 | #include <asm/apic.h> | 30 | #include <asm/apic.h> |
| 31 | #include <asm/io_apic.h> | ||
| 31 | #include <asm/hpet.h> | 32 | #include <asm/hpet.h> |
| 32 | #include <linux/kdebug.h> | 33 | #include <linux/kdebug.h> |
| 33 | #include <asm/cpu.h> | 34 | #include <asm/cpu.h> |
diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c index 72e8e310258d..469b23d6acc2 100644 --- a/arch/x86/kernel/machine_kexec_32.c +++ b/arch/x86/kernel/machine_kexec_32.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <asm/tlbflush.h> | 20 | #include <asm/tlbflush.h> |
| 21 | #include <asm/mmu_context.h> | 21 | #include <asm/mmu_context.h> |
| 22 | #include <asm/apic.h> | 22 | #include <asm/apic.h> |
| 23 | #include <asm/io_apic.h> | ||
| 23 | #include <asm/cpufeature.h> | 24 | #include <asm/cpufeature.h> |
| 24 | #include <asm/desc.h> | 25 | #include <asm/desc.h> |
| 25 | #include <asm/cacheflush.h> | 26 | #include <asm/cacheflush.h> |
diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c index 485981059a40..415480d3ea84 100644 --- a/arch/x86/kernel/machine_kexec_64.c +++ b/arch/x86/kernel/machine_kexec_64.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <asm/pgtable.h> | 22 | #include <asm/pgtable.h> |
| 23 | #include <asm/tlbflush.h> | 23 | #include <asm/tlbflush.h> |
| 24 | #include <asm/mmu_context.h> | 24 | #include <asm/mmu_context.h> |
| 25 | #include <asm/io_apic.h> | ||
| 25 | #include <asm/debugreg.h> | 26 | #include <asm/debugreg.h> |
| 26 | #include <asm/kexec-bzimage64.h> | 27 | #include <asm/kexec-bzimage64.h> |
| 27 | 28 | ||
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 17962e667a91..bae6c609888e 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <acpi/reboot.h> | 12 | #include <acpi/reboot.h> |
| 13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
| 14 | #include <asm/apic.h> | 14 | #include <asm/apic.h> |
| 15 | #include <asm/io_apic.h> | ||
| 15 | #include <asm/desc.h> | 16 | #include <asm/desc.h> |
| 16 | #include <asm/hpet.h> | 17 | #include <asm/hpet.h> |
| 17 | #include <asm/pgtable.h> | 18 | #include <asm/pgtable.h> |
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c index d261e623541f..96c5c729cdbc 100644 --- a/drivers/pci/hotplug/ibmphp_core.c +++ b/drivers/pci/hotplug/ibmphp_core.c | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <linux/wait.h> | 36 | #include <linux/wait.h> |
| 37 | #include "../pci.h" | 37 | #include "../pci.h" |
| 38 | #include <asm/pci_x86.h> /* for struct irq_routing_table */ | 38 | #include <asm/pci_x86.h> /* for struct irq_routing_table */ |
| 39 | #include <asm/io_apic.h> | ||
| 39 | #include "ibmphp.h" | 40 | #include "ibmphp.h" |
| 40 | 41 | ||
| 41 | #define attn_on(sl) ibmphp_hpc_writeslot (sl, HPC_SLOT_ATTNON) | 42 | #define attn_on(sl) ibmphp_hpc_writeslot (sl, HPC_SLOT_ATTNON) |
