aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2005-11-07 03:58:50 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:53:31 -0500
commit52c653b3bed323df9006c06cdfb4548ec44b3109 (patch)
tree0a1286d8569c92f19007c4add1b00f6f6e517761
parentbb578426253ab9950cc20b4e5dd6aefb5500144f (diff)
[PATCH] uml: separate libc-dependent early initialization
The serial UML OS-abstraction layer patch (um/kernel dir). This moves all systemcalls from main.c file under os-Linux dir and joins mem.c and um_arch.c files. Signed-off-by: Gennady Sharapov <Gennady.V.Sharapov@intel.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/um/kernel/Makefile4
-rw-r--r--arch/um/os-Linux/Makefile8
-rw-r--r--arch/um/os-Linux/main.c (renamed from arch/um/kernel/main.c)49
3 files changed, 25 insertions, 36 deletions
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
index 72fd4eada9ca..f9858583863a 100644
--- a/arch/um/kernel/Makefile
+++ b/arch/um/kernel/Makefile
@@ -7,7 +7,7 @@ extra-y := vmlinux.lds
7clean-files := 7clean-files :=
8 8
9obj-y = config.o exec_kern.o exitcode.o \ 9obj-y = config.o exec_kern.o exitcode.o \
10 helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o physmem.o \ 10 helper.o init_task.o irq.o irq_user.o ksyms.o mem.o physmem.o \
11 process_kern.o ptrace.o reboot.o resource.o sigio_user.o sigio_kern.o \ 11 process_kern.o ptrace.o reboot.o resource.o sigio_user.o sigio_kern.o \
12 signal_kern.o signal_user.o smp.o syscall_kern.o sysrq.o time.o \ 12 signal_kern.o signal_user.o smp.o syscall_kern.o sysrq.o time.o \
13 time_kern.o tlb.o trap_kern.o trap_user.o uaccess.o um_arch.o \ 13 time_kern.o tlb.o trap_kern.o trap_user.o uaccess.o um_arch.o \
@@ -24,7 +24,7 @@ obj-$(CONFIG_MODE_SKAS) += skas/
24 24
25user-objs-$(CONFIG_TTY_LOG) += tty_log.o 25user-objs-$(CONFIG_TTY_LOG) += tty_log.o
26 26
27USER_OBJS := $(user-objs-y) config.o helper.o main.o time.o tty_log.o umid.o \ 27USER_OBJS := $(user-objs-y) config.o helper.o time.o tty_log.o umid.o \
28 user_util.o 28 user_util.o
29 29
30include arch/um/scripts/Makefile.rules 30include arch/um/scripts/Makefile.rules
diff --git a/arch/um/os-Linux/Makefile b/arch/um/os-Linux/Makefile
index d389c58b18b2..0b761a08f0df 100644
--- a/arch/um/os-Linux/Makefile
+++ b/arch/um/os-Linux/Makefile
@@ -3,11 +3,11 @@
3# Licensed under the GPL 3# Licensed under the GPL
4# 4#
5 5
6obj-y = aio.o elf_aux.o file.o mem.o process.o signal.o start_up.o time.o \ 6obj-y = aio.o elf_aux.o file.o main.o mem.o process.o signal.o start_up.o \
7 tt.o tty.o uaccess.o user_syms.o drivers/ sys-$(SUBARCH)/ 7 time.o tt.o tty.o uaccess.o user_syms.o drivers/ sys-$(SUBARCH)/
8 8
9USER_OBJS := aio.o elf_aux.o file.o mem.o process.o signal.o start_up.o \ 9USER_OBJS := aio.o elf_aux.o file.o main.o mem.o process.o signal.o \
10 time.o tt.o tty.o uaccess.o 10 start_up.o time.o tt.o tty.o uaccess.o
11 11
12elf_aux.o: $(ARCH_DIR)/kernel-offsets.h 12elf_aux.o: $(ARCH_DIR)/kernel-offsets.h
13CFLAGS_elf_aux.o += -I$(objtree)/arch/um 13CFLAGS_elf_aux.o += -I$(objtree)/arch/um
diff --git a/arch/um/kernel/main.c b/arch/um/os-Linux/main.c
index d31027f0fe39..23da27d22569 100644
--- a/arch/um/kernel/main.c
+++ b/arch/um/os-Linux/main.c
@@ -157,25 +157,25 @@ int main(int argc, char **argv, char **envp)
157 */ 157 */
158 change_sig(SIGPROF, 0); 158 change_sig(SIGPROF, 0);
159 159
160 /* This signal stuff used to be in the reboot case. However, 160 /* This signal stuff used to be in the reboot case. However,
161 * sometimes a SIGVTALRM can come in when we're halting (reproducably 161 * sometimes a SIGVTALRM can come in when we're halting (reproducably
162 * when writing out gcov information, presumably because that takes 162 * when writing out gcov information, presumably because that takes
163 * some time) and cause a segfault. 163 * some time) and cause a segfault.
164 */ 164 */
165 165
166 /* stop timers and set SIG*ALRM to be ignored */ 166 /* stop timers and set SIG*ALRM to be ignored */
167 disable_timer(); 167 disable_timer();
168 168
169 /* disable SIGIO for the fds and set SIGIO to be ignored */ 169 /* disable SIGIO for the fds and set SIGIO to be ignored */
170 err = deactivate_all_fds(); 170 err = deactivate_all_fds();
171 if(err) 171 if(err)
172 printf("deactivate_all_fds failed, errno = %d\n", -err); 172 printf("deactivate_all_fds failed, errno = %d\n", -err);
173 173
174 /* Let any pending signals fire now. This ensures 174 /* Let any pending signals fire now. This ensures
175 * that they won't be delivered after the exec, when 175 * that they won't be delivered after the exec, when
176 * they are definitely not expected. 176 * they are definitely not expected.
177 */ 177 */
178 unblock_signals(); 178 unblock_signals();
179 179
180 /* Reboot */ 180 /* Reboot */
181 if(ret){ 181 if(ret){
@@ -257,14 +257,3 @@ void __wrap_free(void *ptr)
257 } 257 }
258 else __real_free(ptr); 258 else __real_free(ptr);
259} 259}
260
261/*
262 * Overrides for Emacs so that we follow Linus's tabbing style.
263 * Emacs will notice this stuff at the end of the file and automatically
264 * adjust the settings for this buffer only. This must remain at the end
265 * of the file.
266 * ---------------------------------------------------------------------------
267 * Local variables:
268 * c-file-style: "linux"
269 * End:
270 */