Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215516
b: refs/heads/master
c: d793fe8
h: refs/heads/master
v: v3
  • Loading branch information
Nathan Holstein authored and Gustavo F. Padovan committed Oct 17, 2010
1 parent 6328030 commit fb8b6c5
Show file tree
Hide file tree
Showing 54 changed files with 249 additions and 346 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c2a1b86644a6f3fc6b788d3a591563aff71f836
refs/heads/master: d793fe8caa3911e6a1e826b45d4ee00d250cdec8
2 changes: 1 addition & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3162,7 +3162,7 @@ F: drivers/net/ioc3-eth.c

IOC3 SERIAL DRIVER
M: Pat Gefre <pfg@sgi.com>
L: linux-serial@vger.kernel.org
L: linux-mips@linux-mips.org
S: Maintained
F: drivers/serial/ioc3_serial.c

Expand Down
2 changes: 1 addition & 1 deletion trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 36
EXTRAVERSION =
EXTRAVERSION = -rc8
NAME = Flesh-Eating Bats with Fangs

# *DOCUMENTATION*
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/m32r/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ typedef elf_fpreg_t elf_fpregset_t;
* These are used to set parameters in the core dumps.
*/
#define ELF_CLASS ELFCLASS32
#if defined(__LITTLE_ENDIAN__)
#if defined(__LITTLE_ENDIAN)
#define ELF_DATA ELFDATA2LSB
#elif defined(__BIG_ENDIAN__)
#elif defined(__BIG_ENDIAN)
#define ELF_DATA ELFDATA2MSB
#else
#error no endian defined
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/m32r/kernel/.gitignore

This file was deleted.

4 changes: 1 addition & 3 deletions trunk/arch/m32r/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

#define DEBUG_SIG 0

#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))

asmlinkage int
sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
unsigned long r2, unsigned long r3, unsigned long r4,
Expand Down Expand Up @@ -256,7 +254,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
static int prev_insn(struct pt_regs *regs)
{
u16 inst;
if (get_user(inst, (u16 __user *)(regs->bpc - 2)))
if (get_user(&inst, (u16 __user *)(regs->bpc - 2)))
return -EFAULT;
if ((inst & 0xfff0) == 0x10f0) /* trap ? */
regs->bpc -= 2;
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/mips/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ subdir-ccflags-y := -Werror
include arch/mips/Kbuild.platforms
obj-y := $(platform-y)

# make clean traverses $(obj-) without having included .config, so
# everything ends up here
obj- := $(platform-)

# mips object files
# The object files are linked as core-y files would be linked

Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -881,15 +881,11 @@ config NO_IOPORT
config GENERIC_ISA_DMA
bool
select ZONE_DMA if GENERIC_ISA_DMA_SUPPORT_BROKEN=n
select ISA_DMA_API

config GENERIC_ISA_DMA_SUPPORT_BROKEN
bool
select GENERIC_ISA_DMA

config ISA_DMA_API
bool

config GENERIC_GPIO
bool

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYFLAGS) -S -O srec
vmlinuz.srec: vmlinuz
$(call cmd,objcopy)

clean-files := $(objtree)/vmlinuz $(objtree)/vmlinuz.{32,ecoff,bin,srec}
clean-files := $(objtree)/vmlinuz.*
2 changes: 1 addition & 1 deletion trunk/arch/mips/dec/Platform
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# DECstation family
#
platform-$(CONFIG_MACH_DECSTATION) += dec/
platform-$(CONFIG_MACH_DECSTATION) = dec/
cflags-$(CONFIG_MACH_DECSTATION) += \
-I$(srctree)/arch/mips/include/asm/mach-dec
libs-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/prom/
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/mips/include/asm/fcntl.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
*/

#ifdef CONFIG_32BIT
#include <linux/types.h>

struct flock {
short l_type;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/jz4740/Platform
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
platform-$(CONFIG_MACH_JZ4740) += jz4740/
core-$(CONFIG_MACH_JZ4740) += arch/mips/jz4740/
cflags-$(CONFIG_MACH_JZ4740) += -I$(srctree)/arch/mips/include/asm/mach-jz4740
load-$(CONFIG_MACH_JZ4740) += 0xffffffff80010000
1 change: 1 addition & 0 deletions trunk/arch/mips/kernel/branch.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ int __compute_return_epc(struct pt_regs *regs)
return -EFAULT;
}

regs->regs[0] = 0;
switch (insn.i_format.opcode) {
/*
* jr and jalr are in r_format format.
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/mips/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit)
{
/* do the secure computing check first */
if (!entryexit)
secure_computing(regs->regs[2]);
secure_computing(regs->regs[0]);

if (unlikely(current->audit_context) && entryexit)
audit_syscall_exit(AUDITSC_RESULT(regs->regs[2]),
Expand Down Expand Up @@ -565,7 +565,7 @@ asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit)

out:
if (unlikely(current->audit_context) && !entryexit)
audit_syscall_entry(audit_arch(), regs->regs[2],
audit_syscall_entry(audit_arch(), regs->regs[0],
regs->regs[4], regs->regs[5],
regs->regs[6], regs->regs[7]);
}
11 changes: 6 additions & 5 deletions trunk/arch/mips/kernel/scall32-o32.S
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ stack_done:
sw t0, PT_R7(sp) # set error flag
beqz t0, 1f

lw t1, PT_R2(sp) # syscall number
negu v0 # error
sw t1, PT_R0(sp) # save it for syscall restarting
sw v0, PT_R0(sp) # set flag for syscall
# restarting
1: sw v0, PT_R2(sp) # result

o32_syscall_exit:
Expand Down Expand Up @@ -104,9 +104,9 @@ syscall_trace_entry:
sw t0, PT_R7(sp) # set error flag
beqz t0, 1f

lw t1, PT_R2(sp) # syscall number
negu v0 # error
sw t1, PT_R0(sp) # save it for syscall restarting
sw v0, PT_R0(sp) # set flag for syscall
# restarting
1: sw v0, PT_R2(sp) # result

j syscall_exit
Expand Down Expand Up @@ -169,7 +169,8 @@ stackargs:
* We probably should handle this case a bit more drastic.
*/
bad_stack:
li v0, EFAULT
negu v0 # error
sw v0, PT_R0(sp)
sw v0, PT_R2(sp)
li t0, 1 # set error flag
sw t0, PT_R7(sp)
Expand Down
7 changes: 3 additions & 4 deletions trunk/arch/mips/kernel/scall64-64.S
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ NESTED(handle_sys64, PT_SIZE, sp)
sd t0, PT_R7(sp) # set error flag
beqz t0, 1f

ld t1, PT_R2(sp) # syscall number
dnegu v0 # error
sd t1, PT_R0(sp) # save it for syscall restarting
sd v0, PT_R0(sp) # set flag for syscall
# restarting
1: sd v0, PT_R2(sp) # result

n64_syscall_exit:
Expand Down Expand Up @@ -109,9 +109,8 @@ syscall_trace_entry:
sd t0, PT_R7(sp) # set error flag
beqz t0, 1f

ld t1, PT_R2(sp) # syscall number
dnegu v0 # error
sd t1, PT_R0(sp) # save it for syscall restarting
sd v0, PT_R0(sp) # set flag for syscall restarting
1: sd v0, PT_R2(sp) # result

j syscall_exit
Expand Down
12 changes: 5 additions & 7 deletions trunk/arch/mips/kernel/scall64-n32.S
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ NESTED(handle_sysn32, PT_SIZE, sp)
sd t0, PT_R7(sp) # set error flag
beqz t0, 1f

ld t1, PT_R2(sp) # syscall number
dnegu v0 # error
sd t1, PT_R0(sp) # save it for syscall restarting
sd v0, PT_R0(sp) # set flag for syscall restarting
1: sd v0, PT_R2(sp) # result

local_irq_disable # make sure need_resched and
Expand Down Expand Up @@ -107,9 +106,8 @@ n32_syscall_trace_entry:
sd t0, PT_R7(sp) # set error flag
beqz t0, 1f

ld t1, PT_R2(sp) # syscall number
dnegu v0 # error
sd t1, PT_R0(sp) # save it for syscall restarting
sd v0, PT_R0(sp) # set flag for syscall restarting
1: sd v0, PT_R2(sp) # result

j syscall_exit
Expand Down Expand Up @@ -322,10 +320,10 @@ EXPORT(sysn32_call_table)
PTR sys_cacheflush
PTR sys_cachectl
PTR sys_sysmips
PTR compat_sys_io_setup /* 6200 */
PTR sys_io_setup /* 6200 */
PTR sys_io_destroy
PTR compat_sys_io_getevents
PTR compat_sys_io_submit
PTR sys_io_getevents
PTR sys_io_submit
PTR sys_io_cancel
PTR sys_exit_group /* 6205 */
PTR sys_lookup_dcookie
Expand Down
15 changes: 7 additions & 8 deletions trunk/arch/mips/kernel/scall64-o32.S
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,8 @@ NESTED(handle_sys, PT_SIZE, sp)
sd t0, PT_R7(sp) # set error flag
beqz t0, 1f

ld t1, PT_R2(sp) # syscall number
dnegu v0 # error
sd t1, PT_R0(sp) # save it for syscall restarting
sd v0, PT_R0(sp) # flag for syscall restarting
1: sd v0, PT_R2(sp) # result

o32_syscall_exit:
Expand Down Expand Up @@ -143,9 +142,8 @@ trace_a_syscall:
sd t0, PT_R7(sp) # set error flag
beqz t0, 1f

ld t1, PT_R2(sp) # syscall number
dnegu v0 # error
sd t1, PT_R0(sp) # save it for syscall restarting
sd v0, PT_R0(sp) # set flag for syscall restarting
1: sd v0, PT_R2(sp) # result

j syscall_exit
Expand All @@ -156,7 +154,8 @@ trace_a_syscall:
* The stackpointer for a call with more than 4 arguments is bad.
*/
bad_stack:
li v0, EFAULT
dnegu v0 # error
sd v0, PT_R0(sp)
sd v0, PT_R2(sp)
li t0, 1 # set error flag
sd t0, PT_R7(sp)
Expand Down Expand Up @@ -445,10 +444,10 @@ sys_call_table:
PTR compat_sys_futex
PTR compat_sys_sched_setaffinity
PTR compat_sys_sched_getaffinity /* 4240 */
PTR compat_sys_io_setup
PTR sys_io_setup
PTR sys_io_destroy
PTR compat_sys_io_getevents
PTR compat_sys_io_submit
PTR sys_io_getevents
PTR sys_io_submit
PTR sys_io_cancel /* 4245 */
PTR sys_exit_group
PTR sys32_lookup_dcookie
Expand Down
45 changes: 23 additions & 22 deletions trunk/arch/mips/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
{
struct rt_sigframe __user *frame;
sigset_t set;
stack_t st;
int sig;

frame = (struct rt_sigframe __user *) regs.regs[29];
Expand All @@ -410,9 +411,11 @@ asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
else if (sig)
force_sig(sig, current);

if (__copy_from_user(&st, &frame->rs_uc.uc_stack, sizeof(st)))
goto badframe;
/* It is more difficult to avoid calling this function than to
call it and ignore errors. */
do_sigaltstack(&frame->rs_uc.uc_stack, NULL, regs.regs[29]);
do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]);

/*
* Don't let your children do this ...
Expand Down Expand Up @@ -547,37 +550,31 @@ static int handle_signal(unsigned long sig, siginfo_t *info,
struct mips_abi *abi = current->thread.abi;
void *vdso = current->mm->context.vdso;

if (regs->regs[0]) {
switch(regs->regs[2]) {
case ERESTART_RESTARTBLOCK:
case ERESTARTNOHAND:
switch(regs->regs[0]) {
case ERESTART_RESTARTBLOCK:
case ERESTARTNOHAND:
regs->regs[2] = EINTR;
break;
case ERESTARTSYS:
if (!(ka->sa.sa_flags & SA_RESTART)) {
regs->regs[2] = EINTR;
break;
case ERESTARTSYS:
if (!(ka->sa.sa_flags & SA_RESTART)) {
regs->regs[2] = EINTR;
break;
}
/* fallthrough */
case ERESTARTNOINTR:
regs->regs[7] = regs->regs[26];
regs->regs[2] = regs->regs[0];
regs->cp0_epc -= 4;
}

regs->regs[0] = 0; /* Don't deal with this again. */
/* fallthrough */
case ERESTARTNOINTR: /* Userland will reload $v0. */
regs->regs[7] = regs->regs[26];
regs->cp0_epc -= 8;
}

regs->regs[0] = 0; /* Don't deal with this again. */

if (sig_uses_siginfo(ka))
ret = abi->setup_rt_frame(vdso + abi->rt_signal_return_offset,
ka, regs, sig, oldset, info);
else
ret = abi->setup_frame(vdso + abi->signal_return_offset,
ka, regs, sig, oldset);

if (ret)
return ret;

spin_lock_irq(&current->sighand->siglock);
sigorsets(&current->blocked, &current->blocked, &ka->sa.sa_mask);
if (!(ka->sa.sa_flags & SA_NODEFER))
Expand Down Expand Up @@ -625,13 +622,17 @@ static void do_signal(struct pt_regs *regs)
return;
}

/*
* Who's code doesn't conform to the restartable syscall convention
* dies here!!! The li instruction, a single machine instruction,
* must directly be followed by the syscall instruction.
*/
if (regs->regs[0]) {
if (regs->regs[2] == ERESTARTNOHAND ||
regs->regs[2] == ERESTARTSYS ||
regs->regs[2] == ERESTARTNOINTR) {
regs->regs[2] = regs->regs[0];
regs->regs[7] = regs->regs[26];
regs->cp0_epc -= 4;
regs->cp0_epc -= 8;
}
if (regs->regs[2] == ERESTART_RESTARTBLOCK) {
regs->regs[2] = current->thread.abi->restart;
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/mips/kernel/signal_n32.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ asmlinkage int sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
{
struct rt_sigframe_n32 __user *frame;
mm_segment_t old_fs;
sigset_t set;
stack_t st;
s32 sp;
Expand Down Expand Up @@ -144,11 +143,7 @@ asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)

/* It is more difficult to avoid calling this function than to
call it and ignore errors. */
old_fs = get_fs();
set_fs(KERNEL_DS);
do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]);
set_fs(old_fs);


/*
* Don't let your children do this ...
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/mips/kernel/unaligned.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ static void emulate_load_store_insn(struct pt_regs *regs,
unsigned long value;
unsigned int res;

regs->regs[0] = 0;

/*
* This load never faults.
*/
Expand Down
Loading

0 comments on commit fb8b6c5

Please sign in to comment.