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

Configure Feed

Select the types of activity you want to include in your feed.

ARM: 8041/1: pj4: fix cpu_is_pj4 check

Commit fdb487f5c961b94486a78fa61fa28b8eff1954ab
("ARM: 8015/1: Add cpu_is_pj4 to distinguish PJ4 because it
has some differences with V7")
introduced a cpuid check for Marvell PJ4 processors to fix a
regression caused by adding PJ4 based Marvell Dove into
multi_v7.

Unfortunately, this check is too narrow to catch PJ4 used on
Dove itself and breaks iWMMXt support.

This patch therefore relaxes the cpuid mask to match both PJ4
and PJ4B. Also, rework the given comment about PJ4/PJ4B
modifications to be a little bit more specific about the
differences.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Sebastian Hesselbarth and committed by
Russell King
cd171170 e89f443b

+7 -7
+7 -7
arch/arm/include/asm/cputype.h
··· 222 222 #endif 223 223 224 224 /* 225 - * Marvell's PJ4 core is based on V7 version. It has some modification 226 - * for coprocessor setting. For this reason, we need a way to distinguish 227 - * it. 225 + * Marvell's PJ4 and PJ4B cores are based on V7 version, 226 + * but require a specical sequence for enabling coprocessors. 227 + * For this reason, we need a way to distinguish them. 228 228 */ 229 - #ifndef CONFIG_CPU_PJ4 230 - #define cpu_is_pj4() 0 231 - #else 229 + #if defined(CONFIG_CPU_PJ4) || defined(CONFIG_CPU_PJ4B) 232 230 static inline int cpu_is_pj4(void) 233 231 { 234 232 unsigned int id; 235 233 236 234 id = read_cpuid_id(); 237 - if ((id & 0xfffffff0) == 0x562f5840) 235 + if ((id & 0xff0fff00) == 0x560f5800) 238 236 return 1; 239 237 240 238 return 0; 241 239 } 240 + #else 241 + #define cpu_is_pj4() 0 242 242 #endif 243 243 #endif