[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9f28b833-5813-4e5d-b705-eed9a2a31863@samsung.com>
Date: Thu, 8 Jan 2026 13:41:27 +0100
From: Marek Szyprowski <m.szyprowski@...sung.com>
To: Robin Murphy <robin.murphy@....com>, "Aneesh Kumar K.V (Arm)"
<aneesh.kumar@...nel.org>, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org
Cc: Arnd Bergmann <arnd@...nel.org>, Linus Walleij <linusw@...nel.org>,
Matthew Wilcox <willy@...radead.org>, Suzuki K Poulose
<suzuki.poulose@....com>
Subject: Re: [PATCH] dma-direct: Skip cache prep for HighMem coherent
allocations
On 08.01.2026 11:50, Robin Murphy wrote:
> On 2026-01-02 3:51 pm, Aneesh Kumar K.V (Arm) wrote:
>> dma_direct_alloc() calls arch_dma_prep_coherent() to clean any dirty
>> cache lines from the kernel linear alias before creating a coherent
>> remapping.
>>
>> HighMem pages have no kernel alias mapping, so there are no alias cache
>> lines to clean. Skip arch_dma_prep_coherent() for HighMem allocations.
>
> This is assuming that caches are always cleaned when unmapping
> highmem, and no still-mapped highmem pages are dirty - how is that
> guaranteed? The fact that they're not in the linear map doesn't mean
> they don't necessarily have kernel aliases in either vmalloc
> pagetables or caches.
Right, so it is better to keep this unconditional
arch_dma_prep_coherent() call. I will drop it from dma-mapping-fixes then.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
Powered by blists - more mailing lists