diff options
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/apm.c | 1 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/ubc.S | 2 | ||||
-rw-r--r-- | arch/sh/kernel/entry.S | 6 | ||||
-rw-r--r-- | arch/sh/kernel/setup.c | 6 | ||||
-rw-r--r-- | arch/sh/kernel/sh_ksyms.c | 1 | ||||
-rw-r--r-- | arch/sh/kernel/smp.c | 1 | ||||
-rw-r--r-- | arch/sh/kernel/sys_sh.c | 19 | ||||
-rw-r--r-- | arch/sh/kernel/vsyscall/.gitignore | 1 |
8 files changed, 26 insertions, 11 deletions
diff --git a/arch/sh/kernel/apm.c b/arch/sh/kernel/apm.c index 871e7d640002fa..4f66f91b100667 100644 --- a/arch/sh/kernel/apm.c +++ b/arch/sh/kernel/apm.c @@ -16,7 +16,6 @@ * [This document is available from Microsoft at: * http://www.microsoft.com/hwdev/busbios/amp_12.htm] */ -#include <linux/config.h> #include <linux/module.h> #include <linux/poll.h> #include <linux/timer.h> diff --git a/arch/sh/kernel/cpu/ubc.S b/arch/sh/kernel/cpu/ubc.S index 0c569b20e1c1d1..81923079fa124f 100644 --- a/arch/sh/kernel/cpu/ubc.S +++ b/arch/sh/kernel/cpu/ubc.S @@ -1,5 +1,5 @@ /* - * arch/sh/kernel/ubc.S + * arch/sh/kernel/cpu/ubc.S * * Set of management routines for the User Break Controller (UBC) * diff --git a/arch/sh/kernel/entry.S b/arch/sh/kernel/entry.S index fe8221855b2826..97c571fbcdf13a 100644 --- a/arch/sh/kernel/entry.S +++ b/arch/sh/kernel/entry.S @@ -10,8 +10,8 @@ * for more details. * */ - #include <linux/sys.h> +#include <linux/errno.h> #include <linux/linkage.h> #include <asm/asm-offsets.h> #include <asm/thread_info.h> @@ -53,10 +53,6 @@ * syscall # * */ - -ENOSYS = 38 -EINVAL = 22 - #if defined(CONFIG_KGDB_NMI) NMI_VEC = 0x1c0 ! Must catch early for debounce #endif diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 5f587332234a3e..36d86f9ac38a78 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c @@ -1,5 +1,4 @@ -/* $Id: setup.c,v 1.30 2003/10/13 07:21:19 lethal Exp $ - * +/* * linux/arch/sh/kernel/setup.c * * Copyright (C) 1999 Niibe Yutaka @@ -21,6 +20,7 @@ #include <linux/utsname.h> #include <linux/cpu.h> #include <linux/pfn.h> +#include <linux/fs.h> #include <asm/uaccess.h> #include <asm/io.h> #include <asm/sections.h> @@ -459,7 +459,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) seq_printf(m, "machine\t\t: %s\n", get_system_type()); seq_printf(m, "processor\t: %d\n", cpu); - seq_printf(m, "cpu family\t: %s\n", system_utsname.machine); + seq_printf(m, "cpu family\t: %s\n", init_utsname()->machine); seq_printf(m, "cpu type\t: %s\n", get_cpu_subtype()); show_cpuflags(m); diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c index d3cbfa2ad4a785..9daad70bc3050b 100644 --- a/arch/sh/kernel/sh_ksyms.c +++ b/arch/sh/kernel/sh_ksyms.c @@ -72,6 +72,7 @@ DECLARE_EXPORT(__ashrdi3); DECLARE_EXPORT(__ashldi3); DECLARE_EXPORT(__lshrdi3); DECLARE_EXPORT(__movstr); +DECLARE_EXPORT(__movstrSI16); EXPORT_SYMBOL(strcpy); diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index 6c0fb7c4af1190..dbebaddcfe3949 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c @@ -42,6 +42,7 @@ cpumask_t cpu_possible_map; EXPORT_SYMBOL(cpu_possible_map); cpumask_t cpu_online_map; +EXPORT_SYMBOL(cpu_online_map); static atomic_t cpus_booted = ATOMIC_INIT(0); /* These are defined by the board-specific code. */ diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c index b68ff705f0673c..8fde95001c3468 100644 --- a/arch/sh/kernel/sys_sh.c +++ b/arch/sh/kernel/sys_sh.c @@ -25,6 +25,7 @@ #include <asm/cacheflush.h> #include <asm/uaccess.h> #include <asm/ipc.h> +#include <asm/unistd.h> /* * sys_pipe() is the normal C calling standard for creating @@ -281,7 +282,7 @@ asmlinkage int sys_uname(struct old_utsname * name) if (!name) return -EFAULT; down_read(&uts_sem); - err=copy_to_user(name, &system_utsname, sizeof (*name)); + err = copy_to_user(name, utsname(), sizeof (*name)); up_read(&uts_sem); return err?-EFAULT:0; } @@ -309,3 +310,19 @@ asmlinkage int sys_fadvise64_64_wrapper(int fd, u32 offset0, u32 offset1, (u64)len0 << 32 | len1, advice); #endif } + +/* + * Do a system call from kernel instead of calling sys_execve so we + * end up with proper pt_regs. + */ +int kernel_execve(const char *filename, char *const argv[], char *const envp[]) +{ + register long __sc0 __asm__ ("r3") = __NR_execve; + register long __sc4 __asm__ ("r4") = (long) filename; + register long __sc5 __asm__ ("r5") = (long) argv; + register long __sc6 __asm__ ("r6") = (long) envp; + __asm__ __volatile__ ("trapa #0x13" : "=z" (__sc0) + : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6) + : "memory"); + return __sc0; +} diff --git a/arch/sh/kernel/vsyscall/.gitignore b/arch/sh/kernel/vsyscall/.gitignore new file mode 100644 index 00000000000000..40836ad9079cf9 --- /dev/null +++ b/arch/sh/kernel/vsyscall/.gitignore @@ -0,0 +1 @@ +vsyscall.lds |