Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: cpu-probe: Set Ingenic's writecombine to _CACHE_CACHABLE_WA

Previously, in cpu_probe_ingenic(), c->writecombine was set to
_CACHE_UNCACHED_ACCELERATED, but this macro was defined differently when
CONFIG_MACH_INGENIC was set. This made it impossible to support multiple
CPUs.

Address this issue by setting c->writecombine to _CACHE_CACHABLE_WA
directly and removing the dependency on CONFIG_MACH_INGENIC.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

Paul Cercueil and committed by
Thomas Bogendoerfer
95b1f6db 7487abbe

+2 -6
-5
arch/mips/include/asm/pgtable-bits.h
··· 249 249 250 250 #define _CACHE_CACHABLE_NONCOHERENT (5<<_CACHE_SHIFT) 251 251 252 - #elif defined(CONFIG_MACH_INGENIC) 253 - 254 - /* Ingenic uses the WA bit to achieve write-combine memory writes */ 255 - #define _CACHE_UNCACHED_ACCELERATED (1<<_CACHE_SHIFT) 256 - 257 252 #endif 258 253 259 254 #ifndef _CACHE_CACHABLE_NO_WA
+2 -1
arch/mips/kernel/cpu-probe.c
··· 2169 2169 2170 2170 /* XBurst®1 with MXU2.0 SIMD ISA */ 2171 2171 case PRID_IMP_XBURST_REV2: 2172 + /* Ingenic uses the WA bit to achieve write-combine memory writes */ 2173 + c->writecombine = _CACHE_CACHABLE_WA; 2172 2174 c->cputype = CPU_XBURST; 2173 - c->writecombine = _CACHE_UNCACHED_ACCELERATED; 2174 2175 __cpu_name[cpu] = "Ingenic XBurst"; 2175 2176 break; 2176 2177