Skip to content

Commit d360a68

Browse files
murzinvRussell King
authored andcommitted
ARM: 8682/1: V7M: Set cacheid iff DminLine or IminLine is nonzero
Cache support is optional feature in M-class cores, thus DminLine or IminLine of Cache Type Register is zero if caches are not implemented, but we check the whole CTR which has other features encoded there. Let's be more precise and check for DminLine and IminLine of CTR before we set cacheid. Signed-off-by: Vladimir Murzin <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent bbeedfd commit d360a68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/kernel/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ static void __init cacheid_init(void)
315315
if (arch >= CPU_ARCH_ARMv6) {
316316
unsigned int cachetype = read_cpuid_cachetype();
317317

318-
if ((arch == CPU_ARCH_ARMv7M) && !cachetype) {
318+
if ((arch == CPU_ARCH_ARMv7M) && !(cachetype & 0xf000f)) {
319319
cacheid = 0;
320320
} else if ((cachetype & (7 << 29)) == 4 << 29) {
321321
/* ARMv7 register format */

0 commit comments

Comments
 (0)