Commit 52c653b3 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[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: default avatarGennady Sharapov <Gennady.V.Sharapov@intel.com>
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Cc: Paolo Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent bb578426
...@@ -7,7 +7,7 @@ extra-y := vmlinux.lds ...@@ -7,7 +7,7 @@ extra-y := vmlinux.lds
clean-files := clean-files :=
obj-y = config.o exec_kern.o exitcode.o \ obj-y = config.o exec_kern.o exitcode.o \
helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o physmem.o \ helper.o init_task.o irq.o irq_user.o ksyms.o mem.o physmem.o \
process_kern.o ptrace.o reboot.o resource.o sigio_user.o sigio_kern.o \ process_kern.o ptrace.o reboot.o resource.o sigio_user.o sigio_kern.o \
signal_kern.o signal_user.o smp.o syscall_kern.o sysrq.o time.o \ signal_kern.o signal_user.o smp.o syscall_kern.o sysrq.o time.o \
time_kern.o tlb.o trap_kern.o trap_user.o uaccess.o um_arch.o \ 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,7 +24,7 @@ obj-$(CONFIG_MODE_SKAS) += skas/
user-objs-$(CONFIG_TTY_LOG) += tty_log.o user-objs-$(CONFIG_TTY_LOG) += tty_log.o
USER_OBJS := $(user-objs-y) config.o helper.o main.o time.o tty_log.o umid.o \ USER_OBJS := $(user-objs-y) config.o helper.o time.o tty_log.o umid.o \
user_util.o user_util.o
include arch/um/scripts/Makefile.rules include arch/um/scripts/Makefile.rules
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
# Licensed under the GPL # Licensed under the GPL
# #
obj-y = aio.o elf_aux.o file.o mem.o process.o signal.o start_up.o time.o \ obj-y = aio.o elf_aux.o file.o main.o mem.o process.o signal.o start_up.o \
tt.o tty.o uaccess.o user_syms.o drivers/ sys-$(SUBARCH)/ time.o tt.o tty.o uaccess.o user_syms.o drivers/ sys-$(SUBARCH)/
USER_OBJS := aio.o elf_aux.o file.o mem.o process.o signal.o start_up.o \ USER_OBJS := aio.o elf_aux.o file.o main.o mem.o process.o signal.o \
time.o tt.o tty.o uaccess.o start_up.o time.o tt.o tty.o uaccess.o
elf_aux.o: $(ARCH_DIR)/kernel-offsets.h elf_aux.o: $(ARCH_DIR)/kernel-offsets.h
CFLAGS_elf_aux.o += -I$(objtree)/arch/um CFLAGS_elf_aux.o += -I$(objtree)/arch/um
......
...@@ -157,25 +157,25 @@ int main(int argc, char **argv, char **envp) ...@@ -157,25 +157,25 @@ int main(int argc, char **argv, char **envp)
*/ */
change_sig(SIGPROF, 0); change_sig(SIGPROF, 0);
/* This signal stuff used to be in the reboot case. However, /* This signal stuff used to be in the reboot case. However,
* sometimes a SIGVTALRM can come in when we're halting (reproducably * sometimes a SIGVTALRM can come in when we're halting (reproducably
* when writing out gcov information, presumably because that takes * when writing out gcov information, presumably because that takes
* some time) and cause a segfault. * some time) and cause a segfault.
*/ */
/* stop timers and set SIG*ALRM to be ignored */ /* stop timers and set SIG*ALRM to be ignored */
disable_timer(); disable_timer();
/* disable SIGIO for the fds and set SIGIO to be ignored */ /* disable SIGIO for the fds and set SIGIO to be ignored */
err = deactivate_all_fds(); err = deactivate_all_fds();
if(err) if(err)
printf("deactivate_all_fds failed, errno = %d\n", -err); printf("deactivate_all_fds failed, errno = %d\n", -err);
/* Let any pending signals fire now. This ensures /* Let any pending signals fire now. This ensures
* that they won't be delivered after the exec, when * that they won't be delivered after the exec, when
* they are definitely not expected. * they are definitely not expected.
*/ */
unblock_signals(); unblock_signals();
/* Reboot */ /* Reboot */
if(ret){ if(ret){
...@@ -257,14 +257,3 @@ void __wrap_free(void *ptr) ...@@ -257,14 +257,3 @@ void __wrap_free(void *ptr)
} }
else __real_free(ptr); else __real_free(ptr);
} }
/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically
* adjust the settings for this buffer only. This must remain at the end
* of the file.
* ---------------------------------------------------------------------------
* Local variables:
* c-file-style: "linux"
* End:
*/
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment