Skip to content

Commit 08b15d1

Browse files
committed
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King: "A couple of small fixes, and wiring up the new syscalls which appeared during the merge window" * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: ARM: 8550/1: protect idiv patching against undefined gcc behavior ARM: wire up preadv2 and pwritev2 syscalls ARM: SMP enable of cache maintanence broadcast
2 parents 2f422f9 + 208fae5 commit 08b15d1

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

arch/arm/include/asm/unistd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* This may need to be greater than __NR_last_syscall+1 in order to
2020
* account for the padding in the syscall table
2121
*/
22-
#define __NR_syscalls (392)
22+
#define __NR_syscalls (396)
2323

2424
#define __ARCH_WANT_STAT64
2525
#define __ARCH_WANT_SYS_GETHOSTNAME

arch/arm/include/uapi/asm/unistd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,8 @@
418418
#define __NR_membarrier (__NR_SYSCALL_BASE+389)
419419
#define __NR_mlock2 (__NR_SYSCALL_BASE+390)
420420
#define __NR_copy_file_range (__NR_SYSCALL_BASE+391)
421+
#define __NR_preadv2 (__NR_SYSCALL_BASE+392)
422+
#define __NR_pwritev2 (__NR_SYSCALL_BASE+393)
421423

422424
/*
423425
* The following SWIs are ARM private.

arch/arm/kernel/calls.S

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,10 @@
399399
CALL(sys_execveat)
400400
CALL(sys_userfaultfd)
401401
CALL(sys_membarrier)
402-
CALL(sys_mlock2)
402+
/* 390 */ CALL(sys_mlock2)
403403
CALL(sys_copy_file_range)
404+
CALL(sys_preadv2)
405+
CALL(sys_pwritev2)
404406
#ifndef syscalls_counted
405407
.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
406408
#define syscalls_counted

arch/arm/kernel/setup.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,13 @@ static void __init patch_aeabi_idiv(void)
430430
pr_info("CPU: div instructions available: patching division code\n");
431431

432432
fn_addr = ((uintptr_t)&__aeabi_uidiv) & ~1;
433+
asm ("" : "+g" (fn_addr));
433434
((u32 *)fn_addr)[0] = udiv_instruction();
434435
((u32 *)fn_addr)[1] = bx_lr_instruction();
435436
flush_icache_range(fn_addr, fn_addr + 8);
436437

437438
fn_addr = ((uintptr_t)&__aeabi_idiv) & ~1;
439+
asm ("" : "+g" (fn_addr));
438440
((u32 *)fn_addr)[0] = sdiv_instruction();
439441
((u32 *)fn_addr)[1] = bx_lr_instruction();
440442
flush_icache_range(fn_addr, fn_addr + 8);

arch/arm/mm/proc-v7.S

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,12 @@ __v7_ca17mp_setup:
281281
bl v7_invalidate_l1
282282
ldmia r12, {r1-r6, lr}
283283
#ifdef CONFIG_SMP
284+
orr r10, r10, #(1 << 6) @ Enable SMP/nAMP mode
284285
ALT_SMP(mrc p15, 0, r0, c1, c0, 1)
285-
ALT_UP(mov r0, #(1 << 6)) @ fake it for UP
286-
tst r0, #(1 << 6) @ SMP/nAMP mode enabled?
287-
orreq r0, r0, #(1 << 6) @ Enable SMP/nAMP mode
288-
orreq r0, r0, r10 @ Enable CPU-specific SMP bits
289-
mcreq p15, 0, r0, c1, c0, 1
286+
ALT_UP(mov r0, r10) @ fake it for UP
287+
orr r10, r10, r0 @ Set required bits
288+
teq r10, r0 @ Were they already set?
289+
mcrne p15, 0, r10, c1, c0, 1 @ No, update register
290290
#endif
291291
b __v7_setup_cont
292292

0 commit comments

Comments
 (0)