diff options
author | Joerg Roedel <joro@8bytes.org> | 2012-09-26 12:44:45 +0200 |
---|---|---|
committer | Joerg Roedel <joro@8bytes.org> | 2013-01-28 12:17:27 +0100 |
commit | 9b1b0e42f54bc452817f4bb6a8d939afe4f04303 (patch) | |
tree | 9b3edc203e3ac5b23c5202605f5c4a9dbe023c03 /arch/x86/include | |
parent | 819508d302e5b6d6dacb5c3d5e4756091e32cc7d (diff) | |
download | linux-3.10-9b1b0e42f54bc452817f4bb6a8d939afe4f04303.tar.gz linux-3.10-9b1b0e42f54bc452817f4bb6a8d939afe4f04303.tar.bz2 linux-3.10-9b1b0e42f54bc452817f4bb6a8d939afe4f04303.zip |
x86, io-apic: Move CONFIG_IRQ_REMAP code out of x86 core
Move all the code to either to the header file
asm/irq_remapping.h or to drivers/iommu/.
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Acked-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/hw_irq.h | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/io_apic.h | 5 | ||||
-rw-r--r-- | arch/x86/include/asm/irq_remapping.h | 17 |
3 files changed, 23 insertions, 0 deletions
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h index fc89a2a9b04..10a78c3d3d5 100644 --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h @@ -127,6 +127,7 @@ struct irq_cfg { u8 vector; u8 move_in_progress : 1; #ifdef CONFIG_IRQ_REMAP + u8 remapped : 1; union { struct irq_2_iommu irq_2_iommu; struct irq_2_irte irq_2_irte; diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index 71f5f0865e7..36fb5abd372 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h @@ -144,6 +144,7 @@ extern int timer_through_8259; (mp_irq_entries && !skip_ioapic_setup && io_apic_irqs) struct io_apic_irq_attr; +struct irq_cfg; extern int io_apic_set_pci_routing(struct device *dev, int irq, struct io_apic_irq_attr *irq_attr); void setup_IO_APIC_irq_extra(u32 gsi); @@ -152,6 +153,10 @@ extern void ioapic_insert_resources(void); extern int native_setup_ioapic_entry(int, struct IO_APIC_route_entry *, unsigned int, int, struct io_apic_irq_attr *); +extern int native_setup_ioapic_entry(int, struct IO_APIC_route_entry *, + unsigned int, int, + struct io_apic_irq_attr *); +extern void eoi_ioapic_irq(unsigned int irq, struct irq_cfg *cfg); int io_apic_setup_irq_pin_once(unsigned int irq, int node, struct io_apic_irq_attr *attr); diff --git a/arch/x86/include/asm/irq_remapping.h b/arch/x86/include/asm/irq_remapping.h index 6f4b48ba7a5..562db68906f 100644 --- a/arch/x86/include/asm/irq_remapping.h +++ b/arch/x86/include/asm/irq_remapping.h @@ -45,6 +45,13 @@ extern void compose_remapped_msi_msg(struct pci_dev *pdev, extern int setup_hpet_msi_remapped(unsigned int irq, unsigned int id); extern void panic_if_irq_remap(const char *msg); +static inline bool irq_remapped(struct irq_cfg *cfg) +{ + return (cfg->remapped == 1); +} + +void irq_remap_modify_chip_defaults(struct irq_chip *chip); + #else /* CONFIG_IRQ_REMAP */ static inline void setup_irq_remapping_ops(void) { } @@ -76,6 +83,16 @@ static inline int setup_hpet_msi_remapped(unsigned int irq, unsigned int id) static inline void panic_if_irq_remap(const char *msg) { } + +static inline bool irq_remapped(struct irq_cfg *cfg) +{ + return false; +} + +static inline void irq_remap_modify_chip_defaults(struct irq_chip *chip) +{ +} + #endif /* CONFIG_IRQ_REMAP */ #endif /* __X86_IRQ_REMAPPING_H */ |