linux-stable/arch/loongarch
Huacai Chen 9d9f5b4376 LoongArch: Make WriteCombine configurable for ioremap()
commit 16c52e5030 upstream.

LoongArch maintains cache coherency in hardware, but when paired with
LS7A chipsets the WUC attribute (Weak-ordered UnCached, which is similar
to WriteCombine) is out of the scope of cache coherency machanism for
PCIe devices (this is a PCIe protocol violation, which may be fixed in
newer chipsets).

This means WUC can only used for write-only memory regions now, so this
option is disabled by default, making WUC silently fallback to SUC for
ioremap(). You can enable this option if the kernel is ensured to run on
hardware without this bug.

Kernel parameter writecombine=on/off can be used to override the Kconfig
option.

Cc: stable@vger.kernel.org
Suggested-by: WANG Xuerui <kernel@xen0n.name>
Reviewed-by: WANG Xuerui <kernel@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-26 14:30:07 +02:00
..
boot loongarch: efi: enable generic EFI compressed boot 2022-09-20 09:50:31 +02:00
configs LoongArch: Update Loongson-3 default config file 2022-12-14 08:41:54 +08:00
include LoongArch: Make WriteCombine configurable for ioremap() 2023-04-26 14:30:07 +02:00
kernel LoongArch: Make WriteCombine configurable for ioremap() 2023-04-26 14:30:07 +02:00
lib LoongArch: Use alternative to optimize libraries 2022-12-14 08:36:11 +08:00
mm LoongArch: Mark 3 symbol exports as non-GPL 2023-04-26 14:30:03 +02:00
net LoongArch, bpf: Fix jit to skip speculation barrier opcode 2023-04-20 12:36:53 +02:00
pci LoongArch: Add FDT booting support from efi system table 2022-12-14 08:41:53 +08:00
power LoongArch: Add hibernation (ACPI S4) support 2022-12-14 08:41:53 +08:00
vdso LoongArch: Fix build warnings in VDSO 2022-08-25 19:34:59 +08:00
Kbuild LoongArch: Add BPF JIT support 2022-10-12 16:36:20 +08:00
Kconfig LoongArch: Make WriteCombine configurable for ioremap() 2023-04-26 14:30:07 +02:00
Kconfig.debug LoongArch: Add prologue unwinder support 2022-08-12 13:10:11 +08:00
Makefile LoongArch: Make -mstrict-align configurable 2023-04-26 14:30:07 +02:00