[lkml]   [2017]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] staging: vc04_services: Fix bulk cache maintenance
On 04/05/2017 18:51, Stefan Wahren wrote:
>> Phil Elwell <> hat am 4. Mai 2017 um 11:58 geschrieben:
>> vchiq_arm supports transfers less than one page and at arbitrary
>> alignment, using the dma-mapping API to perform its cache maintenance
>> (even though the VPU drives the DMA hardware). Read (DMA_FROM_DEVICE)
>> operations use cache invalidation for speed, falling back to
>> clean+invalidate on partial cache lines, with writes (DMA_TO_DEVICE)
>> using flushes.
>> If a read transfer has ends which aren't page-aligned, performing cache
>> maintenance as if they were whole pages can lead to memory corruption
>> since the partial cache lines at the ends (and any cache lines before or
>> after the transfer area) will be invalidated. This bug was masked until
>> the disabling of the cache flush in flush_dcache_page().
>> Honouring the requested transfer start- and end-points prevents the
>> corruption.
>> Fixes: cf9caf192988 ("staging: vc04_services: Replace dmac_map_area with dmac_map_sg")
>> Signed-off-by: Phil Elwell <>
> Reported-by: Stefan Wahren <>
> Tested-by: Stefan Wahren <>
> In order to clarify the context of this issue:

Thanks, Stefan.

Is there no feedback other on this patch? It's been in the rpi-4.11.y downstream
branch for a week now with favourable results - see issue and pr


 \ /
  Last update: 2017-05-10 21:21    [W:0.053 / U:4.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site