ARM: hw_breakpoint: blacklist nexell CPUs
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 20 Oct 2017 06:05:27 +0000 (15:05 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 29 Jan 2019 02:25:32 +0000 (11:25 +0900)
On s5p4418 nexell soc, the kernel crashes in arch_hw_breakpoint_init
when CONFIG_PERF_EVENTS option is enabled, taking an undefined
instruction trap. Blacklist nexell CPUs as like Scorpion CPUs.

Reference: ddc37832a134 ("ARM: 8634/1: hw_breakpoint: blacklist Scorpion CPUs")

Change-Id: I2aa6f43467d2369e1d08ae02dd1b64fc4410a701
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
arch/arm/include/asm/cputype.h
arch/arm/kernel/hw_breakpoint.c

index e9d04f4..ba52a71 100644 (file)
@@ -84,6 +84,9 @@
 /* Qualcomm implemented cores */
 #define ARM_CPU_PART_SCORPION          0x510002d0
 
+/* Nexell implemented cores */
+#define ARM_CPU_PART_NEXELL            0x4100c090
+
 extern unsigned int processor_id;
 
 #ifdef CONFIG_CPU_CP15
index abcbea1..28a3eba 100644 (file)
@@ -1082,6 +1082,11 @@ static int __init arch_hw_breakpoint_init(void)
                return 0;
        }
 
+       if (read_cpuid_part() == ARM_CPU_PART_NEXELL) {
+               pr_info("NEXELL CPU detected. Hardware breakpoints and watchpoints disabled\n");
+               return 0;
+       }
+
        has_ossr = core_has_os_save_restore();
 
        /* Determine how many BRPs/WRPs are available. */