uml: create as-layout.h
authorJeff Dike <jdike@addtoit.com>
Sun, 6 May 2007 21:51:08 +0000 (14:51 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 7 May 2007 19:13:01 +0000 (12:13 -0700)
This patch moves all the the symbols defined in um_arch.c, which are mostly
boundaries between different parts of the UML kernel address space, to a new
header, as-layout.h.  There are also a few things here which aren't really
related to address space layout, but which don't really have a better place to
go.

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>
13 files changed:
arch/um/include/as-layout.h [new file with mode: 0644]
arch/um/include/user_util.h
arch/um/kernel/exec.c
arch/um/kernel/ksyms.c
arch/um/kernel/mem.c
arch/um/kernel/physmem.c
arch/um/kernel/process.c
arch/um/kernel/skas/process.c
arch/um/kernel/tlb.c
arch/um/kernel/trap.c
arch/um/kernel/um_arch.c
arch/um/os-Linux/main.c
arch/um/os-Linux/skas/trap.c

diff --git a/arch/um/include/as-layout.h b/arch/um/include/as-layout.h
new file mode 100644 (file)
index 0000000..fccf187
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
+ * Licensed under the GPL
+ */
+
+#ifndef __START_H__
+#define __START_H__
+
+#include "sysdep/ptrace.h"
+
+struct cpu_task {
+       int pid;
+       void *task;
+};
+
+extern struct cpu_task cpu_tasks[];
+
+extern unsigned long low_physmem;
+extern unsigned long high_physmem;
+extern unsigned long uml_physmem;
+extern unsigned long uml_reserved;
+extern unsigned long end_vm;
+extern unsigned long start_vm;
+extern unsigned long long highmem;
+
+extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end;
+extern unsigned long _unprotected_end;
+extern unsigned long brk_start;
+
+extern int linux_main(int argc, char **argv);
+extern void set_cmdline(char *cmd);
+
+extern void (*sig_info[])(int, union uml_pt_regs *);
+
+#endif
index fabad2372af003e54ba411abff6fe50f6c6724ee..f04776e2436f14da758ebd56bf31498792aa1e3f 100644 (file)
@@ -30,30 +30,7 @@ extern int grantpt(int __fd);
 extern int unlockpt(int __fd);
 extern char *ptsname(int __fd);
 
-struct cpu_task {
-       int pid;
-       void *task;
-};
-
-extern struct cpu_task cpu_tasks[];
-
-extern void (*sig_info[])(int, union uml_pt_regs *);
-
-extern unsigned long low_physmem;
-extern unsigned long high_physmem;
-extern unsigned long uml_physmem;
-extern unsigned long uml_reserved;
-extern unsigned long end_vm;
-extern unsigned long start_vm;
-extern unsigned long long highmem;
-
-extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end;
-extern unsigned long _unprotected_end;
-extern unsigned long brk_start;
-
 extern void *add_signal_handler(int sig, void (*handler)(int));
-extern int linux_main(int argc, char **argv);
-extern void set_cmdline(char *cmd);
 extern void input_cb(void (*proc)(void *), void *arg, int arg_len);
 extern int get_pty(void);
 extern int switcheroo(int fd, int prot, void *from, void *to, int size);
index 121166400e25a01917df9452560e2fc12bfba882..1ada13ea84e498002f7ef6b87845f8ca948483ce 100644 (file)
@@ -12,6 +12,7 @@
 #include "asm/uaccess.h"
 #include "user_util.h"
 #include "kern_util.h"
+#include "as-layout.h"
 #include "mem_user.h"
 #include "kern.h"
 #include "irq_user.h"
index 0e00cf93f90042f766b11c7b8e7a5075cbd1a376..288b4ee2041a579707a558b1f14ce68da660a2e0 100644 (file)
@@ -16,6 +16,7 @@
 #include "asm/page.h"
 #include "asm/tlbflush.h"
 #include "kern_util.h"
+#include "as-layout.h"
 #include "user_util.h"
 #include "mem_user.h"
 #include "os.h"
index df7d662b98ce02711705049580d55134437b64e8..3a13d41c28d0daefae7637430b8dd7ac6260455e 100644 (file)
@@ -15,6 +15,7 @@
 #include "asm/pgalloc.h"
 #include "user_util.h"
 #include "kern_util.h"
+#include "as-layout.h"
 #include "kern.h"
 #include "mem_user.h"
 #include "uml_uaccess.h"
index 638f3b5f6094a362968bca5c241a97a34cfe92fb..f92f06c35db74aa4202e50fdc3853681ef6bdcc0 100644 (file)
@@ -13,6 +13,7 @@
 #include "asm/types.h"
 #include "asm/pgtable.h"
 #include "kern_util.h"
+#include "as-layout.h"
 #include "user_util.h"
 #include "mode_kern.h"
 #include "mem.h"
index 348b272bb766a5305f54ba3d35874b5b3caa45e6..e4208386e7afe33168b081b7ecd98b1c2de6bdad 100644 (file)
@@ -34,6 +34,7 @@
 #include "asm/user.h"
 #include "user_util.h"
 #include "kern_util.h"
+#include "as-layout.h"
 #include "kern.h"
 #include "signal_kern.h"
 #include "init.h"
index ae4fa71d3b8b6540d4071712a1f5404ea5436eb9..9c2a7d8c56fb243398d351881915bad0299a619f 100644 (file)
@@ -13,6 +13,7 @@
 #include "asm/uaccess.h"
 #include "asm/atomic.h"
 #include "kern_util.h"
+#include "as-layout.h"
 #include "skas.h"
 #include "os.h"
 #include "user_util.h"
index 54a5ff25645a207a414a9ac5253a470a39a29862..b8b3cff0668a0be0cfc1c93a4f9407356f43c1ea 100644 (file)
@@ -9,6 +9,7 @@
 #include "asm/tlbflush.h"
 #include "choose-mode.h"
 #include "mode_kern.h"
+#include "as-layout.h"
 #include "user_util.h"
 #include "tlb.h"
 #include "mem.h"
index e27b898412fc1417bf01a6b0d61634a95ca8638e..552bcfc7c0859373a50c33d433a377de20d6bdae 100644 (file)
@@ -20,6 +20,7 @@
 #include "sysdep/sigcontext.h"
 #include "user_util.h"
 #include "kern_util.h"
+#include "as-layout.h"
 #include "arch.h"
 #include "kern.h"
 #include "chan_kern.h"
index 8eefb5202c501bb34f67bf060f638538e9b6c00a..20684c04d5d5a3bc8101d7280405967d184e1b90 100644 (file)
@@ -28,6 +28,7 @@
 #include "asm/current.h"
 #include "user_util.h"
 #include "kern_util.h"
+#include "as-layout.h"
 #include "arch.h"
 #include "kern.h"
 #include "mem_user.h"
index 2c089c2c63bf1793a69ec03ebd45cfc0ebc975d1..25261d6c7bf26946de0a52f81ed4249798457437 100644 (file)
@@ -15,6 +15,7 @@
 #include <asm/page.h>
 #include "user_util.h"
 #include "kern_util.h"
+#include "as-layout.h"
 #include "mem_user.h"
 #include "irq_user.h"
 #include "user.h"
index 9ad5fbec459347c26efb0db216b104ff276a50d1..19ff04bdec90886a2e6a4dcfe498788470adf8df 100644 (file)
@@ -7,6 +7,7 @@
 #include <errno.h>
 #include "user_util.h"
 #include "kern_util.h"
+#include "as-layout.h"
 #include "task.h"
 #include "sigcontext.h"
 #include "skas.h"