From: Clark Williams <williams@redhat.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: RT <linux-rt-users@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 3.12.0-rt1: net: iwlwifi request only a threaded handler for interrupts
Date: Tue, 12 Nov 2013 23:31:13 -0600 [thread overview]
Message-ID: <20131112233113.3a5d043c@sluggy> (raw)
In-Reply-To: <20131112131659.578eb7c1@sluggy>
[-- Attachment #1: Type: text/plain, Size: 2555 bytes --]
On Tue, 12 Nov 2013 13:16:59 -0600
Clark Williams <williams@redhat.com> wrote:
> Sebastian,
>
> I needed this for my laptop on 3.12, so tweaked it to apply properly.
>
> Clark
>
So of course I sent the wrong patch:
commit 49d487614d56bc10969dd0dcbce709825fc06d0e
Author: Clark Williams <clark.williams@gmail.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@linutronix.de>
Signed-off-by: Clark Williams <clark.williams@gmail.com>
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
index c3f904d..60df2c1 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,15 @@ 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;
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2013-11-13 5:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-12 19:16 [PATCH] 3.12.0-rt1: net: iwlwifi request only a threaded handler for interrupts Clark Williams
2013-11-13 5:31 ` Clark Williams [this message]
2013-11-13 9:08 ` Sebastian Andrzej Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131112233113.3a5d043c@sluggy \
--to=williams@redhat.com \
--cc=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).