mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jerry Hoemann <jerry.hoemann@hp.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: iommu@lists.linux-foundation.org,
	Alex Williamson <alex.williamson@redhat.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-kernel@vger.kernel.org, Joerg Roedel <jroedel@suse.de>,
	Myron Stowe <mstowe@redhat.com>
Subject: Re: [PATCH 2/2] iommu/vt-d: Remove dead code in device_notifier
Date: Wed, 17 Dec 2014 14:41:44 -0700	[thread overview]
Message-ID: <20141217214144.GB11569@anatevka.fc.hp.com> (raw)
In-Reply-To: <1418813017-24888-2-git-send-email-joro@8bytes.org>

On Wed, Dec 17, 2014 at 11:43:37AM +0100, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
> 
> This code only runs when action == BUS_NOTIFY_REMOVED_DEVICE,
> so it can't be BUS_NOTIFY_DEL_DEVICE.
> 
> Signed-off-by: Joerg Roedel <jroedel@suse.de>
> ---
>  drivers/iommu/intel-iommu.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
> index 7610121..40dfbc0 100644
> --- a/drivers/iommu/intel-iommu.c
> +++ b/drivers/iommu/intel-iommu.c
> @@ -4029,14 +4029,6 @@ static int device_notifier(struct notifier_block *nb,
>  	if (action != BUS_NOTIFY_REMOVED_DEVICE)
>  		return 0;
>  
> -	/*
> -	 * If the device is still attached to a device driver we can't
> -	 * tear down the domain yet as DMA mappings may still be in use.
> -	 * Wait for the BUS_NOTIFY_UNBOUND_DRIVER event to do that.
> -	 */
> -	if (action == BUS_NOTIFY_DEL_DEVICE && dev->driver != NULL)
> -		return 0;
> -
>  	domain = find_domain(dev);
>  	if (!domain)
>  		return 0;
> -- 
> 1.9.1

Joerg,

Tested this along w/ other patch of the set.

Instrumentation showed that the removed code wouldn't have been executed
during VM power on/power off.

Thanks!

Tested-by: Jerry Hoemann <jerry.hoemann@hp.com>


-- 

----------------------------------------------------------------------------
Jerry Hoemann            Software Engineer              Hewlett-Packard

3404 E Harmony Rd. MS 36                        phone:  (970) 898-1022
Ft. Collins, CO 80528                           FAX:    (970) 898-0707
                                                email:  jerry.hoemann@hp.com
----------------------------------------------------------------------------

  reply	other threads:[~2014-12-17 21:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-17 10:43 [PATCH 1/2] iommu/vt-d: Fix dmar_domain leak in iommu_attach_device Joerg Roedel
2014-12-17 10:43 ` [PATCH 2/2] iommu/vt-d: Remove dead code in device_notifier Joerg Roedel
2014-12-17 21:41   ` Jerry Hoemann [this message]
2014-12-17 21:37 ` [PATCH 1/2] iommu/vt-d: Fix dmar_domain leak in iommu_attach_device Jerry Hoemann
2015-01-05 10:59   ` Joerg Roedel

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=20141217214144.GB11569@anatevka.fc.hp.com \
    --to=jerry.hoemann@hp.com \
    --cc=alex.williamson@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mstowe@redhat.com \
    /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

all inboxes | Powered by JetHome®