Skip to content

Commit aad7fb9

Browse files
committed
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
2 parents fe82dce + ad684dc commit aad7fb9

6 files changed

Lines changed: 21 additions & 10 deletions

File tree

‎arch/arm/include/asm/cacheflush.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ static inline void __sync_cache_range_r(volatile void *p, size_t size)
466466
*/
467467
#define v7_exit_coherency_flush(level) \
468468
asm volatile( \
469+
".arch armv7-a \n\t" \
469470
"stmfd sp!, {fp, ip} \n\t" \
470471
"mrc p15, 0, r0, c1, c0, 0 @ get SCTLR \n\t" \
471472
"bic r0, r0, #"__stringify(CR_C)" \n\t" \

‎arch/arm/include/asm/tls.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ static inline void set_tls(unsigned long val)
8181
asm("mcr p15, 0, %0, c13, c0, 3"
8282
: : "r" (val));
8383
} else {
84+
#ifdef CONFIG_KUSER_HELPERS
8485
/*
8586
* User space must never try to access this
8687
* directly. Expect your app to break
@@ -89,6 +90,7 @@ static inline void set_tls(unsigned long val)
8990
* entry-armv.S for details)
9091
*/
9192
*((unsigned int *)0xffff0ff0) = val;
93+
#endif
9294
}
9395

9496
}

‎arch/arm/kernel/kprobes-test.c‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,13 @@
110110
*
111111
* @ TESTCASE_START
112112
* bl __kprobes_test_case_start
113-
* @ start of inline data...
113+
* .pushsection .rodata
114+
* "10:
114115
* .ascii "mov r0, r7" @ text title for test case
115116
* .byte 0
116-
* .align 2, 0
117+
* .popsection
118+
* @ start of inline data...
119+
* .word 10b @ pointer to title in .rodata section
117120
*
118121
* @ TEST_ARG_REG
119122
* .byte ARG_TYPE_REG
@@ -971,7 +974,7 @@ void __naked __kprobes_test_case_start(void)
971974
__asm__ __volatile__ (
972975
"stmdb sp!, {r4-r11} \n\t"
973976
"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"
975978
"mov r1, sp \n\t"
976979
"bl kprobes_test_case_start \n\t"
977980
"bx r0 \n\t"
@@ -1349,15 +1352,14 @@ static unsigned long next_instruction(unsigned long pc)
13491352
return pc + 4;
13501353
}
13511354

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)
13531356
{
13541357
struct test_arg *args;
13551358
struct test_arg_end *end_arg;
13561359
unsigned long test_code;
13571360

1358-
args = (struct test_arg *)PTR_ALIGN(title + strlen(title) + 1, 4);
1359-
1360-
current_title = title;
1361+
current_title = *title++;
1362+
args = (struct test_arg *)title;
13611363
current_args = args;
13621364
current_stack = stack;
13631365

‎arch/arm/kernel/kprobes-test.h‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,14 @@ struct test_arg_end {
111111
#define TESTCASE_START(title) \
112112
__asm__ __volatile__ ( \
113113
"bl __kprobes_test_case_start \n\t" \
114+
".pushsection .rodata \n\t" \
115+
"10: \n\t" \
114116
/* don't use .asciz here as 'title' may be */ \
115117
/* multiple strings to be concatenated. */ \
116118
".ascii "#title" \n\t" \
117119
".byte 0 \n\t" \
118-
".align 2, 0 \n\t"
120+
".popsection \n\t" \
121+
".word 10b \n\t"
119122

120123
#define TEST_ARG_REG(reg, val) \
121124
".byte "__stringify(ARG_TYPE_REG)" \n\t" \

‎arch/arm/mm/alignment.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
* This code is not portable to processors with late data abort handling.
4242
*/
4343
#define CODING_BITS(i) (i & 0x0e000000)
44+
#define COND_BITS(i) (i & 0xf0000000)
4445

4546
#define LDST_I_BIT(i) (i & (1 << 26)) /* Immediate constant */
4647
#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)
821822
break;
822823

823824
case 0x04000000: /* ldr or str immediate */
825+
if (COND_BITS(instr) == 0xf0000000) /* NEON VLDn, VSTn */
826+
goto bad;
824827
offset.un = OFFSET_BITS(instr);
825828
handler = do_alignment_ldrstr;
826829
break;

‎arch/arm/mm/proc-v7-3level.S‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ ENDPROC(cpu_v7_set_pte_ext)
157157
* TFR EV X F IHD LR S
158158
* .EEE ..EE PUI. .TAT 4RVI ZWRS BLDP WCAM
159159
* 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
161161
*/
162162
.align 2
163163
.type v7_crval, #object
164164
v7_crval:
165-
crval clear=0x0120c302, mmuset=0x30c23c7d, ucset=0x00c01c7c
165+
crval clear=0x0122c302, mmuset=0x30c03c7d, ucset=0x00c01c7c

0 commit comments

Comments
 (0)