diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2012-03-30 14:47:01 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2012-05-07 08:34:59 -0400 |
commit | 4f3d8b67ad3090f9fb72f8235d21cde53cd24b79 (patch) | |
tree | c6408bbae796a1aec8c0d8ef735ee2f159358e2c /arch/x86 | |
parent | 736baef4472d00574089f295bc759ac002b9558c (diff) |
iommu/vt-d: Convert missing apic.c intr-remapping call to remap_ops
Convert these calls too:
* Disable of remapping hardware
* Reenable of remapping hardware
* Enable fault handling
With that all of arch/x86/kernel/apic/apic.c is converted to
use the generic intr-remapping interface.
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')
-rw-r--r-- | arch/x86/include/asm/intr_remapping.h | 6 | ||||
-rw-r--r-- | arch/x86/kernel/apic/apic.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/arch/x86/include/asm/intr_remapping.h b/arch/x86/include/asm/intr_remapping.h index 207c605dbdf5..55aa892a53e3 100644 --- a/arch/x86/include/asm/intr_remapping.h +++ b/arch/x86/include/asm/intr_remapping.h | |||
@@ -30,6 +30,9 @@ extern void setup_intr_remapping(void); | |||
30 | extern int intr_remapping_supported(void); | 30 | extern int intr_remapping_supported(void); |
31 | extern int intr_hardware_init(void); | 31 | extern int intr_hardware_init(void); |
32 | extern int intr_hardware_enable(void); | 32 | extern int intr_hardware_enable(void); |
33 | extern void intr_hardware_disable(void); | ||
34 | extern int intr_hardware_reenable(int); | ||
35 | extern int intr_enable_fault_handling(void); | ||
33 | 36 | ||
34 | #else /* CONFIG_IRQ_REMAP */ | 37 | #else /* CONFIG_IRQ_REMAP */ |
35 | 38 | ||
@@ -39,6 +42,9 @@ static inline void setup_intr_remapping(void) { } | |||
39 | static inline int intr_remapping_supported(void) { return 0; } | 42 | static inline int intr_remapping_supported(void) { return 0; } |
40 | static inline int intr_hardware_init(void) { return -ENODEV; } | 43 | static inline int intr_hardware_init(void) { return -ENODEV; } |
41 | static inline int intr_hardware_enable(void) { return -ENODEV; } | 44 | static inline int intr_hardware_enable(void) { return -ENODEV; } |
45 | static inline void intr_hardware_disable(void) { } | ||
46 | static inline int intr_hardware_reenable(int eim) { return -ENODEV; } | ||
47 | static inline int intr_enable_fault_handling(void) { return -ENODEV; } | ||
42 | 48 | ||
43 | #endif /* CONFIG_IRQ_REMAP */ | 49 | #endif /* CONFIG_IRQ_REMAP */ |
44 | 50 | ||
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 1db6f63a22ff..a2762687e2ee 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -1443,7 +1443,7 @@ void __init bsp_end_local_APIC_setup(void) | |||
1443 | * handling for interrupt remapping. | 1443 | * handling for interrupt remapping. |
1444 | */ | 1444 | */ |
1445 | if (intr_remapping_enabled) | 1445 | if (intr_remapping_enabled) |
1446 | enable_drhd_fault_handling(); | 1446 | intr_enable_fault_handling(); |
1447 | 1447 | ||
1448 | } | 1448 | } |
1449 | 1449 | ||
@@ -2181,7 +2181,7 @@ static int lapic_suspend(void) | |||
2181 | disable_local_APIC(); | 2181 | disable_local_APIC(); |
2182 | 2182 | ||
2183 | if (intr_remapping_enabled) | 2183 | if (intr_remapping_enabled) |
2184 | disable_intr_remapping(); | 2184 | intr_hardware_disable(); |
2185 | 2185 | ||
2186 | local_irq_restore(flags); | 2186 | local_irq_restore(flags); |
2187 | return 0; | 2187 | return 0; |
@@ -2250,7 +2250,7 @@ static void lapic_resume(void) | |||
2250 | apic_read(APIC_ESR); | 2250 | apic_read(APIC_ESR); |
2251 | 2251 | ||
2252 | if (intr_remapping_enabled) | 2252 | if (intr_remapping_enabled) |
2253 | reenable_intr_remapping(x2apic_mode); | 2253 | intr_hardware_reenable(x2apic_mode); |
2254 | 2254 | ||
2255 | local_irq_restore(flags); | 2255 | local_irq_restore(flags); |
2256 | } | 2256 | } |