On Mon, Nov 16 2020 at 11:32, Max Filippov wrote:
> From: Thomas Gleixner <t...@linutronix.de>
>
> The conversion to the generic kmap_atomic() implementation missed the fact
> that xtensa's fixmap works bottom up while all other implementations work
> top down. There is no real reason why xtensa needs to work that way.
>
> Cure it by:
>
>   - Using the generic fix_to_virt()/virt_to_fix() functions which work top
>     down
>   - Adjusting the mapping defines
>   - Using the generic index calculation for the non cache aliasing case
>   - Making the cache colour offset reverse so the effective index is correct
>
> While at it, remove the outdated and misleading comment above the fixmap
> enum which originates from the initial copy&pasta of this code from i386.
>
> Reported-by: Max Filippov <jcmvb...@gmail.com>
> Fixes: 629ed3f7dad2 ("xtensa/mm/highmem: Switch to generic kmap atomic")
> Signed-off-by: Thomas Gleixner <t...@linutronix.de>
> Signed-off-by: Max Filippov <jcmvb...@gmail.com>
> Tested-by: Max Filippov <jcmvb...@gmail.com>
> ---
> Changes v1->v2:
> - fix off-by-one error in kmap_idx calculation

Duh. Indeed.

Thanks for following up and helping with this. Much appreciated!

     tglx

Reply via email to