提交 72fe00f0 编写于 作者: J Joerg Roedel

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: NJoerg Roedel <joerg.roedel@amd.com>
上级 604c307b
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
extern int amd_iommu_init_dma_ops(void); extern int amd_iommu_init_dma_ops(void);
extern int amd_iommu_init_passthrough(void); extern int amd_iommu_init_passthrough(void);
extern irqreturn_t amd_iommu_int_thread(int irq, void *data);
extern irqreturn_t amd_iommu_int_handler(int irq, void *data); extern irqreturn_t amd_iommu_int_handler(int irq, void *data);
extern void amd_iommu_apply_erratum_63(u16 devid); extern void amd_iommu_apply_erratum_63(u16 devid);
extern void amd_iommu_reset_cmd_buffer(struct amd_iommu *iommu); extern void amd_iommu_reset_cmd_buffer(struct amd_iommu *iommu);
......
...@@ -366,7 +366,7 @@ static void iommu_poll_events(struct amd_iommu *iommu) ...@@ -366,7 +366,7 @@ static void iommu_poll_events(struct amd_iommu *iommu)
spin_unlock_irqrestore(&iommu->lock, flags); spin_unlock_irqrestore(&iommu->lock, flags);
} }
irqreturn_t amd_iommu_int_handler(int irq, void *data) irqreturn_t amd_iommu_int_thread(int irq, void *data)
{ {
struct amd_iommu *iommu; struct amd_iommu *iommu;
...@@ -376,6 +376,11 @@ irqreturn_t amd_iommu_int_handler(int irq, void *data) ...@@ -376,6 +376,11 @@ irqreturn_t amd_iommu_int_handler(int irq, void *data)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
irqreturn_t amd_iommu_int_handler(int irq, void *data)
{
return IRQ_WAKE_THREAD;
}
/**************************************************************************** /****************************************************************************
* *
* IOMMU command queuing functions * IOMMU command queuing functions
......
...@@ -1034,10 +1034,11 @@ static int iommu_setup_msi(struct amd_iommu *iommu) ...@@ -1034,10 +1034,11 @@ static int iommu_setup_msi(struct amd_iommu *iommu)
if (pci_enable_msi(iommu->dev)) if (pci_enable_msi(iommu->dev))
return 1; return 1;
r = request_irq(iommu->dev->irq, amd_iommu_int_handler, r = request_threaded_irq(iommu->dev->irq,
IRQF_SAMPLE_RANDOM, amd_iommu_int_handler,
"AMD-Vi", amd_iommu_int_thread,
NULL); 0, "AMD-Vi",
iommu->dev);
if (r) { if (r) {
pci_disable_msi(iommu->dev); pci_disable_msi(iommu->dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册