diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-05-06 17:51:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:13:02 -0400 |
commit | 1d1497e1f9ffe2f7198c916abd112226a7a503f2 (patch) | |
tree | 9e232f4b59756b1f82080615def11d6a069c92fe /arch/um | |
parent | 377fad3acbb7e94ab9942a74e0d9ede8eeb2f039 (diff) |
uml: comment early boot locking
Commentary about missing locking.
Also got rid of uml_start because it was pointless.
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>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/kernel/um_arch.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index cfa35763405f..9bf31533a8fd 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -44,7 +44,7 @@ | |||
44 | 44 | ||
45 | #define DEFAULT_COMMAND_LINE "root=98:0" | 45 | #define DEFAULT_COMMAND_LINE "root=98:0" |
46 | 46 | ||
47 | /* Changed in linux_main and setup_arch, which run before SMP is started */ | 47 | /* Changed in add_arg and setup_arch, which run before SMP is started */ |
48 | static char __initdata command_line[COMMAND_LINE_SIZE] = { 0 }; | 48 | static char __initdata command_line[COMMAND_LINE_SIZE] = { 0 }; |
49 | 49 | ||
50 | static void __init add_arg(char *arg) | 50 | static void __init add_arg(char *arg) |
@@ -58,7 +58,12 @@ static void __init add_arg(char *arg) | |||
58 | strcat(command_line, arg); | 58 | strcat(command_line, arg); |
59 | } | 59 | } |
60 | 60 | ||
61 | struct cpuinfo_um boot_cpu_data = { | 61 | /* |
62 | * These fields are initialized at boot time and not changed. | ||
63 | * XXX This structure is used only in the non-SMP case. Maybe this | ||
64 | * should be moved to smp.c. | ||
65 | */ | ||
66 | struct cpuinfo_um boot_cpu_data = { | ||
62 | .loops_per_jiffy = 0, | 67 | .loops_per_jiffy = 0, |
63 | .ipi_pipe = { -1, -1 } | 68 | .ipi_pipe = { -1, -1 } |
64 | }; | 69 | }; |
@@ -119,14 +124,12 @@ const struct seq_operations cpuinfo_op = { | |||
119 | /* Set in linux_main */ | 124 | /* Set in linux_main */ |
120 | unsigned long host_task_size; | 125 | unsigned long host_task_size; |
121 | unsigned long task_size; | 126 | unsigned long task_size; |
122 | |||
123 | unsigned long uml_start; | ||
124 | |||
125 | /* Set in early boot */ | ||
126 | unsigned long uml_physmem; | 127 | unsigned long uml_physmem; |
127 | unsigned long uml_reserved; | 128 | unsigned long uml_reserved; /* Also modified in mem_init */ |
128 | unsigned long start_vm; | 129 | unsigned long start_vm; |
129 | unsigned long end_vm; | 130 | unsigned long end_vm; |
131 | |||
132 | /* Set in uml_ncpus_setup */ | ||
130 | int ncpus = 1; | 133 | int ncpus = 1; |
131 | 134 | ||
132 | #ifdef CONFIG_CMDLINE_ON_HOST | 135 | #ifdef CONFIG_CMDLINE_ON_HOST |
@@ -140,6 +143,8 @@ static char *argv1_end = NULL; | |||
140 | 143 | ||
141 | /* Set in early boot */ | 144 | /* Set in early boot */ |
142 | static int have_root __initdata = 0; | 145 | static int have_root __initdata = 0; |
146 | |||
147 | /* Set in uml_mem_setup and modified in linux_main */ | ||
143 | long long physmem_size = 32 * 1024 * 1024; | 148 | long long physmem_size = 32 * 1024 * 1024; |
144 | 149 | ||
145 | void set_cmdline(char *cmd) | 150 | void set_cmdline(char *cmd) |
@@ -378,7 +383,6 @@ int __init linux_main(int argc, char **argv) | |||
378 | 383 | ||
379 | printf("UML running in %s mode\n", mode); | 384 | printf("UML running in %s mode\n", mode); |
380 | 385 | ||
381 | uml_start = (unsigned long) &__binary_start; | ||
382 | host_task_size = CHOOSE_MODE_PROC(set_task_sizes_tt, | 386 | host_task_size = CHOOSE_MODE_PROC(set_task_sizes_tt, |
383 | set_task_sizes_skas, &task_size); | 387 | set_task_sizes_skas, &task_size); |
384 | 388 | ||
@@ -400,7 +404,7 @@ int __init linux_main(int argc, char **argv) | |||
400 | physmem_size += UML_ROUND_UP(brk_start) - UML_ROUND_UP(&_end); | 404 | physmem_size += UML_ROUND_UP(brk_start) - UML_ROUND_UP(&_end); |
401 | } | 405 | } |
402 | 406 | ||
403 | uml_physmem = uml_start & PAGE_MASK; | 407 | uml_physmem = (unsigned long) &__binary_start & PAGE_MASK; |
404 | 408 | ||
405 | /* Reserve up to 4M after the current brk */ | 409 | /* Reserve up to 4M after the current brk */ |
406 | uml_reserved = ROUND_4M(brk_start) + (1 << 22); | 410 | uml_reserved = ROUND_4M(brk_start) + (1 << 22); |