diff options
Diffstat (limited to 'arch/arm/kernel/setup.c')
-rw-r--r-- | arch/arm/kernel/setup.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 8d21427bb679..bc5e4128f9f3 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -234,12 +234,13 @@ static void __init cacheid_init(void) | |||
234 | unsigned int cachetype = read_cpuid_cachetype(); | 234 | unsigned int cachetype = read_cpuid_cachetype(); |
235 | unsigned int arch = cpu_architecture(); | 235 | unsigned int arch = cpu_architecture(); |
236 | 236 | ||
237 | if (arch >= CPU_ARCH_ARMv7) { | 237 | if (arch >= CPU_ARCH_ARMv6) { |
238 | cacheid = CACHEID_VIPT_NONALIASING; | 238 | if ((cachetype & (7 << 29)) == 4 << 29) { |
239 | if ((cachetype & (3 << 14)) == 1 << 14) | 239 | /* ARMv7 register format */ |
240 | cacheid |= CACHEID_ASID_TAGGED; | 240 | cacheid = CACHEID_VIPT_NONALIASING; |
241 | } else if (arch >= CPU_ARCH_ARMv6) { | 241 | if ((cachetype & (3 << 14)) == 1 << 14) |
242 | if (cachetype & (1 << 23)) | 242 | cacheid |= CACHEID_ASID_TAGGED; |
243 | } else if (cachetype & (1 << 23)) | ||
243 | cacheid = CACHEID_VIPT_ALIASING; | 244 | cacheid = CACHEID_VIPT_ALIASING; |
244 | else | 245 | else |
245 | cacheid = CACHEID_VIPT_NONALIASING; | 246 | cacheid = CACHEID_VIPT_NONALIASING; |