]> git.baikalelectronics.ru Git - kernel.git/commit
openrisc: add cacheflush support to fix icache aliasing
authorJan Henrik Weinstock <jan.weinstock@ice.rwth-aachen.de>
Wed, 4 Nov 2015 16:26:10 +0000 (17:26 +0100)
committerStafford Horne <shorne@gmail.com>
Fri, 3 Nov 2017 05:01:15 +0000 (14:01 +0900)
commit4e358a7ca1db47abc88fcb45ab0991a62ae3a22f
treeaae34814c80135a8a385269e9a9e07892e36ac61
parentcb266a387d588b8439e2c755c44bb1c3e8a9eabe
openrisc: add cacheflush support to fix icache aliasing

On OpenRISC the icache does not snoop data stores.  This can cause
aliasing as reported by Jan. This patch fixes the issue to ensure icache
is properly synchronized when code is written to memory.  It supports both
SMP and UP flushing.

This supports dcache flush as well for architectures that do not support
write-through caches; most OpenRISC implementations do implement
write-through cache however. Dcache flushes are done only on a single
core as OpenRISC dcaches all support snooping of bus stores.

Signed-off-by: Jan Henrik Weinstock <jan.weinstock@ice.rwth-aachen.de>
[shorne@gmail.com: Squashed patches and wrote commit message]
Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/Kconfig
arch/openrisc/include/asm/Kbuild
arch/openrisc/include/asm/cacheflush.h [new file with mode: 0644]
arch/openrisc/include/asm/pgtable.h
arch/openrisc/kernel/smp.c
arch/openrisc/mm/Makefile
arch/openrisc/mm/cache.c [new file with mode: 0644]