[ARM] 3234/1: Update cpu_architecture() to deal with the new ID format

Patch from Catalin Marinas

Since ARM1176, the CPU ID format has changed and it will also be used for
future ARM architectures.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by Catalin Marinas and committed by Russell King 6b090a25 37134cd5

+9 -6
+9 -6
arch/arm/kernel/setup.c
··· 205 "5TE", 206 "5TEJ", 207 "6TEJ", 208 - "?(10)", 209 "?(11)", 210 "?(12)", 211 "?(13)", ··· 258 { 259 int cpu_arch; 260 261 - if ((processor_id & 0x0000f000) == 0) { 262 cpu_arch = CPU_ARCH_UNKNOWN; 263 - } else if ((processor_id & 0x0000f000) == 0x00007000) { 264 cpu_arch = (processor_id & (1 << 23)) ? CPU_ARCH_ARMv4T : CPU_ARCH_ARMv3; 265 - } else { 266 cpu_arch = (processor_id >> 16) & 7; 267 if (cpu_arch) 268 cpu_arch += CPU_ARCH_ARMv3; 269 } 270 271 return cpu_arch; ··· 866 seq_printf(m, "\nCPU implementer\t: 0x%02x\n", processor_id >> 24); 867 seq_printf(m, "CPU architecture: %s\n", proc_arch[cpu_architecture()]); 868 869 - if ((processor_id & 0x0000f000) == 0x00000000) { 870 /* pre-ARM7 */ 871 seq_printf(m, "CPU part\t\t: %07x\n", processor_id >> 4); 872 } else { 873 - if ((processor_id & 0x0000f000) == 0x00007000) { 874 /* ARM7 */ 875 seq_printf(m, "CPU variant\t: 0x%02x\n", 876 (processor_id >> 16) & 127);
··· 205 "5TE", 206 "5TEJ", 207 "6TEJ", 208 + "7", 209 "?(11)", 210 "?(12)", 211 "?(13)", ··· 258 { 259 int cpu_arch; 260 261 + if ((processor_id & 0x0008f000) == 0) { 262 cpu_arch = CPU_ARCH_UNKNOWN; 263 + } else if ((processor_id & 0x0008f000) == 0x00007000) { 264 cpu_arch = (processor_id & (1 << 23)) ? CPU_ARCH_ARMv4T : CPU_ARCH_ARMv3; 265 + } else if ((processor_id & 0x00080000) == 0x00000000) { 266 cpu_arch = (processor_id >> 16) & 7; 267 if (cpu_arch) 268 cpu_arch += CPU_ARCH_ARMv3; 269 + } else { 270 + /* the revised CPUID */ 271 + cpu_arch = ((processor_id >> 12) & 0xf) - 0xb + CPU_ARCH_ARMv6; 272 } 273 274 return cpu_arch; ··· 863 seq_printf(m, "\nCPU implementer\t: 0x%02x\n", processor_id >> 24); 864 seq_printf(m, "CPU architecture: %s\n", proc_arch[cpu_architecture()]); 865 866 + if ((processor_id & 0x0008f000) == 0x00000000) { 867 /* pre-ARM7 */ 868 seq_printf(m, "CPU part\t\t: %07x\n", processor_id >> 4); 869 } else { 870 + if ((processor_id & 0x0008f000) == 0x00007000) { 871 /* ARM7 */ 872 seq_printf(m, "CPU variant\t: 0x%02x\n", 873 (processor_id >> 16) & 127);