[PATCH 7/8] powerpc: use the newly added get_required_mask dma_map_ops hook

Geert Uytterhoeven geert at linux-m68k.org
Thu May 12 15:51:32 EST 2011


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

> +}
> +
>  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 at linux-m68k.org

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


More information about the Linuxppc-dev mailing list