[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20100928090805M.fujita.tomonori@lab.ntt.co.jp>
Date: Tue, 28 Sep 2010 09:12:17 +0900
From: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To: ddaney@...iumnetworks.com
Cc: fujita.tomonori@....ntt.co.jp, linux-mips@...ux-mips.org,
ralf@...ux-mips.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/9] MIPS: Convert DMA to use dma-mapping-common.h
On Mon, 27 Sep 2010 10:35:15 -0700
David Daney <ddaney@...iumnetworks.com> wrote:
> >> diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h
> >> index 18fbf7a..9a4c307 100644
> >> --- a/arch/mips/include/asm/dma-mapping.h
> >> +++ b/arch/mips/include/asm/dma-mapping.h
> >> @@ -5,51 +5,67 @@
> >> #include<asm/cache.h>
> >> #include<asm-generic/dma-coherent.h>
> >>
> >> -void *dma_alloc_noncoherent(struct device *dev, size_t size,
> >> - dma_addr_t *dma_handle, gfp_t flag);
> >> +struct mips_dma_map_ops {
> >> + struct dma_map_ops dma_map_ops;
> >> + dma_addr_t (*phys_to_dma)(struct device *dev, phys_addr_t paddr);
> >> + phys_addr_t (*dma_to_phys)(struct device *dev, dma_addr_t daddr);
> >> +};
> >
> > The above code doesn't look great but we don't want to add phys_to_dma
> > and dma_to_phys to dma_map_ops struct, and these functions on MIPS
> > looks too complicated for ifdef. So I guess that we need to live with
> > the above code.
> >
>
> I think you have a point here. I will attempt to move these two into a
> chip specific operations vector, and leave the more generic MIPS version
> with the simplified static definition.
Yeah, that sounds a better (cleaner) approach.
--
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