lkml.org 
[lkml]   [2020]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] xtensa/mm/highmem: Make generic kmap_atomic() work correctly
Date
On Mon, Nov 16 2020 at 11:32, Max Filippov wrote:
> From: Thomas Gleixner <tglx@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 <jcmvbkbc@gmail.com>
> Fixes: 629ed3f7dad2 ("xtensa/mm/highmem: Switch to generic kmap atomic")
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> Tested-by: Max Filippov <jcmvbkbc@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

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