summaryrefslogtreecommitdiffstats
path: root/arch/nds32/include
diff options
context:
space:
mode:
authorGreentime Hu2018-04-30 09:02:27 +0200
committerGreentime Hu2018-05-23 07:26:22 +0200
commitabb90a24eade1f612324de0e6920041ef64795cb (patch)
tree67f24bc5d0c844db9c5d3f4c8aabe9d66e464273 /arch/nds32/include
parentnds32: To refine readability of INT_MASK_INITAIAL_VAL (diff)
downloadkernel-qcow2-linux-abb90a24eade1f612324de0e6920041ef64795cb.tar.gz
kernel-qcow2-linux-abb90a24eade1f612324de0e6920041ef64795cb.tar.xz
kernel-qcow2-linux-abb90a24eade1f612324de0e6920041ef64795cb.zip
nds32: To fix a cache inconsistency issue by setting correct cacheability of NTC
The nds32 architecture will use physical memory when interrupt or exception comes and it will use the setting of NTC0-4. The original implementation didn't consider the DRAM start address may start from 1GB, 2GB or 3GB to cause this issue. It will write the data to DRAM if it is running in physical address however kernel will read the data with virtaul address through data cache. In this case, the data of DRAM is latest. This fix will set the correct cacheability to let kernel write/read the latest data in cache instead of DRAM. Signed-off-by: Greentime Hu <greentime@andestech.com>
Diffstat (limited to 'arch/nds32/include')
-rw-r--r--arch/nds32/include/asm/bitfield.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/nds32/include/asm/bitfield.h b/arch/nds32/include/asm/bitfield.h
index 28b7d797fd59..8e84fc385b94 100644
--- a/arch/nds32/include/asm/bitfield.h
+++ b/arch/nds32/include/asm/bitfield.h
@@ -396,6 +396,7 @@
#define MMU_CTL_D8KB 1
#define MMU_CTL_UNA ( 0x1 << MMU_CTL_offUNA )
+#define MMU_CTL_CACHEABLE_NON 0
#define MMU_CTL_CACHEABLE_WB 2
#define MMU_CTL_CACHEABLE_WT 3