aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-05-06 17:51:21 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 15:13:02 -0400
commit6e21aec3fcf6c8862b755d45c0af45acdefff976 (patch)
tree1e2bcf6ae8ac4a6e62766cb1cddf073410d4ea5c /arch/um/include
parent65a58ab044308ae65ca06c50fb10be5e0e080989 (diff)
uml: tidy process.c
Clean up arch/um/kernel/process.c: - lots of return(x); -> return x; conversions - a number of the small functions are either unused, in which case they are gone, along any declarations in a header, or could be made static. - current_pid is ifdefed on CONFIG_MODE_TT and its declaration is ifdefed on both CONFIG_MODE_TT and UML_CONFIG_MODE_TT because we don't know whether it's being used in a userspace or kernel file. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/include')
-rw-r--r--arch/um/include/kern_util.h7
-rw-r--r--arch/um/include/tt/uaccess-tt.h2
-rw-r--r--arch/um/include/um_malloc.h1
3 files changed, 3 insertions, 7 deletions
diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h
index be850b9ec947..09810bc48e5b 100644
--- a/arch/um/include/kern_util.h
+++ b/arch/um/include/kern_util.h
@@ -8,6 +8,7 @@
8 8
9#include "sysdep/ptrace.h" 9#include "sysdep/ptrace.h"
10#include "sysdep/faultinfo.h" 10#include "sysdep/faultinfo.h"
11#include "uml-config.h"
11 12
12typedef void (*kern_hndl)(int, union uml_pt_regs *); 13typedef void (*kern_hndl)(int, union uml_pt_regs *);
13 14
@@ -33,7 +34,9 @@ extern int nsyscalls;
33 UML_ROUND_DOWN(((unsigned long) addr) + PAGE_SIZE - 1) 34 UML_ROUND_DOWN(((unsigned long) addr) + PAGE_SIZE - 1)
34 35
35extern int kernel_fork(unsigned long flags, int (*fn)(void *), void * arg); 36extern int kernel_fork(unsigned long flags, int (*fn)(void *), void * arg);
37#ifdef UML_CONFIG_MODE_TT
36extern unsigned long stack_sp(unsigned long page); 38extern unsigned long stack_sp(unsigned long page);
39#endif
37extern int kernel_thread_proc(void *data); 40extern int kernel_thread_proc(void *data);
38extern void syscall_segv(int sig); 41extern void syscall_segv(int sig);
39extern int current_pid(void); 42extern int current_pid(void);
@@ -57,7 +60,6 @@ extern void add_input_request(int op, void (*proc)(int), void *arg);
57extern char *current_cmd(void); 60extern char *current_cmd(void);
58extern void timer_handler(int sig, union uml_pt_regs *regs); 61extern void timer_handler(int sig, union uml_pt_regs *regs);
59extern int set_signals(int enable); 62extern int set_signals(int enable);
60extern void force_sigbus(void);
61extern int pid_to_processor_id(int pid); 63extern int pid_to_processor_id(int pid);
62extern void deliver_signals(void *t); 64extern void deliver_signals(void *t);
63extern int next_trap_index(int max); 65extern int next_trap_index(int max);
@@ -69,7 +71,6 @@ extern void *syscall_sp(void *t);
69extern void syscall_trace(union uml_pt_regs *regs, int entryexit); 71extern void syscall_trace(union uml_pt_regs *regs, int entryexit);
70extern int hz(void); 72extern int hz(void);
71extern unsigned int do_IRQ(int irq, union uml_pt_regs *regs); 73extern unsigned int do_IRQ(int irq, union uml_pt_regs *regs);
72extern int external_pid(void *t);
73extern void interrupt_end(void); 74extern void interrupt_end(void);
74extern void initial_thread_cb(void (*proc)(void *), void *arg); 75extern void initial_thread_cb(void (*proc)(void *), void *arg);
75extern int debugger_signal(int status, int pid); 76extern int debugger_signal(int status, int pid);
@@ -80,7 +81,6 @@ extern int init_parent_proxy(int pid);
80extern int singlestepping(void *t); 81extern int singlestepping(void *t);
81extern void check_stack_overflow(void *ptr); 82extern void check_stack_overflow(void *ptr);
82extern void relay_signal(int sig, union uml_pt_regs *regs); 83extern void relay_signal(int sig, union uml_pt_regs *regs);
83extern void not_implemented(void);
84extern int user_context(unsigned long sp); 84extern int user_context(unsigned long sp);
85extern void timer_irq(union uml_pt_regs *regs); 85extern void timer_irq(union uml_pt_regs *regs);
86extern void unprotect_stack(unsigned long stack); 86extern void unprotect_stack(unsigned long stack);
@@ -92,7 +92,6 @@ extern char *uml_strdup(char *string);
92extern void unprotect_kernel_mem(void); 92extern void unprotect_kernel_mem(void);
93extern void protect_kernel_mem(void); 93extern void protect_kernel_mem(void);
94extern void uml_cleanup(void); 94extern void uml_cleanup(void);
95extern void set_current(void *t);
96extern void lock_signalled_task(void *t); 95extern void lock_signalled_task(void *t);
97extern void IPI_handler(int cpu); 96extern void IPI_handler(int cpu);
98extern int jail_setup(char *line, int *add); 97extern int jail_setup(char *line, int *add);
diff --git a/arch/um/include/tt/uaccess-tt.h b/arch/um/include/tt/uaccess-tt.h
index b19645f32f24..13a64f61fcf4 100644
--- a/arch/um/include/tt/uaccess-tt.h
+++ b/arch/um/include/tt/uaccess-tt.h
@@ -27,8 +27,6 @@ extern unsigned long uml_physmem;
27#define access_ok_tt(type, addr, size) \ 27#define access_ok_tt(type, addr, size) \
28 (is_stack(addr, size)) 28 (is_stack(addr, size))
29 29
30extern unsigned long get_fault_addr(void);
31
32extern int __do_copy_from_user(void *to, const void *from, int n, 30extern int __do_copy_from_user(void *to, const void *from, int n,
33 void **fault_addr, void **fault_catcher); 31 void **fault_addr, void **fault_catcher);
34extern int __do_strncpy_from_user(char *dst, const char *src, size_t n, 32extern int __do_strncpy_from_user(char *dst, const char *src, size_t n,
diff --git a/arch/um/include/um_malloc.h b/arch/um/include/um_malloc.h
index 0363a9b53f8d..e6d7c5aa3f4e 100644
--- a/arch/um/include/um_malloc.h
+++ b/arch/um/include/um_malloc.h
@@ -11,7 +11,6 @@ extern void *um_kmalloc_atomic(int size);
11extern void kfree(const void *ptr); 11extern void kfree(const void *ptr);
12 12
13extern void *um_vmalloc(int size); 13extern void *um_vmalloc(int size);
14extern void *um_vmalloc_atomic(int size);
15extern void vfree(void *ptr); 14extern void vfree(void *ptr);
16 15
17#endif /* __UM_MALLOC_H__ */ 16#endif /* __UM_MALLOC_H__ */