Merge branch 'clps711x/cleanup' into next/cleanup
Patches from Alexander Shiyan <shc_work@mail.ru>: * clps711x/cleanup: ARM: clps711x: Remove the setting of the time ARM: clps711x: Removed superfluous transform virt_to_bus and related functions ARM: clps711x/p720t: Replace __initcall by .init_early call Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -187,8 +187,8 @@ void kprobe_arm_test_cases(void)
|
||||
TEST_BF_R ("mov pc, r",0,2f,"")
|
||||
TEST_BF_RR("mov pc, r",0,2f,", asl r",1,0,"")
|
||||
TEST_BB( "sub pc, pc, #1b-2b+8")
|
||||
#if __LINUX_ARM_ARCH__ >= 6
|
||||
TEST_BB( "sub pc, pc, #1b-2b+8-2") /* UNPREDICTABLE before ARMv6 */
|
||||
#if __LINUX_ARM_ARCH__ == 6 && !defined(CONFIG_CPU_V7)
|
||||
TEST_BB( "sub pc, pc, #1b-2b+8-2") /* UNPREDICTABLE before and after ARMv6 */
|
||||
#endif
|
||||
TEST_BB_R( "sub pc, pc, r",14, 1f-2f+8,"")
|
||||
TEST_BB_R( "rsb pc, r",14,1f-2f+8,", pc")
|
||||
|
@@ -503,7 +503,7 @@ __hw_perf_event_init(struct perf_event *event)
|
||||
event_requires_mode_exclusion(&event->attr)) {
|
||||
pr_debug("ARM performance counters do not support "
|
||||
"mode exclusion\n");
|
||||
return -EPERM;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -25,7 +25,6 @@
|
||||
#include <linux/regset.h>
|
||||
#include <linux/audit.h>
|
||||
#include <linux/tracehook.h>
|
||||
#include <linux/unistd.h>
|
||||
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/traps.h>
|
||||
@@ -918,8 +917,6 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)
|
||||
audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0,
|
||||
regs->ARM_r1, regs->ARM_r2, regs->ARM_r3);
|
||||
|
||||
if (why == 0 && test_and_clear_thread_flag(TIF_SYSCALL_RESTARTSYS))
|
||||
scno = __NR_restart_syscall - __NR_SYSCALL_BASE;
|
||||
if (!test_thread_flag(TIF_SYSCALL_TRACE))
|
||||
return scno;
|
||||
|
||||
|
@@ -27,6 +27,7 @@
|
||||
*/
|
||||
#define SWI_SYS_SIGRETURN (0xef000000|(__NR_sigreturn)|(__NR_OABI_SYSCALL_BASE))
|
||||
#define SWI_SYS_RT_SIGRETURN (0xef000000|(__NR_rt_sigreturn)|(__NR_OABI_SYSCALL_BASE))
|
||||
#define SWI_SYS_RESTART (0xef000000|__NR_restart_syscall|__NR_OABI_SYSCALL_BASE)
|
||||
|
||||
/*
|
||||
* With EABI, the syscall number has to be loaded into r7.
|
||||
@@ -46,6 +47,18 @@ const unsigned long sigreturn_codes[7] = {
|
||||
MOV_R7_NR_RT_SIGRETURN, SWI_SYS_RT_SIGRETURN, SWI_THUMB_RT_SIGRETURN,
|
||||
};
|
||||
|
||||
/*
|
||||
* Either we support OABI only, or we have EABI with the OABI
|
||||
* compat layer enabled. In the later case we don't know if
|
||||
* user space is EABI or not, and if not we must not clobber r7.
|
||||
* Always using the OABI syscall solves that issue and works for
|
||||
* all those cases.
|
||||
*/
|
||||
const unsigned long syscall_restart_code[2] = {
|
||||
SWI_SYS_RESTART, /* swi __NR_restart_syscall */
|
||||
0xe49df004, /* ldr pc, [sp], #4 */
|
||||
};
|
||||
|
||||
/*
|
||||
* atomically swap in the new signal mask, and wait for a signal.
|
||||
*/
|
||||
@@ -592,10 +605,12 @@ static void do_signal(struct pt_regs *regs, int syscall)
|
||||
case -ERESTARTNOHAND:
|
||||
case -ERESTARTSYS:
|
||||
case -ERESTARTNOINTR:
|
||||
case -ERESTART_RESTARTBLOCK:
|
||||
regs->ARM_r0 = regs->ARM_ORIG_r0;
|
||||
regs->ARM_pc = restart_addr;
|
||||
break;
|
||||
case -ERESTART_RESTARTBLOCK:
|
||||
regs->ARM_r0 = -EINTR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -611,14 +626,12 @@ static void do_signal(struct pt_regs *regs, int syscall)
|
||||
* debugger has chosen to restart at a different PC.
|
||||
*/
|
||||
if (regs->ARM_pc == restart_addr) {
|
||||
if (retval == -ERESTARTNOHAND ||
|
||||
retval == -ERESTART_RESTARTBLOCK
|
||||
if (retval == -ERESTARTNOHAND
|
||||
|| (retval == -ERESTARTSYS
|
||||
&& !(ka.sa.sa_flags & SA_RESTART))) {
|
||||
regs->ARM_r0 = -EINTR;
|
||||
regs->ARM_pc = continue_addr;
|
||||
}
|
||||
clear_thread_flag(TIF_SYSCALL_RESTARTSYS);
|
||||
}
|
||||
|
||||
handle_signal(signr, &ka, &info, regs);
|
||||
@@ -632,8 +645,29 @@ static void do_signal(struct pt_regs *regs, int syscall)
|
||||
* ignore the restart.
|
||||
*/
|
||||
if (retval == -ERESTART_RESTARTBLOCK
|
||||
&& regs->ARM_pc == restart_addr)
|
||||
set_thread_flag(TIF_SYSCALL_RESTARTSYS);
|
||||
&& regs->ARM_pc == continue_addr) {
|
||||
if (thumb_mode(regs)) {
|
||||
regs->ARM_r7 = __NR_restart_syscall - __NR_SYSCALL_BASE;
|
||||
regs->ARM_pc -= 2;
|
||||
} else {
|
||||
#if defined(CONFIG_AEABI) && !defined(CONFIG_OABI_COMPAT)
|
||||
regs->ARM_r7 = __NR_restart_syscall;
|
||||
regs->ARM_pc -= 4;
|
||||
#else
|
||||
u32 __user *usp;
|
||||
|
||||
regs->ARM_sp -= 4;
|
||||
usp = (u32 __user *)regs->ARM_sp;
|
||||
|
||||
if (put_user(regs->ARM_pc, usp) == 0) {
|
||||
regs->ARM_pc = KERN_RESTART_CODE;
|
||||
} else {
|
||||
regs->ARM_sp += 4;
|
||||
force_sigsegv(0, current);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
restore_saved_sigmask();
|
||||
|
@@ -8,5 +8,7 @@
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#define KERN_SIGRETURN_CODE (CONFIG_VECTORS_BASE + 0x00000500)
|
||||
#define KERN_RESTART_CODE (KERN_SIGRETURN_CODE + sizeof(sigreturn_codes))
|
||||
|
||||
extern const unsigned long sigreturn_codes[7];
|
||||
extern const unsigned long syscall_restart_code[2];
|
||||
|
@@ -820,6 +820,8 @@ void __init early_trap_init(void *vectors_base)
|
||||
*/
|
||||
memcpy((void *)(vectors + KERN_SIGRETURN_CODE - CONFIG_VECTORS_BASE),
|
||||
sigreturn_codes, sizeof(sigreturn_codes));
|
||||
memcpy((void *)(vectors + KERN_RESTART_CODE - CONFIG_VECTORS_BASE),
|
||||
syscall_restart_code, sizeof(syscall_restart_code));
|
||||
|
||||
flush_icache_range(vectors, vectors + PAGE_SIZE);
|
||||
modify_domain(DOMAIN_USER, DOMAIN_CLIENT);
|
||||
|
@@ -183,7 +183,9 @@ SECTIONS
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
PERCPU_SECTION(L1_CACHE_BYTES)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_XIP_KERNEL
|
||||
__data_loc = ALIGN(4); /* location in binary */
|
||||
|
Reference in New Issue
Block a user