From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Michael Ellerman <michael@ellerman.id.au>
Cc: linuxppc-dev@ozlabs.org, Arnd Bergmann <arnd.bergmann@de.ibm.com>,
cbe-oss-dev@ozlabs.org
Subject: Re: [PATCH 4/7] Have cell use its own dma_direct_offset variable
Date: Mon, 21 Jan 2008 17:21:36 +1100 [thread overview]
Message-ID: <1200896496.7222.111.camel@pasglop> (raw)
In-Reply-To: <0a87a8672c76341044ebb0231ff0c1fba4e82c36.1200894155.git.michael@ellerman.id.au>
On Mon, 2008-01-21 at 16:42 +1100, Michael Ellerman wrote:
> Rather than using the global variable, have cell use its own variable to
> store the direct DMA offset.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> arch/powerpc/platforms/cell/iommu.c | 12 +++++++-----
> 1 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
> index 9682b63..7f45d59 100644
> --- a/arch/powerpc/platforms/cell/iommu.c
> +++ b/arch/powerpc/platforms/cell/iommu.c
> @@ -490,6 +490,8 @@ static struct cbe_iommu *cell_iommu_for_node(int nid)
> return NULL;
> }
>
> +static unsigned long cell_dma_direct_offset;
> +
> static void cell_dma_dev_setup(struct device *dev)
> {
> struct iommu_window *window;
> @@ -497,7 +499,7 @@ static void cell_dma_dev_setup(struct device *dev)
> struct dev_archdata *archdata = &dev->archdata;
>
> if (get_pci_dma_ops() == &dma_direct_ops) {
> - archdata->dma_data = (void *)dma_direct_offset;
> + archdata->dma_data = (void *)cell_dma_direct_offset;
> return;
> }
>
> @@ -655,7 +657,7 @@ static int __init cell_iommu_init_disabled(void)
>
> /* If we have no Axon, we set up the spider DMA magic offset */
> if (of_find_node_by_name(NULL, "axon") == NULL)
> - dma_direct_offset = SPIDER_DMA_OFFSET;
> + cell_dma_direct_offset = SPIDER_DMA_OFFSET;
>
> /* Now we need to check to see where the memory is mapped
> * in PCI space. We assume that all busses use the same dma
> @@ -689,13 +691,13 @@ static int __init cell_iommu_init_disabled(void)
> return -ENODEV;
> }
>
> - dma_direct_offset += base;
> + cell_dma_direct_offset += base;
>
> - if (dma_direct_offset != 0)
> + if (cell_dma_direct_offset != 0)
> ppc_md.pci_dma_dev_setup = cell_pci_dma_dev_setup;
>
> printk("iommu: disabled, direct DMA offset is 0x%lx\n",
> - dma_direct_offset);
> + cell_dma_direct_offset);
>
> return 0;
> }
next prev parent reply other threads:[~2008-01-21 6:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-21 5:42 [PATCH 1/7] Set archdata.dma_data for direct DMA in cell_dma_dev_setup() Michael Ellerman
2008-01-21 5:42 ` [PATCH 2/7] Add celleb_dma_dev_setup() Michael Ellerman
2008-01-21 6:20 ` Benjamin Herrenschmidt
2008-01-21 5:42 ` [PATCH 3/7] Use archdata.dma_data in dma_direct_ops and add the offset Michael Ellerman
2008-01-21 6:21 ` Benjamin Herrenschmidt
2008-01-21 5:42 ` [PATCH 4/7] Have cell use its own dma_direct_offset variable Michael Ellerman
2008-01-21 6:21 ` Benjamin Herrenschmidt
2008-01-21 6:21 ` Benjamin Herrenschmidt [this message]
2008-01-21 5:42 ` [PATCH 5/7] Have celleb " Michael Ellerman
2008-01-21 6:21 ` Benjamin Herrenschmidt
2008-01-21 5:42 ` [PATCH 6/7] Remove the global dma_direct_offset Michael Ellerman
2008-01-21 6:21 ` Benjamin Herrenschmidt
2008-01-21 5:42 ` [PATCH 7/7] Remove bogus comment in dma_direct_alloc_coherent() Michael Ellerman
2008-01-21 6:22 ` Benjamin Herrenschmidt
2008-01-21 6:20 ` [PATCH 1/7] Set archdata.dma_data for direct DMA in cell_dma_dev_setup() Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2007-12-05 7:20 Michael Ellerman
2007-12-05 7:21 ` [PATCH 4/7] Have cell use its own dma_direct_offset variable Michael Ellerman
2007-12-05 23:40 ` Arnd Bergmann
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=1200896496.7222.111.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=arnd.bergmann@de.ibm.com \
--cc=cbe-oss-dev@ozlabs.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=michael@ellerman.id.au \
/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).