mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: "Roedel, Joerg" <Joerg.Roedel@amd.com>
Cc: Florian Dazinger <florian@dazinger.net>,
	linux-kernel@vger.kernel.org,
	iommu <iommu@lists.linux-foundation.org>
Subject: Re: 3.6-rc7 boot crash + bisection
Date: Wed, 26 Sep 2012 08:52:01 -0600	[thread overview]
Message-ID: <1348671121.28860.186.camel@bling.home> (raw)
In-Reply-To: <20120926144345.GC10549@amd.com>

On Wed, 2012-09-26 at 16:43 +0200, Roedel, Joerg wrote:
> Florian,
> 
> On Wed, Sep 26, 2012 at 01:01:54AM +0200, Florian Dazinger wrote:
> > you're right, either "amd_iommu=off" or removing the audio card makes
> > the failure disappear. I will test the new BIOS rev. tomorrow.
> 
> Can you please test this diff and report if it fixes the problem for
> you?
> 
> Thanks.
> 
> diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
> index b64502d..e89daf1 100644
> --- a/drivers/iommu/amd_iommu.c
> +++ b/drivers/iommu/amd_iommu.c
> @@ -266,7 +266,7 @@ static void swap_pci_ref(struct pci_dev **from, struct pci_dev *to)
>  
>  static int iommu_init_device(struct device *dev)
>  {
> -	struct pci_dev *dma_pdev, *pdev = to_pci_dev(dev);
> +	struct pci_dev *dma_pdev = NULL, *pdev = to_pci_dev(dev);
>  	struct iommu_dev_data *dev_data;
>  	struct iommu_group *group;
>  	u16 alias;
> @@ -293,7 +293,9 @@ static int iommu_init_device(struct device *dev)
>  		dev_data->alias_data = alias_data;
>  
>  		dma_pdev = pci_get_bus_and_slot(alias >> 8, alias & 0xff);
> -	} else
> +	}
> +
> +	if (dma_pdev == NULL)
>  		dma_pdev = pci_dev_get(pdev);
>  
>  	/* Account for quirked devices */
> 

Assuming this works, it may be ok as a 3.7 fix, but if there was
actually more than one device behind the alias we'd expose them as
separate iommu groups.  I don't think that's what we want.  Maybe it
should at least get a pr_warn.  Thanks,

Alex


  reply	other threads:[~2012-09-26 14:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-24 19:03 Florian Dazinger
2012-09-25 18:32 ` Alex Williamson
2012-09-25 18:42   ` Alex Williamson
2012-09-25 18:54   ` Florian Dazinger
2012-09-25 19:43     ` Alex Williamson
2012-09-25 23:01       ` Florian Dazinger
2012-09-26  3:12         ` Alex Williamson
2012-09-26 14:43         ` Roedel, Joerg
2012-09-26 14:52           ` Alex Williamson [this message]
2012-09-26 15:04             ` Roedel, Joerg
2012-09-26 16:13               ` Alex Williamson
2012-09-26 16:43               ` Florian Dazinger
2012-09-26 17:47               ` Florian Dazinger
2012-09-26 13:20       ` Roedel, Joerg
2012-09-26 14:35         ` Alex Williamson
2012-09-26 15:10           ` Roedel, Joerg
2012-09-26 16:21             ` Alex Williamson
2012-09-26 19:50               ` Alex Williamson
2012-09-26 22:04                 ` Alex Williamson
2012-09-27 16:22                   ` Florian Dazinger
2012-09-28 13:58                   ` Roedel, Joerg

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=1348671121.28860.186.camel@bling.home \
    --to=alex.williamson@redhat.com \
    --cc=Joerg.Roedel@amd.com \
    --cc=florian@dazinger.net \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®