From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] iommu/arm-smmu: avoid calling request_irq in atomic context
Date: Sat, 26 Jul 2014 10:18:17 +0100 [thread overview]
Message-ID: <20140726091817.GA20396@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1406330819-25323-1-git-send-email-mitchelh@codeaurora.org>
On Fri, Jul 25, 2014 at 04:26:59PM -0700, Mitchel Humpherys wrote:
> - irq = smmu->irqs[smmu->num_global_irqs + cfg->irptndx];
> - ret = request_irq(irq, arm_smmu_context_fault, IRQF_SHARED,
> - "arm-smmu-context-fault", domain);
> - if (IS_ERR_VALUE(ret)) {
> - dev_err(smmu->dev, "failed to request context IRQ %d (%u)\n",
> - cfg->irptndx, irq);
> - cfg->irptndx = INVALID_IRPTNDX;
> - goto out_free_context;
> - }
> -
> smmu_domain->smmu = smmu;
> arm_smmu_init_context_bank(smmu_domain);
> return 0;
> -
> -out_free_context:
> - __arm_smmu_free_bitmap(smmu->context_map, cfg->cbndx);
> - return ret;
This returns 'ret' from request_irq.
> + ret = request_irq(irq, arm_smmu_context_fault, IRQF_SHARED,
> + "arm-smmu-context-fault", domain);
> + if (IS_ERR_VALUE(ret)) {
> + dev_err(smmu->dev, "failed to request context IRQ %d (%u)\n",
> + cfg->irptndx, irq);
> + cfg->irptndx = INVALID_IRPTNDX;
> + return -ENODEV;
This returns -ENODEV instead.
> + }
> +
> /* Looks ok, so add the device to the domain */
> - cfg = find_smmu_master_cfg(smmu_domain->smmu, dev);
> - if (!cfg)
> + master_cfg = find_smmu_master_cfg(smmu_domain->smmu, dev);
> + if (!master_cfg)
> return -ENODEV;
If this fails, we exit leaving the interrupt registered. This is a
bug introduced by this change.
--
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2014-07-26 9:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 23:26 [PATCH] iommu/arm-smmu: avoid calling request_irq in atomic context Mitchel Humpherys
2014-07-26 9:18 ` Russell King - ARM Linux [this message]
2014-07-28 16:56 ` Will Deacon
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=20140726091817.GA20396@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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).