]> nv-tegra.nvidia Code Review - linux-3.10.git/commitdiff
[PATCH] uml: separate libc-dependent early initialization
authorJeff Dike <jdike@addtoit.com>
Mon, 7 Nov 2005 08:58:50 +0000 (00:58 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 7 Nov 2005 15:53:31 +0000 (07:53 -0800)
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>
arch/um/kernel/Makefile
arch/um/os-Linux/Makefile
arch/um/os-Linux/main.c [moved from arch/um/kernel/main.c with 82% similarity]

index 72fd4eada9ca536fdc5433894b7c9fc434bbc317..f9858583863a6eb9cbf11cca1145fee5f1fc1906 100644 (file)
@@ -7,7 +7,7 @@ extra-y := vmlinux.lds
 clean-files :=
 
 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 \
        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 \
@@ -24,7 +24,7 @@ obj-$(CONFIG_MODE_SKAS) += skas/
 
 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
 
 include arch/um/scripts/Makefile.rules
index d389c58b18b280917962c8edb96c945bc8dba890..0b761a08f0df973659bbb13b1fa20d1afd9aad27 100644 (file)
@@ -3,11 +3,11 @@
 # Licensed under the GPL
 #
 
-obj-y = aio.o elf_aux.o file.o mem.o process.o signal.o start_up.o time.o \
-       tt.o tty.o uaccess.o user_syms.o drivers/ sys-$(SUBARCH)/
+obj-y = aio.o elf_aux.o file.o main.o mem.o process.o signal.o start_up.o \
+       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 \
-       time.o tt.o tty.o uaccess.o
+USER_OBJS := aio.o elf_aux.o file.o main.o mem.o process.o signal.o \
+       start_up.o time.o tt.o tty.o uaccess.o
 
 elf_aux.o: $(ARCH_DIR)/kernel-offsets.h
 CFLAGS_elf_aux.o += -I$(objtree)/arch/um
similarity index 82%
rename from arch/um/kernel/main.c
rename to arch/um/os-Linux/main.c
index d31027f0fe392e9753fbe04e9ef106f719a2b5d4..23da27d22569da2308b373f0edd42a2b5757c710 100644 (file)
@@ -157,25 +157,25 @@ int main(int argc, char **argv, char **envp)
         */
        change_sig(SIGPROF, 0);
 
-        /* This signal stuff used to be in the reboot case.  However,
-         * sometimes a SIGVTALRM can come in when we're halting (reproducably
-         * when writing out gcov information, presumably because that takes
-         * some time) and cause a segfault.
-         */
-
-        /* stop timers and set SIG*ALRM to be ignored */
-        disable_timer();
-
-        /* disable SIGIO for the fds and set SIGIO to be ignored */
-        err = deactivate_all_fds();
-        if(err)
-                printf("deactivate_all_fds failed, errno = %d\n", -err);
-
-        /* Let any pending signals fire now.  This ensures
-         * that they won't be delivered after the exec, when
-         * they are definitely not expected.
-         */
-        unblock_signals();
+       /* This signal stuff used to be in the reboot case.  However,
+        * sometimes a SIGVTALRM can come in when we're halting (reproducably
+        * when writing out gcov information, presumably because that takes
+        * some time) and cause a segfault.
+        */
+
+       /* stop timers and set SIG*ALRM to be ignored */
+       disable_timer();
+
+       /* disable SIGIO for the fds and set SIGIO to be ignored */
+       err = deactivate_all_fds();
+       if(err)
+               printf("deactivate_all_fds failed, errno = %d\n", -err);
+
+       /* Let any pending signals fire now.  This ensures
+        * that they won't be delivered after the exec, when
+        * they are definitely not expected.
+        */
+       unblock_signals();
 
        /* Reboot */
        if(ret){
@@ -257,14 +257,3 @@ void __wrap_free(void *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:
- */