diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-09-30 22:52:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-09-30 22:52:08 -0400 |
commit | aad7fb916a10f1065ad23de0c80a4a04bcba8437 (patch) | |
tree | 9e091817ac2fff165c945be2d1c28b11aec344cd | |
parent | fe82dcec644244676d55a1384c958d5f67979adb (diff) | |
parent | ad684dce87fac52738649e62b4afa25081b52a28 (diff) |
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King:
"Some further ARM fixes:
- another build fix for the kprobes test code
- a fix for no kuser helpers for the set_tls code, which oopsed on
noMMU hardware
- a fix for alignment handler with neon opcodes being misinterpreted
- turning off the hardware access support, which is not implemented
- a build fix for the v7 coherency exiting code, which can be built
in non-v7 environments (but still only executed on v7 CPUs)"
* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
ARM: 8179/1: kprobes-test: Fix compile error "bad immediate value for offset"
ARM: 8178/1: fix set_tls for !CONFIG_KUSER_HELPERS
ARM: 8177/1: cacheflush: Fix v7_exit_coherency_flush exynos build breakage on ARMv6
ARM: 8165/1: alignment: don't break misaligned NEON load/store
ARM: 8164/1: mm: clear SCTLR.HA instead of setting it for LPAE
-rw-r--r-- | arch/arm/include/asm/cacheflush.h | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/tls.h | 2 | ||||
-rw-r--r-- | arch/arm/kernel/kprobes-test.c | 16 | ||||
-rw-r--r-- | arch/arm/kernel/kprobes-test.h | 5 | ||||
-rw-r--r-- | arch/arm/mm/alignment.c | 3 | ||||
-rw-r--r-- | arch/arm/mm/proc-v7-3level.S | 4 |
6 files changed, 21 insertions, 10 deletions
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index 79ecb4f34ffb..10e78d00a0bb 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -466,6 +466,7 @@ static inline void __sync_cache_range_r(volatile void *p, size_t size) | |||
466 | */ | 466 | */ |
467 | #define v7_exit_coherency_flush(level) \ | 467 | #define v7_exit_coherency_flush(level) \ |
468 | asm volatile( \ | 468 | asm volatile( \ |
469 | ".arch armv7-a \n\t" \ | ||
469 | "stmfd sp!, {fp, ip} \n\t" \ | 470 | "stmfd sp!, {fp, ip} \n\t" \ |
470 | "mrc p15, 0, r0, c1, c0, 0 @ get SCTLR \n\t" \ | 471 | "mrc p15, 0, r0, c1, c0, 0 @ get SCTLR \n\t" \ |
471 | "bic r0, r0, #"__stringify(CR_C)" \n\t" \ | 472 | "bic r0, r0, #"__stringify(CR_C)" \n\t" \ |
diff --git a/arch/arm/include/asm/tls.h b/arch/arm/include/asm/tls.h index 36172adda9d0..5f833f7adba1 100644 --- a/arch/arm/include/asm/tls.h +++ b/arch/arm/include/asm/tls.h | |||
@@ -81,6 +81,7 @@ static inline void set_tls(unsigned long val) | |||
81 | asm("mcr p15, 0, %0, c13, c0, 3" | 81 | asm("mcr p15, 0, %0, c13, c0, 3" |
82 | : : "r" (val)); | 82 | : : "r" (val)); |
83 | } else { | 83 | } else { |
84 | #ifdef CONFIG_KUSER_HELPERS | ||
84 | /* | 85 | /* |
85 | * User space must never try to access this | 86 | * User space must never try to access this |
86 | * directly. Expect your app to break | 87 | * directly. Expect your app to break |
@@ -89,6 +90,7 @@ static inline void set_tls(unsigned long val) | |||
89 | * entry-armv.S for details) | 90 | * entry-armv.S for details) |
90 | */ | 91 | */ |
91 | *((unsigned int *)0xffff0ff0) = val; | 92 | *((unsigned int *)0xffff0ff0) = val; |
93 | #endif | ||
92 | } | 94 | } |
93 | 95 | ||
94 | } | 96 | } |
diff --git a/arch/arm/kernel/kprobes-test.c b/arch/arm/kernel/kprobes-test.c index 08d731294bcd..b206d7790c77 100644 --- a/arch/arm/kernel/kprobes-test.c +++ b/arch/arm/kernel/kprobes-test.c | |||
@@ -110,10 +110,13 @@ | |||
110 | * | 110 | * |
111 | * @ TESTCASE_START | 111 | * @ TESTCASE_START |
112 | * bl __kprobes_test_case_start | 112 | * bl __kprobes_test_case_start |
113 | * @ start of inline data... | 113 | * .pushsection .rodata |
114 | * "10: | ||
114 | * .ascii "mov r0, r7" @ text title for test case | 115 | * .ascii "mov r0, r7" @ text title for test case |
115 | * .byte 0 | 116 | * .byte 0 |
116 | * .align 2, 0 | 117 | * .popsection |
118 | * @ start of inline data... | ||
119 | * .word 10b @ pointer to title in .rodata section | ||
117 | * | 120 | * |
118 | * @ TEST_ARG_REG | 121 | * @ TEST_ARG_REG |
119 | * .byte ARG_TYPE_REG | 122 | * .byte ARG_TYPE_REG |
@@ -971,7 +974,7 @@ void __naked __kprobes_test_case_start(void) | |||
971 | __asm__ __volatile__ ( | 974 | __asm__ __volatile__ ( |
972 | "stmdb sp!, {r4-r11} \n\t" | 975 | "stmdb sp!, {r4-r11} \n\t" |
973 | "sub sp, sp, #"__stringify(TEST_MEMORY_SIZE)"\n\t" | 976 | "sub sp, sp, #"__stringify(TEST_MEMORY_SIZE)"\n\t" |
974 | "bic r0, lr, #1 @ r0 = inline title string \n\t" | 977 | "bic r0, lr, #1 @ r0 = inline data \n\t" |
975 | "mov r1, sp \n\t" | 978 | "mov r1, sp \n\t" |
976 | "bl kprobes_test_case_start \n\t" | 979 | "bl kprobes_test_case_start \n\t" |
977 | "bx r0 \n\t" | 980 | "bx r0 \n\t" |
@@ -1349,15 +1352,14 @@ static unsigned long next_instruction(unsigned long pc) | |||
1349 | return pc + 4; | 1352 | return pc + 4; |
1350 | } | 1353 | } |
1351 | 1354 | ||
1352 | static uintptr_t __used kprobes_test_case_start(const char *title, void *stack) | 1355 | static uintptr_t __used kprobes_test_case_start(const char **title, void *stack) |
1353 | { | 1356 | { |
1354 | struct test_arg *args; | 1357 | struct test_arg *args; |
1355 | struct test_arg_end *end_arg; | 1358 | struct test_arg_end *end_arg; |
1356 | unsigned long test_code; | 1359 | unsigned long test_code; |
1357 | 1360 | ||
1358 | args = (struct test_arg *)PTR_ALIGN(title + strlen(title) + 1, 4); | 1361 | current_title = *title++; |
1359 | 1362 | args = (struct test_arg *)title; | |
1360 | current_title = title; | ||
1361 | current_args = args; | 1363 | current_args = args; |
1362 | current_stack = stack; | 1364 | current_stack = stack; |
1363 | 1365 | ||
diff --git a/arch/arm/kernel/kprobes-test.h b/arch/arm/kernel/kprobes-test.h index eecc90a0fd91..4430990e90e7 100644 --- a/arch/arm/kernel/kprobes-test.h +++ b/arch/arm/kernel/kprobes-test.h | |||
@@ -111,11 +111,14 @@ struct test_arg_end { | |||
111 | #define TESTCASE_START(title) \ | 111 | #define TESTCASE_START(title) \ |
112 | __asm__ __volatile__ ( \ | 112 | __asm__ __volatile__ ( \ |
113 | "bl __kprobes_test_case_start \n\t" \ | 113 | "bl __kprobes_test_case_start \n\t" \ |
114 | ".pushsection .rodata \n\t" \ | ||
115 | "10: \n\t" \ | ||
114 | /* don't use .asciz here as 'title' may be */ \ | 116 | /* don't use .asciz here as 'title' may be */ \ |
115 | /* multiple strings to be concatenated. */ \ | 117 | /* multiple strings to be concatenated. */ \ |
116 | ".ascii "#title" \n\t" \ | 118 | ".ascii "#title" \n\t" \ |
117 | ".byte 0 \n\t" \ | 119 | ".byte 0 \n\t" \ |
118 | ".align 2, 0 \n\t" | 120 | ".popsection \n\t" \ |
121 | ".word 10b \n\t" | ||
119 | 122 | ||
120 | #define TEST_ARG_REG(reg, val) \ | 123 | #define TEST_ARG_REG(reg, val) \ |
121 | ".byte "__stringify(ARG_TYPE_REG)" \n\t" \ | 124 | ".byte "__stringify(ARG_TYPE_REG)" \n\t" \ |
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index 0c1ab49e5f7b..83792f4324ea 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -41,6 +41,7 @@ | |||
41 | * This code is not portable to processors with late data abort handling. | 41 | * This code is not portable to processors with late data abort handling. |
42 | */ | 42 | */ |
43 | #define CODING_BITS(i) (i & 0x0e000000) | 43 | #define CODING_BITS(i) (i & 0x0e000000) |
44 | #define COND_BITS(i) (i & 0xf0000000) | ||
44 | 45 | ||
45 | #define LDST_I_BIT(i) (i & (1 << 26)) /* Immediate constant */ | 46 | #define LDST_I_BIT(i) (i & (1 << 26)) /* Immediate constant */ |
46 | #define LDST_P_BIT(i) (i & (1 << 24)) /* Preindex */ | 47 | #define LDST_P_BIT(i) (i & (1 << 24)) /* Preindex */ |
@@ -821,6 +822,8 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
821 | break; | 822 | break; |
822 | 823 | ||
823 | case 0x04000000: /* ldr or str immediate */ | 824 | case 0x04000000: /* ldr or str immediate */ |
825 | if (COND_BITS(instr) == 0xf0000000) /* NEON VLDn, VSTn */ | ||
826 | goto bad; | ||
824 | offset.un = OFFSET_BITS(instr); | 827 | offset.un = OFFSET_BITS(instr); |
825 | handler = do_alignment_ldrstr; | 828 | handler = do_alignment_ldrstr; |
826 | break; | 829 | break; |
diff --git a/arch/arm/mm/proc-v7-3level.S b/arch/arm/mm/proc-v7-3level.S index b64e67c7f176..d3daed0ae0ad 100644 --- a/arch/arm/mm/proc-v7-3level.S +++ b/arch/arm/mm/proc-v7-3level.S | |||
@@ -157,9 +157,9 @@ ENDPROC(cpu_v7_set_pte_ext) | |||
157 | * TFR EV X F IHD LR S | 157 | * TFR EV X F IHD LR S |
158 | * .EEE ..EE PUI. .TAT 4RVI ZWRS BLDP WCAM | 158 | * .EEE ..EE PUI. .TAT 4RVI ZWRS BLDP WCAM |
159 | * rxxx rrxx xxx0 0101 xxxx xxxx x111 xxxx < forced | 159 | * rxxx rrxx xxx0 0101 xxxx xxxx x111 xxxx < forced |
160 | * 11 0 110 1 0011 1100 .111 1101 < we want | 160 | * 11 0 110 0 0011 1100 .111 1101 < we want |
161 | */ | 161 | */ |
162 | .align 2 | 162 | .align 2 |
163 | .type v7_crval, #object | 163 | .type v7_crval, #object |
164 | v7_crval: | 164 | v7_crval: |
165 | crval clear=0x0120c302, mmuset=0x30c23c7d, ucset=0x00c01c7c | 165 | crval clear=0x0122c302, mmuset=0x30c03c7d, ucset=0x00c01c7c |