[PATCH 2/3] powerpc: setup archdata for {of_}platform via a single platform_notify

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Mar 4 15:56:11 EST 2009


On Thu, 2009-02-19 at 14:49 -0600, Kumar Gala wrote:
> Since a number of powerpc chips are SoCs we end up having dma-able
> devices that are registered as platform or of_platform devices.  We need
> to hook the archdata to setup proper dma_ops for these devices.
> 
> In the short term the majority of these devices only need the
> direct_dma_ops as the platforms don't have any IOMMUs.
> 
> In the future to enable >4G DMA support on ppc32 we can hook swiotlb ops.

I'm trying to figure out why I didn't use platform_notify back when I
did cell blades support and instead added the per-bus type notifier
support. I think I wanted to avoid the compare with bus types thingy
which somewhat suck.

Can't we do something akin to what the Cell IOMMU code does and just
have the platform code register a notifier for those bus types that
fill things up ?

IE. With this patch, if I'm not mistaken, on Cell blades, things will
start with a dma_direct_ops (which is bogus) and then end up being
hopefully "fixed up" by the iommu code. A bit weird.

Cheers,
Ben.





More information about the Linuxppc-dev mailing list