From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: Anna-Maria Gleixner <anna-maria-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org
Subject: Re: [PATCH] iommu/amd: Remove redundant WARN_ON()
Date: Fri, 20 Jul 2018 14:36:42 +0200 [thread overview]
Message-ID: <20180720123641.GE18541@8bytes.org> (raw)
In-Reply-To: <20180720084545.3284-1-anna-maria-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
On Fri, Jul 20, 2018 at 10:45:45AM +0200, Anna-Maria Gleixner wrote:
> The WARN_ON() was introduced in commit 272e4f99e966 ("iommu/amd: WARN
> when __[attach|detach]_device are called with irqs enabled") to ensure
> that the domain->lock is taken in proper irqs disabled context. This
> is required, because the domain->lock is taken as well in irq
> context.
>
> The proper context check by the WARN_ON() is redundant, because it is
> already covered by LOCKDEP. When working with locks and changing
> context, a run with LOCKDEP is required anyway and would detect the
> wrong lock context.
>
> Furthermore all callers for those functions are within the same file
> and all callers acquire another lock which already disables interrupts.
>
> Signed-off-by: Anna-Maria Gleixner <anna-maria-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
> ---
> drivers/iommu/amd_iommu.c | 12 ------------
> 1 file changed, 12 deletions(-)
Applied, thanks.
prev parent reply other threads:[~2018-07-20 12:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-20 8:45 [PATCH] iommu/amd: Remove redundant WARN_ON() Anna-Maria Gleixner
[not found] ` <20180720084545.3284-1-anna-maria-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2018-07-20 12:36 ` Joerg Roedel [this message]
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=20180720123641.GE18541@8bytes.org \
--to=joro-zlv9swrftaidnm+yrofe0a@public.gmane.org \
--cc=anna-maria-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@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.