Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42587
b: refs/heads/master
c: f0bc814
h: refs/heads/master
i:
  42585: b6bf188
  42583: adb0c8c
v: v3
  • Loading branch information
Stuart Menefy authored and Paul Mundt committed Dec 6, 2006
1 parent fce07f0 commit 8b871dc
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 65 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: 53644087a607040a56d883df612b588814a56f11
refs/heads/master: f0bc814cfbc212683c882e58b3d1afec6b3e3aa3
2 changes: 1 addition & 1 deletion trunk/arch/sh/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ cflags-$(CONFIG_CPU_SH4A) := -m4a $(call cc-option,-m4a-nofpu,)
cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml

cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),)
cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),) -ffreestanding

cflags-$(CONFIG_SH_DSP) += -Wa,-dsp
cflags-$(CONFIG_SH_KGDB) += -g
Expand Down
18 changes: 10 additions & 8 deletions trunk/arch/sh/kernel/cpu/sh4/fpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,29 +296,31 @@ ieee_fpe_handler (struct pt_regs *regs)
}

asmlinkage void
do_fpu_error(unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7,
struct pt_regs regs)
do_fpu_error(unsigned long r4, unsigned long r5, unsigned long r6,
unsigned long r7, struct pt_regs __regs)
{
struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
struct task_struct *tsk = current;

if (ieee_fpe_handler (&regs))
if (ieee_fpe_handler(regs))
return;

regs.pc += 2;
save_fpu(tsk, &regs);
regs->pc += 2;
save_fpu(tsk, regs);
tsk->thread.trap_no = 11;
tsk->thread.error_code = 0;
force_sig(SIGFPE, tsk);
}

asmlinkage void
do_fpu_state_restore(unsigned long r4, unsigned long r5, unsigned long r6,
unsigned long r7, struct pt_regs regs)
unsigned long r7, struct pt_regs __regs)
{
struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
struct task_struct *tsk = current;

grab_fpu(&regs);
if (!user_mode(&regs)) {
grab_fpu(regs);
if (!user_mode(regs)) {
printk(KERN_ERR "BUG: FPU is used in kernel mode.\n");
return;
}
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/sh/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ static union irq_ctx *softirq_ctx[NR_CPUS];

asmlinkage int do_IRQ(unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7,
struct pt_regs regs)
struct pt_regs __regs)
{
struct pt_regs *old_regs = set_irq_regs(&regs);
struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
struct pt_regs *old_regs = set_irq_regs(regs);
int irq;
#ifdef CONFIG_4KSTACKS
union irq_ctx *curctx, *irqctx;
Expand Down
32 changes: 18 additions & 14 deletions trunk/arch/sh/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,11 @@ struct task_struct *__switch_to(struct task_struct *prev, struct task_struct *ne

asmlinkage int sys_fork(unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7,
struct pt_regs regs)
struct pt_regs __regs)
{
struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
#ifdef CONFIG_MMU
return do_fork(SIGCHLD, regs.regs[15], &regs, 0, NULL, NULL);
return do_fork(SIGCHLD, regs->regs[15], regs, 0, NULL, NULL);
#else
/* fork almost works, enough to trick you into looking elsewhere :-( */
return -EINVAL;
Expand All @@ -398,11 +399,12 @@ asmlinkage int sys_fork(unsigned long r4, unsigned long r5,
asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
unsigned long parent_tidptr,
unsigned long child_tidptr,
struct pt_regs regs)
struct pt_regs __regs)
{
struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
if (!newsp)
newsp = regs.regs[15];
return do_fork(clone_flags, newsp, &regs, 0,
newsp = regs->regs[15];
return do_fork(clone_flags, newsp, regs, 0,
(int __user *)parent_tidptr, (int __user *)child_tidptr);
}

Expand All @@ -418,9 +420,10 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
*/
asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7,
struct pt_regs regs)
struct pt_regs __regs)
{
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.regs[15], &regs,
struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->regs[15], regs,
0, NULL, NULL);
}

Expand All @@ -429,8 +432,9 @@ asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
*/
asmlinkage int sys_execve(char *ufilename, char **uargv,
char **uenvp, unsigned long r7,
struct pt_regs regs)
struct pt_regs __regs)
{
struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
int error;
char *filename;

Expand All @@ -442,7 +446,7 @@ asmlinkage int sys_execve(char *ufilename, char **uargv,
error = do_execve(filename,
(char __user * __user *)uargv,
(char __user * __user *)uenvp,
&regs);
regs);
if (error == 0) {
task_lock(current);
current->ptrace &= ~PT_DTRACE;
Expand Down Expand Up @@ -472,9 +476,7 @@ unsigned long get_wchan(struct task_struct *p)
return pc;
}

asmlinkage void break_point_trap(unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7,
struct pt_regs regs)
asmlinkage void break_point_trap(void)
{
/* Clear tracing. */
#if defined(CONFIG_CPU_SH4A)
Expand All @@ -492,8 +494,10 @@ asmlinkage void break_point_trap(unsigned long r4, unsigned long r5,

asmlinkage void break_point_trap_software(unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7,
struct pt_regs regs)
struct pt_regs __regs)
{
regs.pc -= 2;
struct pt_regs *regs = RELOC_HIDE(&__regs, 0);

regs->pc -= 2;
force_sig(SIGTRAP, current);
}
2 changes: 0 additions & 2 deletions trunk/arch/sh/kernel/sh_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ DECLARE_EXPORT(__lshrdi3);
DECLARE_EXPORT(__movstr);
DECLARE_EXPORT(__movstrSI16);

EXPORT_SYMBOL(strcpy);

#ifdef CONFIG_CPU_SH4
DECLARE_EXPORT(__movstr_i4_even);
DECLARE_EXPORT(__movstr_i4_odd);
Expand Down
26 changes: 15 additions & 11 deletions trunk/arch/sh/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
asmlinkage int
sys_sigsuspend(old_sigset_t mask,
unsigned long r5, unsigned long r6, unsigned long r7,
struct pt_regs regs)
struct pt_regs __regs)
{
mask &= _BLOCKABLE;
spin_lock_irq(&current->sighand->siglock);
Expand All @@ -52,7 +52,7 @@ sys_sigsuspend(old_sigset_t mask,
return -ERESTARTNOHAND;
}

asmlinkage int
asmlinkage int
sys_sigaction(int sig, const struct old_sigaction __user *act,
struct old_sigaction __user *oact)
{
Expand Down Expand Up @@ -87,9 +87,11 @@ sys_sigaction(int sig, const struct old_sigaction __user *act,
asmlinkage int
sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
unsigned long r6, unsigned long r7,
struct pt_regs regs)
struct pt_regs __regs)
{
return do_sigaltstack(uss, uoss, regs.regs[15]);
struct pt_regs *regs = RELOC_HIDE(&__regs, 0);

return do_sigaltstack(uss, uoss, regs->regs[15]);
}


Expand Down Expand Up @@ -198,9 +200,10 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *r0_p

asmlinkage int sys_sigreturn(unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7,
struct pt_regs regs)
struct pt_regs __regs)
{
struct sigframe __user *frame = (struct sigframe __user *)regs.regs[15];
struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
struct sigframe __user *frame = (struct sigframe __user *)regs->regs[15];
sigset_t set;
int r0;

Expand All @@ -220,7 +223,7 @@ asmlinkage int sys_sigreturn(unsigned long r4, unsigned long r5,
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);

if (restore_sigcontext(&regs, &frame->sc, &r0))
if (restore_sigcontext(regs, &frame->sc, &r0))
goto badframe;
return r0;

Expand All @@ -231,9 +234,10 @@ asmlinkage int sys_sigreturn(unsigned long r4, unsigned long r5,

asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7,
struct pt_regs regs)
struct pt_regs __regs)
{
struct rt_sigframe __user *frame = (struct rt_sigframe __user *)regs.regs[15];
struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
struct rt_sigframe __user *frame = (struct rt_sigframe __user *)regs->regs[15];
sigset_t set;
stack_t st;
int r0;
Expand All @@ -250,14 +254,14 @@ asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5,
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);

if (restore_sigcontext(&regs, &frame->uc.uc_mcontext, &r0))
if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &r0))
goto badframe;

if (__copy_from_user(&st, &frame->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(&st, NULL, regs.regs[15]);
do_sigaltstack(&st, NULL, regs->regs[15]);

return r0;

Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/sh/kernel/sys_sh.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@
*/
asmlinkage int sys_pipe(unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7,
struct pt_regs regs)
struct pt_regs __regs)
{
struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
int fd[2];
int error;

error = do_pipe(fd);
if (!error) {
regs.regs[1] = fd[1];
regs->regs[1] = fd[1];
return fd[0];
}
return error;
Expand Down
Loading

0 comments on commit 8b871dc

Please sign in to comment.