diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-01-18 14:19:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-01-18 14:19:32 -0500 |
commit | fa19a769f82fb9a5ca000b83cacd13fcaeda51ac (patch) | |
tree | f8fca436f994c67d992accea8987ce40bd282bed | |
parent | ca92e6c7e6329029d7188487a5c32e86ef471977 (diff) | |
parent | 90f92c631b210c1e97080b53a9d863783281a932 (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-- | MAINTAINERS | 10 | ||||
-rw-r--r-- | arch/arm/include/asm/cputype.h | 3 | ||||
-rw-r--r-- | arch/arm/include/asm/ftrace.h | 18 | ||||
-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.c | 16 | ||||
-rw-r--r-- | arch/arm/kernel/smp_tlb.c | 7 |
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> | |||
976 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 976 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
977 | W: http://www.armlinux.org.uk/ | 977 | W: http://www.armlinux.org.uk/ |
978 | S: Maintained | 978 | S: Maintained |
979 | T: git git://git.armlinux.org.uk/~rmk/linux-arm.git | ||
979 | F: arch/arm/ | 980 | F: arch/arm/ |
980 | 981 | ||
981 | ARM SUB-ARCHITECTURES | 982 | ARM SUB-ARCHITECTURES |
@@ -1153,6 +1154,7 @@ ARM/CLKDEV SUPPORT | |||
1153 | M: Russell King <linux@armlinux.org.uk> | 1154 | M: Russell King <linux@armlinux.org.uk> |
1154 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1155 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
1155 | S: Maintained | 1156 | S: Maintained |
1157 | T: git git://git.armlinux.org.uk/~rmk/linux-arm.git clkdev | ||
1156 | F: arch/arm/include/asm/clkdev.h | 1158 | F: arch/arm/include/asm/clkdev.h |
1157 | F: drivers/clk/clkdev.c | 1159 | F: drivers/clk/clkdev.c |
1158 | 1160 | ||
@@ -7697,8 +7699,10 @@ F: drivers/net/dsa/mv88e6xxx/ | |||
7697 | F: Documentation/devicetree/bindings/net/dsa/marvell.txt | 7699 | F: Documentation/devicetree/bindings/net/dsa/marvell.txt |
7698 | 7700 | ||
7699 | MARVELL ARMADA DRM SUPPORT | 7701 | MARVELL ARMADA DRM SUPPORT |
7700 | M: Russell King <rmk+kernel@armlinux.org.uk> | 7702 | M: Russell King <linux@armlinux.org.uk> |
7701 | S: Maintained | 7703 | S: Maintained |
7704 | T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-armada-devel | ||
7705 | T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-armada-fixes | ||
7702 | F: drivers/gpu/drm/armada/ | 7706 | F: drivers/gpu/drm/armada/ |
7703 | F: include/uapi/drm/armada_drm.h | 7707 | F: include/uapi/drm/armada_drm.h |
7704 | F: Documentation/devicetree/bindings/display/armada/ | 7708 | F: Documentation/devicetree/bindings/display/armada/ |
@@ -8903,8 +8907,10 @@ S: Supported | |||
8903 | F: drivers/nfc/nxp-nci | 8907 | F: drivers/nfc/nxp-nci |
8904 | 8908 | ||
8905 | NXP TDA998X DRM DRIVER | 8909 | NXP TDA998X DRM DRIVER |
8906 | M: Russell King <rmk+kernel@armlinux.org.uk> | 8910 | M: Russell King <linux@armlinux.org.uk> |
8907 | S: Supported | 8911 | S: Supported |
8912 | T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-devel | ||
8913 | T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-fixes | ||
8908 | F: drivers/gpu/drm/i2c/tda998x_drv.c | 8914 | F: drivers/gpu/drm/i2c/tda998x_drv.c |
8909 | F: include/drm/i2c/tda998x.h | 8915 | F: 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 | |||
97 | extern unsigned int processor_id; | 100 | extern 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 | |||
59 | static 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) | |||
40 | static inline void ipi_flush_tlb_page(void *arg) | 41 | static 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 | ||
47 | static inline void ipi_flush_tlb_kernel_page(void *arg) | 51 | static inline void ipi_flush_tlb_kernel_page(void *arg) |
@@ -54,8 +58,11 @@ static inline void ipi_flush_tlb_kernel_page(void *arg) | |||
54 | static inline void ipi_flush_tlb_range(void *arg) | 58 | static 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 | ||
61 | static inline void ipi_flush_tlb_kernel_range(void *arg) | 68 | static inline void ipi_flush_tlb_kernel_range(void *arg) |