Re: [PATCH] highmem: fix highmem for xtensa
From: Max Filippov
Date: Fri Nov 13 2020 - 11:34:34 EST
On Fri, Nov 13, 2020 at 6:36 AM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> On Fri, Nov 13 2020 at 05:50, Max Filippov wrote:
> > On Fri, Nov 13, 2020 at 5:40 AM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> >> What's wrong with just doing the obvious and making the fixmap defines
> >> the other way round?
> >
> > It becomes really awkward when we get to support high memory with
> > aliasing data cache: we must think about the actual virtual addresses
> > assigned to pages and it feels much simpler when it's done this way.
>
> Feeling are not really a technical argument. Is there any functional
> difference which matters?
arch_kmap_local_map_idx must produce index based on type and
pfn that will be translated to virtual address with the same color this
page would've had if it was in the low memory. With positive fixmap
the formula is: (type * (number of cache colors)) + (color of the pfn).
With negative fixmap there must be additional +1 and -1 in it.
--
Thanks.
-- Max