OSDN Git Service

nds32: To fix a cache inconsistency issue by setting correct cacheability of NTC
authorGreentime Hu <greentime@andestech.com>
Mon, 30 Apr 2018 07:02:27 +0000 (15:02 +0800)
committerGreentime Hu <greentime@andestech.com>
Wed, 23 May 2018 05:26:22 +0000 (13:26 +0800)
commitabb90a24eade1f612324de0e6920041ef64795cb
tree67f24bc5d0c844db9c5d3f4c8aabe9d66e464273
parent8769c223491a7fbb345021e7004cbdffe024eaf8
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>
arch/nds32/include/asm/bitfield.h
arch/nds32/kernel/head.S