[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131112131659.578eb7c1@sluggy>
Date: Tue, 12 Nov 2013 13:16:59 -0600
From: Clark Williams <williams@...hat.com>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: RT <linux-rt-users@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] 3.12.0-rt1: net: iwlwifi request only a threaded handler
for interrupts
Sebastian,
I needed this for my laptop on 3.12, so tweaked it to apply properly.
Clark
commit 7b1573eaa0f176731bc231b249598b6e4850babf
Author: Clark Williams <clark.williams@...il.com>
Date: Tue Nov 12 12:17:07 2013 -0600
net: iwlwifi: request only a threaded handler for interrupts
On RT the trans_pcie->irq_lock lock is converted into a sleeping
lock and can't be used in primary irq handler. The lock is used in
mutliple places which means turning it into a raw lock could
increase the latency of the system.
For now both handlers are moved into the thread.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Signed-off-by: Clark Williams <clark.williams@...il.com>
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c
b/drivers/net/wireless/iwlwifi/pcie/trans.c index c3f904d..2f2345c
100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -1375,6 +1375,20 @@ static const struct iwl_trans_ops trans_ops_pcie
= { .set_bits_mask = iwl_trans_pcie_set_bits_mask,
};
+#ifdef CONFIG_PREEMPT_RT_BASE
+static irqreturn_t iwl_rt_irq_handler(int irq, void *dev_id)
+{
+ irqreturn_t ret;
+
+ local_bh_disable();
+ ret = iwl_pcie_isr_ict(irq, dev_id);
+ local_bh_enable();
+ if (ret == IRQ_WAKE_THREAD)
+ ret = iwl_pcie_irq_handler(irq, dev_id);
+ return ret;
+}
+#endif
+
struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
const struct pci_device_id *ent,
const struct iwl_cfg *cfg)
@@ -1493,9 +1507,14 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct
pci_dev *pdev, if (iwl_pcie_alloc_ict(trans))
goto out_free_cmd_pool;
+#ifdef CONFIG_PREEMPT_RT_BASE
+ err = request_threaded_irq(pdev->irq, NULL, iwl_rt_irq_handler,
+ IRQF_SHARED | IRQF_ONESHOT, DRV_NAME,
trans)) +#else
err = request_threaded_irq(pdev->irq, iwl_pcie_isr_ict,
iwl_pcie_irq_handler,
IRQF_SHARED, DRV_NAME, trans);
+#endif
if (err) {
IWL_ERR(trans, "Error allocating IRQ %d\n", pdev->irq);
goto out_free_ict;
Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)
Powered by blists - more mailing lists