Re: [PATCH 7/8] powerpc: use the newly added get_required_maskdma_map_ops hook

From: Geert Uytterhoeven
Date: Thu May 12 2011 - 01:51:37 EST


On Thu, May 12, 2011 at 00:25, Nishanth Aravamudan <nacc@xxxxxxxxxx> 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?

> +}
> +
> Âstatic struct dma_map_ops ps3_sb_dma_ops = {
> Â Â Â Â.alloc_coherent = ps3_alloc_coherent,
> Â Â Â Â.free_coherent = ps3_free_coherent,
> Â Â Â Â.map_sg = ps3_sb_map_sg,
> Â Â Â Â.unmap_sg = ps3_sb_unmap_sg,
> Â Â Â Â.dma_supported = ps3_dma_supported,
> + Â Â Â .get_required_mask = ps3_dma_get_required_mask,
> Â Â Â Â.map_page = ps3_sb_map_page,
> Â Â Â Â.unmap_page = ps3_unmap_page,
> Â};
> @@ -711,6 +717,7 @@ static struct dma_map_ops ps3_ioc0_dma_ops = {
> Â Â Â Â.map_sg = ps3_ioc0_map_sg,
> Â Â Â Â.unmap_sg = ps3_ioc0_unmap_sg,
> Â Â Â Â.dma_supported = ps3_dma_supported,
> + Â Â Â .get_required_mask = ps3_dma_get_required_mask,
> Â Â Â Â.map_page = ps3_ioc0_map_page,
> Â Â Â Â.unmap_page = ps3_unmap_page,
> Â};

Gr{oetje,eeting}s,

            Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
             Â Â -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/