diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2012-03-30 14:47:02 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2012-05-07 08:34:59 -0400 |
commit | 0c3f173a88c4ae3e4253427cf574a59ad5352918 (patch) | |
tree | d34364dc8d7926de75ec486ce579b478d23098e3 /arch/x86/include/asm | |
parent | 4f3d8b67ad3090f9fb72f8235d21cde53cd24b79 (diff) |
iommu/vt-d: Convert IR ioapic-setup to use remap_ops
The IOAPIC setup routine for interrupt remapping is VT-d
specific. Move it to the irq_remap_ops and add a call helper
function.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/intr_remapping.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/x86/include/asm/intr_remapping.h b/arch/x86/include/asm/intr_remapping.h index 55aa892a53e3..a22e1f1ac7ec 100644 --- a/arch/x86/include/asm/intr_remapping.h +++ b/arch/x86/include/asm/intr_remapping.h | |||
@@ -24,6 +24,9 @@ | |||
24 | 24 | ||
25 | #ifdef CONFIG_IRQ_REMAP | 25 | #ifdef CONFIG_IRQ_REMAP |
26 | 26 | ||
27 | struct IO_APIC_route_entry; | ||
28 | struct io_apic_irq_attr; | ||
29 | |||
27 | extern int intr_remapping_enabled; | 30 | extern int intr_remapping_enabled; |
28 | 31 | ||
29 | extern void setup_intr_remapping(void); | 32 | extern void setup_intr_remapping(void); |
@@ -33,6 +36,10 @@ extern int intr_hardware_enable(void); | |||
33 | extern void intr_hardware_disable(void); | 36 | extern void intr_hardware_disable(void); |
34 | extern int intr_hardware_reenable(int); | 37 | extern int intr_hardware_reenable(int); |
35 | extern int intr_enable_fault_handling(void); | 38 | extern int intr_enable_fault_handling(void); |
39 | extern int intr_setup_ioapic_entry(int irq, | ||
40 | struct IO_APIC_route_entry *entry, | ||
41 | unsigned int destination, int vector, | ||
42 | struct io_apic_irq_attr *attr); | ||
36 | 43 | ||
37 | #else /* CONFIG_IRQ_REMAP */ | 44 | #else /* CONFIG_IRQ_REMAP */ |
38 | 45 | ||
@@ -45,7 +52,13 @@ static inline int intr_hardware_enable(void) { return -ENODEV; } | |||
45 | static inline void intr_hardware_disable(void) { } | 52 | static inline void intr_hardware_disable(void) { } |
46 | static inline int intr_hardware_reenable(int eim) { return -ENODEV; } | 53 | static inline int intr_hardware_reenable(int eim) { return -ENODEV; } |
47 | static inline int intr_enable_fault_handling(void) { return -ENODEV; } | 54 | static inline int intr_enable_fault_handling(void) { return -ENODEV; } |
48 | 55 | static inline int intr_setup_ioapic_entry(int irq, | |
56 | struct IO_APIC_route_entry *entry, | ||
57 | unsigned int destination, int vector, | ||
58 | struct io_apic_irq_attr *attr) | ||
59 | { | ||
60 | return -ENODEV; | ||
61 | } | ||
49 | #endif /* CONFIG_IRQ_REMAP */ | 62 | #endif /* CONFIG_IRQ_REMAP */ |
50 | 63 | ||
51 | #endif /* __X86_INTR_REMAPPING_H */ | 64 | #endif /* __X86_INTR_REMAPPING_H */ |