From: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
To: Mitchel Humpherys <mitchelh-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Cc: "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
Russell King - ARM Linux
<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH v4] iommu/arm-smmu: avoid calling request_irq in atomic context
Date: Thu, 31 Jul 2014 19:30:22 +0100 [thread overview]
Message-ID: <20140731183021.GJ26853@arm.com> (raw)
In-Reply-To: <1406743093-17227-1-git-send-email-mitchelh-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
On Wed, Jul 30, 2014 at 06:58:13PM +0100, Mitchel Humpherys wrote:
> request_irq shouldn't be called from atomic context since it might
> sleep, but we're calling it with a spinlock held, resulting in:
[...]
> @@ -900,22 +905,23 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
> cfg->irptndx = cfg->cbndx;
> }
>
> + ACCESS_ONCE(smmu_domain->smmu) = smmu;
> + arm_smmu_init_context_bank(smmu_domain);
> + spin_unlock_irqrestore(&smmu_domain->lock, flags);
> +
> irq = smmu->irqs[smmu->num_global_irqs + cfg->irptndx];
> ret = request_irq(irq, arm_smmu_context_fault, IRQF_SHARED,
> - "arm-smmu-context-fault", domain);
> + "arm-smmu-context-fault", smmu_domain);
This blew up in testing since we free_irq using the iommu_domain as the
token, so we should leave the domain parameter as it is (not actually
sure why this got changed). No need to resend anything, I'll fix it
locally.
Cheers,
Will
WARNING: multiple messages have this Message-ID (diff)
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4] iommu/arm-smmu: avoid calling request_irq in atomic context
Date: Thu, 31 Jul 2014 19:30:22 +0100 [thread overview]
Message-ID: <20140731183021.GJ26853@arm.com> (raw)
In-Reply-To: <1406743093-17227-1-git-send-email-mitchelh@codeaurora.org>
On Wed, Jul 30, 2014 at 06:58:13PM +0100, Mitchel Humpherys wrote:
> request_irq shouldn't be called from atomic context since it might
> sleep, but we're calling it with a spinlock held, resulting in:
[...]
> @@ -900,22 +905,23 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
> cfg->irptndx = cfg->cbndx;
> }
>
> + ACCESS_ONCE(smmu_domain->smmu) = smmu;
> + arm_smmu_init_context_bank(smmu_domain);
> + spin_unlock_irqrestore(&smmu_domain->lock, flags);
> +
> irq = smmu->irqs[smmu->num_global_irqs + cfg->irptndx];
> ret = request_irq(irq, arm_smmu_context_fault, IRQF_SHARED,
> - "arm-smmu-context-fault", domain);
> + "arm-smmu-context-fault", smmu_domain);
This blew up in testing since we free_irq using the iommu_domain as the
token, so we should leave the domain parameter as it is (not actually
sure why this got changed). No need to resend anything, I'll fix it
locally.
Cheers,
Will
next prev parent reply other threads:[~2014-07-31 18:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-30 17:58 [PATCH v4] iommu/arm-smmu: avoid calling request_irq in atomic context Mitchel Humpherys
2014-07-30 17:58 ` Mitchel Humpherys
[not found] ` <1406743093-17227-1-git-send-email-mitchelh-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-07-31 13:22 ` Will Deacon
2014-07-31 13:22 ` Will Deacon
2014-07-31 18:30 ` Will Deacon [this message]
2014-07-31 18:30 ` 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=20140731183021.GJ26853@arm.com \
--to=will.deacon-5wv7dgnigg8@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=mitchelh-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.