From: Russell King Date: Fri, 4 Jul 2014 13:49:05 +0000 (+0100) Subject: ARM: SWP emulation: only initialise on ARMv7 CPUs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7397aa48fff47c2386867a3fbfce8f3e664843a9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ARM: SWP emulation: only initialise on ARMv7 CPUs Previous CPUs do not have the ability to trap SWP instructions, so it's pointless initialising this code there. Tested-by: Tony Lindgren Acked-by: Catalin Marinas Signed-off-by: Russell King --- diff --git a/arch/arm/kernel/swp_emulate.c b/arch/arm/kernel/swp_emulate.c index b1b89882b113..67ca8578c6d8 100644 --- a/arch/arm/kernel/swp_emulate.c +++ b/arch/arm/kernel/swp_emulate.c @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -266,6 +267,9 @@ static struct undef_hook swp_hook = { */ static int __init swp_emulation_init(void) { + if (cpu_architecture() < CPU_ARCH_ARMv7) + return 0; + #ifdef CONFIG_PROC_FS if (!proc_create("cpu/swp_emulation", S_IRUGO, NULL, &proc_status_fops)) return -ENOMEM;