Skip to content

Commit 52c653b

Browse files
cfd-36Linus Torvalds
authored andcommitted
[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>
1 parent bb57842 commit 52c653b

3 files changed

Lines changed: 25 additions & 36 deletions

File tree

‎arch/um/kernel/Makefile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ extra-y := vmlinux.lds
77
clean-files :=
88

99
obj-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 \
1111
process_kern.o ptrace.o reboot.o resource.o sigio_user.o sigio_kern.o \
1212
signal_kern.o signal_user.o smp.o syscall_kern.o sysrq.o time.o \
1313
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/
2424

2525
user-objs-$(CONFIG_TTY_LOG) += tty_log.o
2626

27-
USER_OBJS := $(user-objs-y) config.o helper.o main.o time.o tty_log.o umid.o \
27+
USER_OBJS := $(user-objs-y) config.o helper.o time.o tty_log.o umid.o \
2828
user_util.o
2929

3030
include arch/um/scripts/Makefile.rules

‎arch/um/os-Linux/Makefile‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# Licensed under the GPL
44
#
55

6-
obj-y = aio.o elf_aux.o file.o mem.o process.o signal.o start_up.o time.o \
7-
tt.o tty.o uaccess.o user_syms.o drivers/ sys-$(SUBARCH)/
6+
obj-y = aio.o elf_aux.o file.o main.o mem.o process.o signal.o start_up.o \
7+
time.o tt.o tty.o uaccess.o user_syms.o drivers/ sys-$(SUBARCH)/
88

9-
USER_OBJS := aio.o elf_aux.o file.o mem.o process.o signal.o start_up.o \
10-
time.o tt.o tty.o uaccess.o
9+
USER_OBJS := aio.o elf_aux.o file.o main.o mem.o process.o signal.o \
10+
start_up.o time.o tt.o tty.o uaccess.o
1111

1212
elf_aux.o: $(ARCH_DIR)/kernel-offsets.h
1313
CFLAGS_elf_aux.o += -I$(objtree)/arch/um
Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -157,25 +157,25 @@ int main(int argc, char **argv, char **envp)
157157
*/
158158
change_sig(SIGPROF, 0);
159159

160-
/* This signal stuff used to be in the reboot case. However,
161-
* sometimes a SIGVTALRM can come in when we're halting (reproducably
162-
* when writing out gcov information, presumably because that takes
163-
* some time) and cause a segfault.
164-
*/
165-
166-
/* stop timers and set SIG*ALRM to be ignored */
167-
disable_timer();
168-
169-
/* disable SIGIO for the fds and set SIGIO to be ignored */
170-
err = deactivate_all_fds();
171-
if(err)
172-
printf("deactivate_all_fds failed, errno = %d\n", -err);
173-
174-
/* Let any pending signals fire now. This ensures
175-
* that they won't be delivered after the exec, when
176-
* they are definitely not expected.
177-
*/
178-
unblock_signals();
160+
/* This signal stuff used to be in the reboot case. However,
161+
* sometimes a SIGVTALRM can come in when we're halting (reproducably
162+
* when writing out gcov information, presumably because that takes
163+
* some time) and cause a segfault.
164+
*/
165+
166+
/* stop timers and set SIG*ALRM to be ignored */
167+
disable_timer();
168+
169+
/* disable SIGIO for the fds and set SIGIO to be ignored */
170+
err = deactivate_all_fds();
171+
if(err)
172+
printf("deactivate_all_fds failed, errno = %d\n", -err);
173+
174+
/* Let any pending signals fire now. This ensures
175+
* that they won't be delivered after the exec, when
176+
* they are definitely not expected.
177+
*/
178+
unblock_signals();
179179

180180
/* Reboot */
181181
if(ret){
@@ -257,14 +257,3 @@ void __wrap_free(void *ptr)
257257
}
258258
else __real_free(ptr);
259259
}
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-
*/

0 commit comments

Comments
 (0)