linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: sonnyrao@us.ibm.com, miltonm@bga.com,
	Paul Mackerras <paulus@samba.org>,
	Anton Blanchard <anton@samba.org>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH 3/7 v2] ppc: do not search for dma-window property on dlpar remove
Date: Mon, 29 Nov 2010 12:38:41 +1100	[thread overview]
Message-ID: <1290994721.32570.219.camel@pasglop> (raw)
In-Reply-To: <1288150518-4026-4-git-send-email-nacc@us.ibm.com>

On Tue, 2010-10-26 at 20:35 -0700, Nishanth Aravamudan wrote:
> The iommu_table pointer in the pci auxiliary struct of device_node has
> not been used by the iommu ops since the dma refactor of
> 12d04eef927bf61328af2c7cbe756c96f98ac3bf, however this code still uses
> it to find tables for dlpar. By only setting the PCI_DN iommu_table
> pointer on nodes with dma window properties, we will be able to quickly
> find the node for later checks, and can remove the table without looking
> for the the dma window property on dlpar remove.

The answer might well be yes but are we sure this works with busses &
devices that don't have a dma,window ? ie. we always properly look for
parents when assigning pci devices arch_data iommu table ? Did you test
it ? :-) (Best way is to find a card with a P2P bridge on it).

Cheers,
Ben. 

> Signed-off-by: Milton Miller <miltonm@bga.com>
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> ---
>  arch/powerpc/platforms/pseries/iommu.c |    6 +-----
>  1 files changed, 1 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
> index 9184db3..8ab32da 100644
> --- a/arch/powerpc/platforms/pseries/iommu.c
> +++ b/arch/powerpc/platforms/pseries/iommu.c
> @@ -455,9 +455,6 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus)
>  		ppci->iommu_table = iommu_init_table(tbl, ppci->phb->node);
>  		pr_debug("  created table: %p\n", ppci->iommu_table);
>  	}
> -
> -	if (pdn != dn)
> -		PCI_DN(dn)->iommu_table = ppci->iommu_table;
>  }
>  
> @@ -571,8 +568,7 @@ static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long acti
>  
>  	switch (action) {
>  	case PSERIES_RECONFIG_REMOVE:
> -		if (pci && pci->iommu_table &&
> -		    of_get_property(np, "ibm,dma-window", NULL))
> +		if (pci && pci->iommu_table)
>  			iommu_free_table(pci->iommu_table, np->full_name);
>  		break;
>  	default:

  reply	other threads:[~2010-11-29  2:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27  3:35 [RFC PATCH 0/7 v2] ppc: enable dynamic dma window support Nishanth Aravamudan
2010-10-27  3:35 ` [RFC PATCH 1/7 v2] macio: ensure all dma routines get copied over Nishanth Aravamudan
2010-10-27  3:35 ` [RFC PATCH 2/7 v2] ppc: add memory_hotplug_max Nishanth Aravamudan
2010-10-27  3:35 ` [RFC PATCH 3/7 v2] ppc: do not search for dma-window property on dlpar remove Nishanth Aravamudan
2010-11-29  1:38   ` Benjamin Herrenschmidt [this message]
2010-12-01  0:30     ` Nishanth Aravamudan
2010-12-04  0:30     ` Nishanth Aravamudan
2010-10-27  3:35 ` [RFC PATCH 4/7 v2] ppc: checking for pdn->parent is redundant Nishanth Aravamudan
2010-10-27  3:35 ` [RFC PATCH 5/7 v2] ppc/iommu: do not need to check for dma_window == NULL Nishanth Aravamudan
2010-10-27  3:35 ` [RFC PATCH 6/7 v2] ppc/iommu: pass phb only to iommu_table_setparms_lpar Nishanth Aravamudan
2010-12-09  4:24   ` Benjamin Herrenschmidt
2010-12-09 16:16     ` Nishanth Aravamudan
2010-10-27  3:35 ` [RFC PATCH 7/7 v2] ppc: add dynamic dma window support Nishanth Aravamudan
2010-12-09  4:17   ` Benjamin Herrenschmidt
2010-12-09 19:00     ` Nishanth Aravamudan
2010-12-09 19:09   ` Nishanth Aravamudan
2010-12-11  0:07     ` [PATCH 7/7 v3] " Nishanth Aravamudan
2011-01-08  2:53       ` [PATCH] ppc: update dynamic dma support Nishanth Aravamudan
2011-01-17 17:32         ` [PATCH v2] " Nishanth Aravamudan
2011-01-18  0:20           ` [PATCH v3] " Nishanth Aravamudan
2010-11-08 19:42 ` [RFC PATCH 0/7 v2] ppc: enable dynamic dma window support Nishanth Aravamudan

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=1290994721.32570.219.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=anton@samba.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=miltonm@bga.com \
    --cc=nacc@us.ibm.com \
    --cc=paulus@samba.org \
    --cc=sonnyrao@us.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).