linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Sam Bobroff <sbobroff@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org
Subject: Re: [PATCH kernel 1/2] powerpc/pseries: Remove IOMMU API support for non-LPAR systems
Date: Thu, 8 Nov 2018 16:11:53 +1100	[thread overview]
Message-ID: <20181108051153.GN5575@umbus.fritz.box> (raw)
In-Reply-To: <20181018075243.4798-2-aik@ozlabs.ru>

[-- Attachment #1: Type: text/plain, Size: 2331 bytes --]

On Thu, Oct 18, 2018 at 06:52:42PM +1100, Alexey Kardashevskiy wrote:
> The pci_dma_bus_setup_pSeries and pci_dma_dev_setup_pSeries hooks are
> registered for the pseries platform which does not have FW_FEATURE_LPAR;
> these would be pre-powernv platforms which we never supported PCI pass
> through for anyway so remove it.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
> 
> Propably should remove all pseries-but-not-lpar code.
> ---
>  arch/powerpc/platforms/pseries/iommu.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
> index cf90582..eae2578 100644
> --- a/arch/powerpc/platforms/pseries/iommu.c
> +++ b/arch/powerpc/platforms/pseries/iommu.c
> @@ -648,7 +648,6 @@ static void pci_dma_bus_setup_pSeries(struct pci_bus *bus)
>  	iommu_table_setparms(pci->phb, dn, tbl);
>  	tbl->it_ops = &iommu_table_pseries_ops;
>  	iommu_init_table(tbl, pci->phb->node);
> -	iommu_register_group(pci->table_group, pci_domain_nr(bus), 0);
>  
>  	/* Divide the rest (1.75GB) among the children */
>  	pci->phb->dma_window_size = 0x80000000ul;
> @@ -759,10 +758,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)
>  		iommu_table_setparms(phb, dn, tbl);
>  		tbl->it_ops = &iommu_table_pseries_ops;
>  		iommu_init_table(tbl, phb->node);
> -		iommu_register_group(PCI_DN(dn)->table_group,
> -				pci_domain_nr(phb->bus), 0);
>  		set_iommu_table_base(&dev->dev, tbl);
> -		iommu_add_device(&dev->dev);
>  		return;
>  	}
>  
> @@ -773,11 +769,10 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)
>  	while (dn && PCI_DN(dn) && PCI_DN(dn)->table_group == NULL)
>  		dn = dn->parent;
>  
> -	if (dn && PCI_DN(dn)) {
> +	if (dn && PCI_DN(dn))
>  		set_iommu_table_base(&dev->dev,
>  				PCI_DN(dn)->table_group->tables[0]);
> -		iommu_add_device(&dev->dev);
> -	} else
> +	else
>  		printk(KERN_WARNING "iommu: Device %s has no iommu table\n",
>  		       pci_name(dev));
>  }

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-11-08  6:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18  7:52 [PATCH kernel 0/2] powerpc/iommu: Redo iommu groups Alexey Kardashevskiy
2018-10-18  7:52 ` [PATCH kernel 1/2] powerpc/pseries: Remove IOMMU API support for non-LPAR systems Alexey Kardashevskiy
2018-11-08  5:11   ` David Gibson [this message]
2018-10-18  7:52 ` [PATCH kernel 2/2] powerpc/powernv/pseries: Rework device adding to IOMMU groups Alexey Kardashevskiy
2018-11-08  5:18   ` David Gibson

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=20181108051153.GN5575@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=aik@ozlabs.ru \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=sbobroff@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).