LoongArch: Add writecombine support for DMW-based ioremap()
authorHuacai Chen <chenhuacai@loongson.cn>
Sat, 20 Jul 2024 14:40:59 +0000 (22:40 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Sat, 20 Jul 2024 14:40:59 +0000 (22:40 +0800)
commit8e02c3b782ec64343f3cccc8dc5a8be2b379e80b
treeb3dea31c724b20becad2cd2a892b304234573457
parent614d7e99752e02ff6f6d447a83d2929b9649b6cb
LoongArch: Add writecombine support for DMW-based ioremap()

Currently, only TLB-based ioremap() support writecombine, so add the
counterpart for DMW-based ioremap() with help of DMW2. The base address
(WRITECOMBINE_BASE) is configured as 0xa000000000000000.

DMW3 is unused by kernel now, however firmware may leave garbage in them
and interfere kernel's address mapping. So clear it as necessary.

BTW, centralize the DMW configuration to macro SETUP_DMWINS.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/include/asm/addrspace.h
arch/loongarch/include/asm/io.h
arch/loongarch/include/asm/loongarch.h
arch/loongarch/include/asm/stackframe.h
arch/loongarch/kernel/head.S
arch/loongarch/power/suspend_asm.S
drivers/firmware/efi/libstub/loongarch.c