Re: [PATCH 4/7] dma-direct: provide generic support for uncached kernel segments

2019-05-02 Thread Christoph Hellwig
On Thu, May 02, 2019 at 12:08:01AM +, Paul Burton wrote: > > Can you test the stack with the two updated patches and ack them if > > they are fine? That would allow getting at least the infrastructure > > and mips in for this merge window. > > Did you send a v2 of this patch? > > If so it ha

Re: [PATCH 4/7] dma-direct: provide generic support for uncached kernel segments

2019-05-01 Thread Paul Burton
Hi Christoph, On Wed, May 01, 2019 at 07:49:05PM +0200, Christoph Hellwig wrote: > On Wed, May 01, 2019 at 05:40:34PM +, Paul Burton wrote: > > > > If it is necessary then as-is this code will clear the allocated memory > > > > using uncached writes which will be pretty slow. It would be much

Re: [PATCH 4/7] dma-direct: provide generic support for uncached kernel segments

2019-05-01 Thread Christoph Hellwig
On Wed, May 01, 2019 at 05:40:34PM +, Paul Burton wrote: > > > If it is necessary then as-is this code will clear the allocated memory > > > using uncached writes which will be pretty slow. It would be much more > > > efficient to perform the memset before arch_dma_prep_coherent() & before > >

Re: [PATCH 4/7] dma-direct: provide generic support for uncached kernel segments

2019-05-01 Thread Paul Burton
Hi Christoph, On Wed, May 01, 2019 at 07:29:12PM +0200, Christoph Hellwig wrote: > On Wed, May 01, 2019 at 05:18:59PM +, Paul Burton wrote: > > I'm not so sure about this part though. > > > > On MIPS we currently don't clear the allocated memory with memset. Is > > doing that really necessary

Re: [PATCH 4/7] dma-direct: provide generic support for uncached kernel segments

2019-05-01 Thread Christoph Hellwig
On Wed, May 01, 2019 at 05:18:59PM +, Paul Burton wrote: > I'm not so sure about this part though. > > On MIPS we currently don't clear the allocated memory with memset. Is > doing that really necessary? We are clearling it on mips, it is inside dma_direct_alloc_pages. > If it is necessary t

Re: [PATCH 4/7] dma-direct: provide generic support for uncached kernel segments

2019-05-01 Thread Paul Burton
Hi Christoph, On Tue, Apr 30, 2019 at 07:00:29AM -0400, Christoph Hellwig wrote: > diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c > index 2c2772e9702a..d15a535c3e67 100644 > --- a/kernel/dma/direct.c > +++ b/kernel/dma/direct.c > @@ -164,6 +164,13 @@ void *dma_direct_alloc_pages(struct dev

[PATCH 4/7] dma-direct: provide generic support for uncached kernel segments

2019-04-30 Thread Christoph Hellwig
A few architectures support uncached kernel segments. In that case we get an uncached mapping for a given physica address by using an offset in the uncached segement. Implement support for this scheme in the generic dma-direct code instead of duplicating it in arch hooks. Signed-off-by: Christop