From: joro@8bytes.org (Joerg Roedel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/3] iommu/rockchip: rk3288 iommu driver
Date: Wed, 22 Oct 2014 17:12:54 +0200 [thread overview]
Message-ID: <20141022151254.GJ10074@8bytes.org> (raw)
In-Reply-To: <1413273762-32489-2-git-send-email-djkurtz@chromium.org>
On Tue, Oct 14, 2014 at 04:02:40PM +0800, Daniel Kurtz wrote:
> +static void rk_iommu_detach_device(struct iommu_domain *domain,
> + struct device *dev)
> +{
> + struct rk_iommu *iommu = dev_get_drvdata(dev->archdata.iommu);
> + struct rk_iommu_domain *rk_domain = domain->priv;
> + unsigned long flags;
> +
> + /* Allow 'virtual devices' (eg drm) to detach from domain */
> + if (!iommu)
> + return;
> +
> + iommu->domain = NULL;
I guess this line is a left-over? Setting iommu->domain to NULL here
before you disabled the IOMMU interrupt is racy. To be fully secure, you
should make sure that no interrupt handler is still running after you
disabled the IOMMU irq and before setting iommu->domain = NULL.
Other than that the code looks good.
Joerg
next prev parent reply other threads:[~2014-10-22 15:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1413273762-32489-1-git-send-email-djkurtz@chromium.org>
2014-10-14 8:02 ` [PATCH v5 1/3] iommu/rockchip: rk3288 iommu driver Daniel Kurtz
2014-10-17 2:22 ` Daniel Kurtz
2014-10-17 8:36 ` Joerg Roedel
2014-10-22 15:12 ` Joerg Roedel [this message]
2014-10-14 8:02 ` [PATCH v5 3/3] ARM: dts: rk3288: add VOP iommu nodes Daniel Kurtz
[not found] <1414136029-22695-1-git-send-email-djkurtz@chromium.org>
2014-10-24 7:33 ` [PATCH v5 1/3] iommu/rockchip: rk3288 iommu driver Daniel Kurtz
2014-10-26 20:32 ` Heiko Stübner
2014-10-27 10:08 ` Daniel Kurtz
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=20141022151254.GJ10074@8bytes.org \
--to=joro@8bytes.org \
--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).