aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-18 14:19:32 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-18 14:19:32 -0500
commitfa19a769f82fb9a5ca000b83cacd13fcaeda51ac (patch)
treef8fca436f994c67d992accea8987ce40bd282bed
parentca92e6c7e6329029d7188487a5c32e86ef471977 (diff)
parent90f92c631b210c1e97080b53a9d863783281a932 (diff)
Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King: "A few ARM fixes: - fix a crash while performing TLB maintanence on early ARM SMP cores - blacklist Scorpion CPUs for hardware breakpoints - ARMs asm/types.h has been included as part of the UAPI due to the way the makefiles work, move it to uapi/asm/types.h to make it official - fix up ftrace syscall name matching" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8613/1: Fix the uaccess crash on PB11MPCore MAINTAINERS: update rmk's entries ARM: put types.h in uapi ARM: 8634/1: hw_breakpoint: blacklist Scorpion CPUs ARM: 8632/1: ftrace: fix syscall name matching
-rw-r--r--MAINTAINERS10
-rw-r--r--arch/arm/include/asm/cputype.h3
-rw-r--r--arch/arm/include/asm/ftrace.h18
-rw-r--r--arch/arm/include/uapi/asm/types.h (renamed from arch/arm/include/asm/types.h)6
-rw-r--r--arch/arm/kernel/hw_breakpoint.c16
-rw-r--r--arch/arm/kernel/smp_tlb.c7
6 files changed, 55 insertions, 5 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index c36976d3bd1a..4432e23d56fa 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -976,6 +976,7 @@ M: Russell King <linux@armlinux.org.uk>
976L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 976L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
977W: http://www.armlinux.org.uk/ 977W: http://www.armlinux.org.uk/
978S: Maintained 978S: Maintained
979T: git git://git.armlinux.org.uk/~rmk/linux-arm.git
979F: arch/arm/ 980F: arch/arm/
980 981
981ARM SUB-ARCHITECTURES 982ARM SUB-ARCHITECTURES
@@ -1153,6 +1154,7 @@ ARM/CLKDEV SUPPORT
1153M: Russell King <linux@armlinux.org.uk> 1154M: Russell King <linux@armlinux.org.uk>
1154L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 1155L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
1155S: Maintained 1156S: Maintained
1157T: git git://git.armlinux.org.uk/~rmk/linux-arm.git clkdev
1156F: arch/arm/include/asm/clkdev.h 1158F: arch/arm/include/asm/clkdev.h
1157F: drivers/clk/clkdev.c 1159F: drivers/clk/clkdev.c
1158 1160
@@ -7697,8 +7699,10 @@ F: drivers/net/dsa/mv88e6xxx/
7697F: Documentation/devicetree/bindings/net/dsa/marvell.txt 7699F: Documentation/devicetree/bindings/net/dsa/marvell.txt
7698 7700
7699MARVELL ARMADA DRM SUPPORT 7701MARVELL ARMADA DRM SUPPORT
7700M: Russell King <rmk+kernel@armlinux.org.uk> 7702M: Russell King <linux@armlinux.org.uk>
7701S: Maintained 7703S: Maintained
7704T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-armada-devel
7705T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-armada-fixes
7702F: drivers/gpu/drm/armada/ 7706F: drivers/gpu/drm/armada/
7703F: include/uapi/drm/armada_drm.h 7707F: include/uapi/drm/armada_drm.h
7704F: Documentation/devicetree/bindings/display/armada/ 7708F: Documentation/devicetree/bindings/display/armada/
@@ -8903,8 +8907,10 @@ S: Supported
8903F: drivers/nfc/nxp-nci 8907F: drivers/nfc/nxp-nci
8904 8908
8905NXP TDA998X DRM DRIVER 8909NXP TDA998X DRM DRIVER
8906M: Russell King <rmk+kernel@armlinux.org.uk> 8910M: Russell King <linux@armlinux.org.uk>
8907S: Supported 8911S: Supported
8912T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-devel
8913T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-fixes
8908F: drivers/gpu/drm/i2c/tda998x_drv.c 8914F: drivers/gpu/drm/i2c/tda998x_drv.c
8909F: include/drm/i2c/tda998x.h 8915F: include/drm/i2c/tda998x.h
8910 8916
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
index 522b5feb4eaa..b62eaeb147aa 100644
--- a/arch/arm/include/asm/cputype.h
+++ b/arch/arm/include/asm/cputype.h
@@ -94,6 +94,9 @@
94#define ARM_CPU_XSCALE_ARCH_V2 0x4000 94#define ARM_CPU_XSCALE_ARCH_V2 0x4000
95#define ARM_CPU_XSCALE_ARCH_V3 0x6000 95#define ARM_CPU_XSCALE_ARCH_V3 0x6000
96 96
97/* Qualcomm implemented cores */
98#define ARM_CPU_PART_SCORPION 0x510002d0
99
97extern unsigned int processor_id; 100extern unsigned int processor_id;
98 101
99#ifdef CONFIG_CPU_CP15 102#ifdef CONFIG_CPU_CP15
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index bfe2a2f5a644..22b73112b75f 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -54,6 +54,24 @@ static inline void *return_address(unsigned int level)
54 54
55#define ftrace_return_address(n) return_address(n) 55#define ftrace_return_address(n) return_address(n)
56 56
57#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
58
59static inline bool arch_syscall_match_sym_name(const char *sym,
60 const char *name)
61{
62 if (!strcmp(sym, "sys_mmap2"))
63 sym = "sys_mmap_pgoff";
64 else if (!strcmp(sym, "sys_statfs64_wrapper"))
65 sym = "sys_statfs64";
66 else if (!strcmp(sym, "sys_fstatfs64_wrapper"))
67 sym = "sys_fstatfs64";
68 else if (!strcmp(sym, "sys_arm_fadvise64_64"))
69 sym = "sys_fadvise64_64";
70
71 /* Ignore case since sym may start with "SyS" instead of "sys" */
72 return !strcasecmp(sym, name);
73}
74
57#endif /* ifndef __ASSEMBLY__ */ 75#endif /* ifndef __ASSEMBLY__ */
58 76
59#endif /* _ASM_ARM_FTRACE */ 77#endif /* _ASM_ARM_FTRACE */
diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/uapi/asm/types.h
index a53cdb8f068c..9435a42f575e 100644
--- a/arch/arm/include/asm/types.h
+++ b/arch/arm/include/uapi/asm/types.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_TYPES_H 1#ifndef _UAPI_ASM_TYPES_H
2#define _ASM_TYPES_H 2#define _UAPI_ASM_TYPES_H
3 3
4#include <asm-generic/int-ll64.h> 4#include <asm-generic/int-ll64.h>
5 5
@@ -37,4 +37,4 @@
37#define __UINTPTR_TYPE__ unsigned long 37#define __UINTPTR_TYPE__ unsigned long
38#endif 38#endif
39 39
40#endif /* _ASM_TYPES_H */ 40#endif /* _UAPI_ASM_TYPES_H */
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
index 188180b5523d..be3b3fbd382f 100644
--- a/arch/arm/kernel/hw_breakpoint.c
+++ b/arch/arm/kernel/hw_breakpoint.c
@@ -1063,6 +1063,22 @@ static int __init arch_hw_breakpoint_init(void)
1063 return 0; 1063 return 0;
1064 } 1064 }
1065 1065
1066 /*
1067 * Scorpion CPUs (at least those in APQ8060) seem to set DBGPRSR.SPD
1068 * whenever a WFI is issued, even if the core is not powered down, in
1069 * violation of the architecture. When DBGPRSR.SPD is set, accesses to
1070 * breakpoint and watchpoint registers are treated as undefined, so
1071 * this results in boot time and runtime failures when these are
1072 * accessed and we unexpectedly take a trap.
1073 *
1074 * It's not clear if/how this can be worked around, so we blacklist
1075 * Scorpion CPUs to avoid these issues.
1076 */
1077 if (read_cpuid_part() == ARM_CPU_PART_SCORPION) {
1078 pr_info("Scorpion CPU detected. Hardware breakpoints and watchpoints disabled\n");
1079 return 0;
1080 }
1081
1066 has_ossr = core_has_os_save_restore(); 1082 has_ossr = core_has_os_save_restore();
1067 1083
1068 /* Determine how many BRPs/WRPs are available. */ 1084 /* Determine how many BRPs/WRPs are available. */
diff --git a/arch/arm/kernel/smp_tlb.c b/arch/arm/kernel/smp_tlb.c
index 22313cb53362..9af0701f7094 100644
--- a/arch/arm/kernel/smp_tlb.c
+++ b/arch/arm/kernel/smp_tlb.c
@@ -9,6 +9,7 @@
9 */ 9 */
10#include <linux/preempt.h> 10#include <linux/preempt.h>
11#include <linux/smp.h> 11#include <linux/smp.h>
12#include <linux/uaccess.h>
12 13
13#include <asm/smp_plat.h> 14#include <asm/smp_plat.h>
14#include <asm/tlbflush.h> 15#include <asm/tlbflush.h>
@@ -40,8 +41,11 @@ static inline void ipi_flush_tlb_mm(void *arg)
40static inline void ipi_flush_tlb_page(void *arg) 41static inline void ipi_flush_tlb_page(void *arg)
41{ 42{
42 struct tlb_args *ta = (struct tlb_args *)arg; 43 struct tlb_args *ta = (struct tlb_args *)arg;
44 unsigned int __ua_flags = uaccess_save_and_enable();
43 45
44 local_flush_tlb_page(ta->ta_vma, ta->ta_start); 46 local_flush_tlb_page(ta->ta_vma, ta->ta_start);
47
48 uaccess_restore(__ua_flags);
45} 49}
46 50
47static inline void ipi_flush_tlb_kernel_page(void *arg) 51static inline void ipi_flush_tlb_kernel_page(void *arg)
@@ -54,8 +58,11 @@ static inline void ipi_flush_tlb_kernel_page(void *arg)
54static inline void ipi_flush_tlb_range(void *arg) 58static inline void ipi_flush_tlb_range(void *arg)
55{ 59{
56 struct tlb_args *ta = (struct tlb_args *)arg; 60 struct tlb_args *ta = (struct tlb_args *)arg;
61 unsigned int __ua_flags = uaccess_save_and_enable();
57 62
58 local_flush_tlb_range(ta->ta_vma, ta->ta_start, ta->ta_end); 63 local_flush_tlb_range(ta->ta_vma, ta->ta_start, ta->ta_end);
64
65 uaccess_restore(__ua_flags);
59} 66}
60 67
61static inline void ipi_flush_tlb_kernel_range(void *arg) 68static inline void ipi_flush_tlb_kernel_range(void *arg)