Messages in this thread | | | From | Thomas Gleixner <> | Subject | Re: [PATCH v2] xtensa/mm/highmem: Make generic kmap_atomic() work correctly | Date | Mon, 16 Nov 2020 21:16:34 +0100 |
| |
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
| |