Re: [PATCH v6 04/11] swiotlb: Map the buffer if it was unmapped by XPFO

From: Tycho Andersen
Date: Thu Sep 07 2017 - 14:44:24 EST


On Thu, Sep 07, 2017 at 11:10:15AM -0700, Christoph Hellwig wrote:
> > - if (PageHighMem(pfn_to_page(pfn))) {
> > + if (PageHighMem(page) || xpfo_page_is_unmapped(page)) {
>
> Please don't sprinkle xpfo details over various bits of code.
>
> Just add a helper with a descriptive name, e.g.
>
> page_is_unmapped()
>
> that also includes the highmem case, as that will easily document
> what this check is doing.

Will do, thanks.

Patch 7 has a similar feel to this one, I can add a wrapper around
__clean_dcache_area_pou() if that makes sense?

Tycho