Merge branch 'linus' into irq/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -35,7 +35,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
|
||||
int __res = 1; \
|
||||
struct elfhdr *__h = (hdr); \
|
||||
\
|
||||
if (__h->e_machine != EM_MIPS) \
|
||||
if (!mips_elf_check_machine(__h)) \
|
||||
__res = 0; \
|
||||
if (__h->e_ident[EI_CLASS] != ELFCLASS32) \
|
||||
__res = 0; \
|
||||
|
@@ -47,7 +47,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
|
||||
int __res = 1; \
|
||||
struct elfhdr *__h = (hdr); \
|
||||
\
|
||||
if (__h->e_machine != EM_MIPS) \
|
||||
if (!mips_elf_check_machine(__h)) \
|
||||
__res = 0; \
|
||||
if (__h->e_ident[EI_CLASS] != ELFCLASS32) \
|
||||
__res = 0; \
|
||||
|
@@ -65,12 +65,10 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
|
||||
status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|ST0_FR|KU_MASK);
|
||||
status |= KU_USER;
|
||||
regs->cp0_status = status;
|
||||
clear_used_math();
|
||||
clear_fpu_owner();
|
||||
init_dsp();
|
||||
clear_thread_flag(TIF_USEDMSA);
|
||||
lose_fpu(0);
|
||||
clear_thread_flag(TIF_MSA_CTX_LIVE);
|
||||
disable_msa();
|
||||
clear_used_math();
|
||||
init_dsp();
|
||||
regs->cp0_epc = pc;
|
||||
regs->regs[29] = sp;
|
||||
}
|
||||
|
@@ -125,7 +125,7 @@ LEAF(_restore_fp_context)
|
||||
END(_restore_fp_context)
|
||||
.set reorder
|
||||
|
||||
.type fault@function
|
||||
.type fault, @function
|
||||
.ent fault
|
||||
fault: li v0, -EFAULT
|
||||
jr ra
|
||||
|
@@ -358,7 +358,7 @@ LEAF(_restore_msa_all_upper)
|
||||
|
||||
.set reorder
|
||||
|
||||
.type fault@function
|
||||
.type fault, @function
|
||||
.ent fault
|
||||
fault: li v0, -EFAULT # failure
|
||||
jr ra
|
||||
|
@@ -595,3 +595,4 @@ EXPORT(sys_call_table)
|
||||
PTR sys_userfaultfd
|
||||
PTR sys_membarrier
|
||||
PTR sys_mlock2
|
||||
PTR sys_copy_file_range /* 4360 */
|
||||
|
@@ -433,4 +433,5 @@ EXPORT(sys_call_table)
|
||||
PTR sys_userfaultfd
|
||||
PTR sys_membarrier
|
||||
PTR sys_mlock2
|
||||
PTR sys_copy_file_range /* 5320 */
|
||||
.size sys_call_table,.-sys_call_table
|
||||
|
@@ -423,4 +423,5 @@ EXPORT(sysn32_call_table)
|
||||
PTR sys_userfaultfd
|
||||
PTR sys_membarrier
|
||||
PTR sys_mlock2
|
||||
PTR sys_copy_file_range
|
||||
.size sysn32_call_table,.-sysn32_call_table
|
||||
|
@@ -578,4 +578,5 @@ EXPORT(sys32_call_table)
|
||||
PTR sys_userfaultfd
|
||||
PTR sys_membarrier
|
||||
PTR sys_mlock2
|
||||
PTR sys_copy_file_range /* 4360 */
|
||||
.size sys32_call_table,.-sys32_call_table
|
||||
|
@@ -782,6 +782,7 @@ static inline void prefill_possible_map(void) {}
|
||||
void __init setup_arch(char **cmdline_p)
|
||||
{
|
||||
cpu_probe();
|
||||
mips_cm_probe();
|
||||
prom_init();
|
||||
|
||||
setup_early_fdc_console();
|
||||
|
@@ -663,7 +663,7 @@ static int simulate_rdhwr_normal(struct pt_regs *regs, unsigned int opcode)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int simulate_rdhwr_mm(struct pt_regs *regs, unsigned short opcode)
|
||||
static int simulate_rdhwr_mm(struct pt_regs *regs, unsigned int opcode)
|
||||
{
|
||||
if ((opcode & MM_POOL32A_FUNC) == MM_RDHWR) {
|
||||
int rd = (opcode & MM_RS) >> 16;
|
||||
@@ -690,15 +690,15 @@ static int simulate_sync(struct pt_regs *regs, unsigned int opcode)
|
||||
asmlinkage void do_ov(struct pt_regs *regs)
|
||||
{
|
||||
enum ctx_state prev_state;
|
||||
siginfo_t info;
|
||||
siginfo_t info = {
|
||||
.si_signo = SIGFPE,
|
||||
.si_code = FPE_INTOVF,
|
||||
.si_addr = (void __user *)regs->cp0_epc,
|
||||
};
|
||||
|
||||
prev_state = exception_enter();
|
||||
die_if_kernel("Integer overflow", regs);
|
||||
|
||||
info.si_code = FPE_INTOVF;
|
||||
info.si_signo = SIGFPE;
|
||||
info.si_errno = 0;
|
||||
info.si_addr = (void __user *) regs->cp0_epc;
|
||||
force_sig_info(SIGFPE, &info, current);
|
||||
exception_exit(prev_state);
|
||||
}
|
||||
@@ -874,7 +874,7 @@ out:
|
||||
void do_trap_or_bp(struct pt_regs *regs, unsigned int code,
|
||||
const char *str)
|
||||
{
|
||||
siginfo_t info;
|
||||
siginfo_t info = { 0 };
|
||||
char b[40];
|
||||
|
||||
#ifdef CONFIG_KGDB_LOW_LEVEL_TRAP
|
||||
@@ -903,7 +903,6 @@ void do_trap_or_bp(struct pt_regs *regs, unsigned int code,
|
||||
else
|
||||
info.si_code = FPE_INTOVF;
|
||||
info.si_signo = SIGFPE;
|
||||
info.si_errno = 0;
|
||||
info.si_addr = (void __user *) regs->cp0_epc;
|
||||
force_sig_info(SIGFPE, &info, current);
|
||||
break;
|
||||
@@ -1119,11 +1118,12 @@ no_r2_instr:
|
||||
if (get_isa16_mode(regs->cp0_epc)) {
|
||||
unsigned short mmop[2] = { 0 };
|
||||
|
||||
if (unlikely(get_user(mmop[0], epc) < 0))
|
||||
if (unlikely(get_user(mmop[0], (u16 __user *)epc + 0) < 0))
|
||||
status = SIGSEGV;
|
||||
if (unlikely(get_user(mmop[1], epc) < 0))
|
||||
if (unlikely(get_user(mmop[1], (u16 __user *)epc + 1) < 0))
|
||||
status = SIGSEGV;
|
||||
opcode = (mmop[0] << 16) | mmop[1];
|
||||
opcode = mmop[0];
|
||||
opcode = (opcode << 16) | mmop[1];
|
||||
|
||||
if (status < 0)
|
||||
status = simulate_rdhwr_mm(regs, opcode);
|
||||
@@ -1369,26 +1369,12 @@ asmlinkage void do_cpu(struct pt_regs *regs)
|
||||
if (unlikely(compute_return_epc(regs) < 0))
|
||||
break;
|
||||
|
||||
if (get_isa16_mode(regs->cp0_epc)) {
|
||||
unsigned short mmop[2] = { 0 };
|
||||
|
||||
if (unlikely(get_user(mmop[0], epc) < 0))
|
||||
status = SIGSEGV;
|
||||
if (unlikely(get_user(mmop[1], epc) < 0))
|
||||
status = SIGSEGV;
|
||||
opcode = (mmop[0] << 16) | mmop[1];
|
||||
|
||||
if (status < 0)
|
||||
status = simulate_rdhwr_mm(regs, opcode);
|
||||
} else {
|
||||
if (!get_isa16_mode(regs->cp0_epc)) {
|
||||
if (unlikely(get_user(opcode, epc) < 0))
|
||||
status = SIGSEGV;
|
||||
|
||||
if (!cpu_has_llsc && status < 0)
|
||||
status = simulate_llsc(regs, opcode);
|
||||
|
||||
if (status < 0)
|
||||
status = simulate_rdhwr_normal(regs, opcode);
|
||||
}
|
||||
|
||||
if (status < 0)
|
||||
|
Reference in New Issue
Block a user