Re: [PATCH v2] arm64: dma-mapping: Fix dma_mapping_error() when bypassing SWIOTLB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2017-01-25 at 19:14 +0000, Robin Murphy wrote:
> [ +Michael - FYI this is straight on top of 4.10-rc5 ]
> 
> On 25/01/17 18:31, Robin Murphy wrote:
> > When bypassing SWIOTLB on small-memory systems, we need to avoid
> > calling
> > into swiotlb_dma_mapping_error() in exactly the same way as we
> > avoid
> > swiotlb_dma_supported(), because the former also relies on SWIOTLB
> > state
> > being initialised.
> > 
> > Under the assumptions for which we skip SWIOTLB,
> > dma_map_{single,page}()
> > will only ever return the DMA-offset-adjusted physical address of
> > the
> > page passed in, thus we can report success unconditionally.
> > 
> > Fixes: b67a8b29df7e ("arm64: mm: only initialize swiotlb when
> > necessary")
> > CC: stable@xxxxxxxxxxxxxxx
> > CC: Jisheng Zhang <jszhang@xxxxxxxxxxx>
> > Reported-by: Aaro Koskinen <aaro.koskinen@xxxxxx>
> > Signed-off-by: Robin Murphy <robin.murphy@xxxxxxx>
> > ---
> > 
> > v2: Get the return value the right way round this time... After
> > some
> >     careful reasoning it really is that simple.
> > 
> >  arch/arm64/mm/dma-mapping.c | 9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> > 

I was able to build it and it works. Cool.

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]