Commit 1d1497e1f9ffe2f7198c916abd112226a7a503f2

Authored by Jeff Dike
Committed by Linus Torvalds
1 parent 377fad3acb

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>

Showing 1 changed file with 13 additions and 9 deletions Side-by-side Diff

arch/um/kernel/um_arch.c
... ... @@ -44,7 +44,7 @@
44 44  
45 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 48 static char __initdata command_line[COMMAND_LINE_SIZE] = { 0 };
49 49  
50 50 static void __init add_arg(char *arg)
... ... @@ -58,7 +58,12 @@
58 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 67 .loops_per_jiffy = 0,
63 68 .ipi_pipe = { -1, -1 }
64 69 };
65 70  
66 71  
... ... @@ -119,14 +124,12 @@
119 124 /* Set in linux_main */
120 125 unsigned long host_task_size;
121 126 unsigned long task_size;
122   -
123   -unsigned long uml_start;
124   -
125   -/* Set in early boot */
126 127 unsigned long uml_physmem;
127   -unsigned long uml_reserved;
  128 +unsigned long uml_reserved; /* Also modified in mem_init */
128 129 unsigned long start_vm;
129 130 unsigned long end_vm;
  131 +
  132 +/* Set in uml_ncpus_setup */
130 133 int ncpus = 1;
131 134  
132 135 #ifdef CONFIG_CMDLINE_ON_HOST
... ... @@ -140,6 +143,8 @@
140 143  
141 144 /* Set in early boot */
142 145 static int have_root __initdata = 0;
  146 +
  147 +/* Set in uml_mem_setup and modified in linux_main */
143 148 long long physmem_size = 32 * 1024 * 1024;
144 149  
145 150 void set_cmdline(char *cmd)
... ... @@ -378,7 +383,6 @@
378 383  
379 384 printf("UML running in %s mode\n", mode);
380 385  
381   - uml_start = (unsigned long) &__binary_start;
382 386 host_task_size = CHOOSE_MODE_PROC(set_task_sizes_tt,
383 387 set_task_sizes_skas, &task_size);
384 388  
... ... @@ -400,7 +404,7 @@
400 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 409 /* Reserve up to 4M after the current brk */
406 410 uml_reserved = ROUND_4M(brk_start) + (1 << 22);