[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <geert-ps3-iommu@mdm.bga.com>
Date: Thu, 12 May 2011 02:32:37 -0500
From: Milton Miller <miltonm@....com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Nishanth Aravamudan <nacc@...ibm.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Arnd Bergmann <arnd@...db.de>,
Geoff Levand <geoff@...radead.org>,
Grant Likely <grant.likely@...retlab.ca>,
Andrew Morton <akpm@...ux-foundation.org>,
FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
"H. Peter Anvin" <hpa@...or.com>,
"David S. Miller" <davem@...emloft.net>,
Sean MacLennan <smaclennan@...atech.com>,
Greg Kroah-Hartman <gregkh@...e.de>,
Will Schmidt <will_schmidt@...t.ibm.com>,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
cbe-oss-dev@...ts.ozlabs.org
Subject: Re: [PATCH 7/8] powerpc: use the newly added get_required_mask
dma_map_ops hook
> On Thu, May 12, 2011 at 00:25, Nishanth Aravamudan <nacc@...ibm.com> wrote:
> > diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
> > index 23083c3..688141c 100644
> > --- a/arch/powerpc/platforms/ps3/system-bus.c
> > +++ b/arch/powerpc/platforms/ps3/system-bus.c
> > @@ -695,12 +695,18 @@ static int ps3_dma_supported(struct device *_dev, u64 mask)
> > return mask >= DMA_BIT_MASK(32);
> > }
> >
> > +static u64 ps3_dma_get_required_mask(struct device *_dev)
> > +{
> > + return DMA_BIT_MASK(32);
>
> Why 32 and not 64?
I based it on the return of ps3_dma_supported, which you can see just
above says anything at or above a 32 bit mask is ok.
I don't really know the platform, but digging a bit deeper, it looks
like this goes to ps3_map_dma in ps3/mm.c. It looks like that translates
the virt to phys to lpar (similar to absolute in iseries), and the
maps it to a bus address by a linear mapping. But no where do I see
mention of a device dma mask (neither in mm.c or system-dev.c (except
for the ps3_dma_supported local), so I assume that 32 bits is sufficient
for any device. It appears to me the code establishs a 1:1 mapping
of all possible memory with no provision for allocating blocks or
checking that a bus address belongs to another memory segment.
Feel free to point out any errors in the above analysis, otherwise
I assume the required mask matches the dma_supported op.
Does the lv1 hypervisor offer more than 4G of memory to the lpar?
milton
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists