aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2008-02-05 01:30:46 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:26 -0500
commitedea138584d7586a3b93b6d5ab5ec021d18e11e9 (patch)
tree0c5a5dd14256d675c8c64c8abdda86053f72abc8 /arch/um/kernel
parent0ba7fe03b638a084a4e15e21d2e585ba321ad9c8 (diff)
uml: tidy kern_util.h
Tidy kern_util.h. It turns out that most of the function declarations aren't used, so they can go away. os.h no longer includes kern_util.h, so files which got it through os.h now need to include it directly. A number of other files never needed it, so these includes are deleted. The structure which was used to pass signal handlers from the kernel side to the userspace side is gone. Instead, the handlers are declared here, and used directly from libc code. This allows arch/um/os-Linux/trap.c to be deleted, with its remnants being moved to arch/um/os-Linux/skas/trap.c. arch/um/os-Linux/tty.c had its inclusions changed, and it needed some style attention, so it got tidied. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/kernel')
-rw-r--r--arch/um/kernel/initrd.c1
-rw-r--r--arch/um/kernel/reboot.c1
-rw-r--r--arch/um/kernel/smp.c1
-rw-r--r--arch/um/kernel/trap.c15
-rw-r--r--arch/um/kernel/um_arch.c6
5 files changed, 5 insertions, 19 deletions
diff --git a/arch/um/kernel/initrd.c b/arch/um/kernel/initrd.c
index 16dc43e9d940..ae31c62f0323 100644
--- a/arch/um/kernel/initrd.c
+++ b/arch/um/kernel/initrd.c
@@ -7,7 +7,6 @@
7#include "linux/bootmem.h" 7#include "linux/bootmem.h"
8#include "linux/initrd.h" 8#include "linux/initrd.h"
9#include "asm/types.h" 9#include "asm/types.h"
10#include "kern_util.h"
11#include "initrd.h" 10#include "initrd.h"
12#include "init.h" 11#include "init.h"
13#include "os.h" 12#include "os.h"
diff --git a/arch/um/kernel/reboot.c b/arch/um/kernel/reboot.c
index 04cebcf0679f..1ce49cd8aca3 100644
--- a/arch/um/kernel/reboot.c
+++ b/arch/um/kernel/reboot.c
@@ -4,6 +4,7 @@
4 */ 4 */
5 5
6#include "linux/sched.h" 6#include "linux/sched.h"
7#include "kern_util.h"
7#include "os.h" 8#include "os.h"
8#include "skas.h" 9#include "skas.h"
9 10
diff --git a/arch/um/kernel/smp.c b/arch/um/kernel/smp.c
index 36d89cf8d20b..a12e5bd15790 100644
--- a/arch/um/kernel/smp.c
+++ b/arch/um/kernel/smp.c
@@ -21,7 +21,6 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
21#include "asm/smp.h" 21#include "asm/smp.h"
22#include "asm/processor.h" 22#include "asm/processor.h"
23#include "asm/spinlock.h" 23#include "asm/spinlock.h"
24#include "kern_util.h"
25#include "kern.h" 24#include "kern.h"
26#include "irq_user.h" 25#include "irq_user.h"
27#include "os.h" 26#include "os.h"
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c
index e3a3ab8f8635..ff405a446d15 100644
--- a/arch/um/kernel/trap.c
+++ b/arch/um/kernel/trap.c
@@ -128,7 +128,7 @@ static void bad_segv(struct faultinfo fi, unsigned long ip)
128 force_sig_info(SIGSEGV, &si, current); 128 force_sig_info(SIGSEGV, &si, current);
129} 129}
130 130
131static void segv_handler(int sig, struct uml_pt_regs *regs) 131void segv_handler(int sig, struct uml_pt_regs *regs)
132{ 132{
133 struct faultinfo * fi = UPT_FAULTINFO(regs); 133 struct faultinfo * fi = UPT_FAULTINFO(regs);
134 134
@@ -229,27 +229,18 @@ void relay_signal(int sig, struct uml_pt_regs *regs)
229 force_sig(sig, current); 229 force_sig(sig, current);
230} 230}
231 231
232static void bus_handler(int sig, struct uml_pt_regs *regs) 232void bus_handler(int sig, struct uml_pt_regs *regs)
233{ 233{
234 if (current->thread.fault_catcher != NULL) 234 if (current->thread.fault_catcher != NULL)
235 UML_LONGJMP(current->thread.fault_catcher, 1); 235 UML_LONGJMP(current->thread.fault_catcher, 1);
236 else relay_signal(sig, regs); 236 else relay_signal(sig, regs);
237} 237}
238 238
239static void winch(int sig, struct uml_pt_regs *regs) 239void winch(int sig, struct uml_pt_regs *regs)
240{ 240{
241 do_IRQ(WINCH_IRQ, regs); 241 do_IRQ(WINCH_IRQ, regs);
242} 242}
243 243
244const struct kern_handlers handlinfo_kern = {
245 .relay_signal = relay_signal,
246 .winch = winch,
247 .bus_handler = bus_handler,
248 .page_fault = segv_handler,
249 .sigio_handler = sigio_handler,
250 .timer_handler = timer_handler
251};
252
253void trap_init(void) 244void trap_init(void)
254{ 245{
255} 246}
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index f1c71393f578..9b5d2cdb621c 100644
--- a/arch/um/kernel/um_arch.c
+++ b/arch/um/kernel/um_arch.c
@@ -16,6 +16,7 @@
16#include "as-layout.h" 16#include "as-layout.h"
17#include "init.h" 17#include "init.h"
18#include "kern.h" 18#include "kern.h"
19#include "kern_util.h"
19#include "mem_user.h" 20#include "mem_user.h"
20#include "os.h" 21#include "os.h"
21#include "skas.h" 22#include "skas.h"
@@ -280,11 +281,6 @@ int __init linux_main(int argc, char **argv)
280 281
281 host_task_size = set_task_sizes_skas(&task_size); 282 host_task_size = set_task_sizes_skas(&task_size);
282 283
283 /*
284 * Setting up handlers to 'sig_info' struct
285 */
286 os_fill_handlinfo(handlinfo_kern);
287
288 brk_start = (unsigned long) sbrk(0); 284 brk_start = (unsigned long) sbrk(0);
289 285
290 /* 286 /*