linux/arch/xtensa
Thomas Gleixner 1eb0616c2d xtensa/mm/highmem: Make generic kmap_atomic() work correctly
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.

[ Max: Fixed the off by one in the index calculation ]

Fixes: 629ed3f7da ("xtensa/mm/highmem: Switch to generic kmap atomic")
Reported-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Max Filippov <jcmvbkbc@gmail.com>
Link: https://lore.kernel.org/r/20201116193253.23875-1-jcmvbkbc@gmail.com
2020-11-16 21:19:24 +01:00
..
boot Kbuild updates for v5.9 2020-08-09 14:10:26 -07:00
configs xtensa: reorganize vectors placement 2020-02-04 21:57:02 -08:00
include xtensa/mm/highmem: Make generic kmap_atomic() work correctly 2020-11-16 21:19:24 +01:00
kernel treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
lib xtensa: propagate the calling conventions change down into csum_partial_copy_generic() 2020-08-20 15:45:21 -04:00
mm xtensa/mm/highmem: Make generic kmap_atomic() work correctly 2020-11-16 21:19:24 +01:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
platforms xtensa/simdisk: remove the call to check_disk_change 2020-07-08 16:20:01 -06:00
variants xtensa: add test_kc705_be variant 2018-08-20 12:34:45 -07:00
Kconfig xtensa/mm/highmem: Switch to generic kmap atomic 2020-11-06 23:14:57 +01:00
Kconfig.debug xtensa: make stack dump size configurable 2019-11-26 11:33:39 -08:00
Makefile xtensa: add XIP kernel support 2019-11-26 11:33:38 -08:00