Commit 5fae1b664595adc621fb9294b7d19145918073de

Authored by Al Viro
1 parent 557e1995a9

h8300: generic kernel_execve()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Showing 3 changed files with 2 additions and 28 deletions Side-by-side Diff

... ... @@ -9,6 +9,7 @@
9 9 select GENERIC_CPU_DEVICES
10 10 select MODULES_USE_ELF_RELA
11 11 select GENERIC_KERNEL_THREAD
  12 + select GENERIC_KERNEL_EXECVE
12 13  
13 14 config SYMBOL_PREFIX
14 15 string
arch/h8300/kernel/entry.S
... ... @@ -337,8 +337,7 @@
337 337 mov.l @(LER4:16,sp),er0
338 338 mov.l @(LER5:16,sp),er1
339 339 jsr @er1
340   - sub.l @er0,@er0
341   - jsr @SYMBOL_NAME(sys_exit)
  340 + jmp @SYMBOL_NAME(ret_from_exception)
342 341  
343 342 SYMBOL_NAME_LABEL(resume)
344 343 /*
arch/h8300/kernel/sys_h8300.c
... ... @@ -46,28 +46,4 @@
46 46 ((regs->pc)&0xffffff)-2,regs->orig_er0,regs->er1,regs->er2,regs->er3,regs->er0);
47 47 }
48 48 #endif
49   -
50   -/*
51   - * Do a system call from kernel instead of calling sys_execve so we
52   - * end up with proper pt_regs.
53   - */
54   -asmlinkage
55   -int kernel_execve(const char *filename,
56   - const char *const argv[],
57   - const char *const envp[])
58   -{
59   - register long res __asm__("er0");
60   - register const char *const *_c __asm__("er3") = envp;
61   - register const char *const *_b __asm__("er2") = argv;
62   - register const char * _a __asm__("er1") = filename;
63   - __asm__ __volatile__ ("mov.l %1,er0\n\t"
64   - "trapa #0\n\t"
65   - : "=r" (res)
66   - : "g" (__NR_execve),
67   - "g" (_a),
68   - "g" (_b),
69   - "g" (_c)
70   - : "cc", "memory");
71   - return res;
72   -}