[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181101083346.GA7136@lst.de>
Date: Thu, 1 Nov 2018 09:33:46 +0100
From: Christoph Hellwig <hch@....de>
To: "Maciej W. Rozycki" <macro@...ux-mips.org>
Cc: Christoph Hellwig <hch@....de>, Paul Burton <paul.burton@...s.com>,
iommu@...ts.linux-foundation.org,
Marek Szyprowski <m.szyprowski@...sung.com>,
Robin Murphy <robin.murphy@....com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH] MIPS: Fix `dma_alloc_coherent' returning a
non-coherent allocation
On Thu, Nov 01, 2018 at 07:54:24AM +0000, Maciej W. Rozycki wrote:
> Fix a MIPS `dma_alloc_coherent' regression from commit bc3ec75de545
> ("dma-mapping: merge direct and noncoherent ops") that causes a cached
> allocation to be returned on noncoherent cache systems.
>
> This is due to an inverted check now used in the MIPS implementation of
> `arch_dma_alloc' on the result from `dma_direct_alloc_pages' before
> doing the cached-to-uncached mapping of the allocation address obtained.
> The mapping has to be done for a non-NULL rather than NULL result,
> because a NULL result means the allocation has failed.
>
> Invert the check for correct operation then.
>
> Signed-off-by: Maciej W. Rozycki <macro@...ux-mips.org>
> Fixes: bc3ec75de545 ("dma-mapping: merge direct and noncoherent ops")
> Cc: stable@...r.kernel.org # 4.19+
Oops, yes this looks good:
Reviewed-by: Christoph Hellwig <hch@....de>
Powered by blists - more mailing lists