diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2011-05-10 04:50:42 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2011-05-10 05:07:58 -0400 |
commit | 72fe00f01f9a3240a1073be27aeaf4fc476cc662 (patch) | |
tree | 6030bac491411d7a70e8c1c1da90c8f5e552dc74 | |
parent | 604c307bf47350c74bb36507b86a08726c7c2075 (diff) |
x86/amd-iommu: Use threaded interupt handler
Move the interupt handling for the iommu into the interupt
thread to reduce latencies and prepare interupt handling for
pri handling.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
-rw-r--r-- | arch/x86/include/asm/amd_iommu_proto.h | 1 | ||||
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/amd_iommu_init.c | 9 |
3 files changed, 12 insertions, 5 deletions
diff --git a/arch/x86/include/asm/amd_iommu_proto.h b/arch/x86/include/asm/amd_iommu_proto.h index a4ae6c3875eb..55d95eb789b3 100644 --- a/arch/x86/include/asm/amd_iommu_proto.h +++ b/arch/x86/include/asm/amd_iommu_proto.h | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | extern int amd_iommu_init_dma_ops(void); | 24 | extern int amd_iommu_init_dma_ops(void); |
25 | extern int amd_iommu_init_passthrough(void); | 25 | extern int amd_iommu_init_passthrough(void); |
26 | extern irqreturn_t amd_iommu_int_thread(int irq, void *data); | ||
26 | extern irqreturn_t amd_iommu_int_handler(int irq, void *data); | 27 | extern irqreturn_t amd_iommu_int_handler(int irq, void *data); |
27 | extern void amd_iommu_apply_erratum_63(u16 devid); | 28 | extern void amd_iommu_apply_erratum_63(u16 devid); |
28 | extern void amd_iommu_reset_cmd_buffer(struct amd_iommu *iommu); | 29 | extern void amd_iommu_reset_cmd_buffer(struct amd_iommu *iommu); |
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index dc5dddafe5c2..873e7e1ead7b 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -366,7 +366,7 @@ static void iommu_poll_events(struct amd_iommu *iommu) | |||
366 | spin_unlock_irqrestore(&iommu->lock, flags); | 366 | spin_unlock_irqrestore(&iommu->lock, flags); |
367 | } | 367 | } |
368 | 368 | ||
369 | irqreturn_t amd_iommu_int_handler(int irq, void *data) | 369 | irqreturn_t amd_iommu_int_thread(int irq, void *data) |
370 | { | 370 | { |
371 | struct amd_iommu *iommu; | 371 | struct amd_iommu *iommu; |
372 | 372 | ||
@@ -376,6 +376,11 @@ irqreturn_t amd_iommu_int_handler(int irq, void *data) | |||
376 | return IRQ_HANDLED; | 376 | return IRQ_HANDLED; |
377 | } | 377 | } |
378 | 378 | ||
379 | irqreturn_t amd_iommu_int_handler(int irq, void *data) | ||
380 | { | ||
381 | return IRQ_WAKE_THREAD; | ||
382 | } | ||
383 | |||
379 | /**************************************************************************** | 384 | /**************************************************************************** |
380 | * | 385 | * |
381 | * IOMMU command queuing functions | 386 | * IOMMU command queuing functions |
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 28b078133688..9179c21120a8 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c | |||
@@ -1034,10 +1034,11 @@ static int iommu_setup_msi(struct amd_iommu *iommu) | |||
1034 | if (pci_enable_msi(iommu->dev)) | 1034 | if (pci_enable_msi(iommu->dev)) |
1035 | return 1; | 1035 | return 1; |
1036 | 1036 | ||
1037 | r = request_irq(iommu->dev->irq, amd_iommu_int_handler, | 1037 | r = request_threaded_irq(iommu->dev->irq, |
1038 | IRQF_SAMPLE_RANDOM, | 1038 | amd_iommu_int_handler, |
1039 | "AMD-Vi", | 1039 | amd_iommu_int_thread, |
1040 | NULL); | 1040 | 0, "AMD-Vi", |
1041 | iommu->dev); | ||
1041 | 1042 | ||
1042 | if (r) { | 1043 | if (r) { |
1043 | pci_disable_msi(iommu->dev); | 1044 | pci_disable_msi(iommu->dev); |