diff options
author | Jeff Dike <jdike@addtoit.com> | 2008-02-05 01:31:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:30 -0500 |
commit | 80e39311ff3d7d2267ea8d259aab8dc9d5a59d61 (patch) | |
tree | 141c6adb305a57cc8284580d88a839343f57ee90 /arch/um | |
parent | 3a24ebf0cb2ca44fdcdb5cae9ed2e778e5170f97 (diff) |
uml: SMP locking commentary
Add some more commentary about various pieces of global data not needing
locking.
Also got rid of unmap_physmem since that is no longer used.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
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/drivers/net_kern.c | 7 | ||||
-rw-r--r-- | arch/um/include/mem_user.h | 1 | ||||
-rw-r--r-- | arch/um/kernel/mem.c | 13 | ||||
-rw-r--r-- | arch/um/kernel/physmem.c | 6 |
4 files changed, 17 insertions, 10 deletions
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 3c6c44ca1ffa..ca71577f3630 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -368,7 +368,6 @@ static struct platform_driver uml_net_driver = { | |||
368 | .name = DRIVER_NAME, | 368 | .name = DRIVER_NAME, |
369 | }, | 369 | }, |
370 | }; | 370 | }; |
371 | static int driver_registered; | ||
372 | 371 | ||
373 | static void net_device_release(struct device *dev) | 372 | static void net_device_release(struct device *dev) |
374 | { | 373 | { |
@@ -383,6 +382,12 @@ static void net_device_release(struct device *dev) | |||
383 | free_netdev(netdev); | 382 | free_netdev(netdev); |
384 | } | 383 | } |
385 | 384 | ||
385 | /* | ||
386 | * Ensures that platform_driver_register is called only once by | ||
387 | * eth_configure. Will be set in an initcall. | ||
388 | */ | ||
389 | static int driver_registered; | ||
390 | |||
386 | static void eth_configure(int n, void *init, char *mac, | 391 | static void eth_configure(int n, void *init, char *mac, |
387 | struct transport *transport) | 392 | struct transport *transport) |
388 | { | 393 | { |
diff --git a/arch/um/include/mem_user.h b/arch/um/include/mem_user.h index 4e6707bd0a08..46384acd547b 100644 --- a/arch/um/include/mem_user.h +++ b/arch/um/include/mem_user.h | |||
@@ -56,7 +56,6 @@ extern void setup_physmem(unsigned long start, unsigned long usable, | |||
56 | unsigned long len, unsigned long long highmem); | 56 | unsigned long len, unsigned long long highmem); |
57 | extern void add_iomem(char *name, int fd, unsigned long size); | 57 | extern void add_iomem(char *name, int fd, unsigned long size); |
58 | extern unsigned long phys_offset(unsigned long phys); | 58 | extern unsigned long phys_offset(unsigned long phys); |
59 | extern void unmap_physmem(void); | ||
60 | extern void map_memory(unsigned long virt, unsigned long phys, | 59 | extern void map_memory(unsigned long virt, unsigned long phys, |
61 | unsigned long len, int r, int w, int x); | 60 | unsigned long len, int r, int w, int x); |
62 | 61 | ||
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index 663011c2983f..d948babfc67a 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c | |||
@@ -22,17 +22,20 @@ | |||
22 | unsigned long *empty_zero_page = NULL; | 22 | unsigned long *empty_zero_page = NULL; |
23 | /* allocated in paging_init and unchanged thereafter */ | 23 | /* allocated in paging_init and unchanged thereafter */ |
24 | unsigned long *empty_bad_page = NULL; | 24 | unsigned long *empty_bad_page = NULL; |
25 | |||
26 | /* | ||
27 | * Initialized during boot, and readonly for initializing page tables | ||
28 | * afterwards | ||
29 | */ | ||
25 | pgd_t swapper_pg_dir[PTRS_PER_PGD]; | 30 | pgd_t swapper_pg_dir[PTRS_PER_PGD]; |
31 | |||
32 | /* Initialized at boot time, and readonly after that */ | ||
26 | unsigned long long highmem; | 33 | unsigned long long highmem; |
27 | int kmalloc_ok = 0; | 34 | int kmalloc_ok = 0; |
28 | 35 | ||
36 | /* Used during early boot */ | ||
29 | static unsigned long brk_end; | 37 | static unsigned long brk_end; |
30 | 38 | ||
31 | void unmap_physmem(void) | ||
32 | { | ||
33 | os_unmap_memory((void *) brk_end, uml_reserved - brk_end); | ||
34 | } | ||
35 | |||
36 | static void map_cb(void *unused) | 39 | static void map_cb(void *unused) |
37 | { | 40 | { |
38 | map_memory(brk_end, __pa(brk_end), uml_reserved - brk_end, 1, 1, 0); | 41 | map_memory(brk_end, __pa(brk_end), uml_reserved - brk_end, 1, 1, 0); |
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c index 9c9290005792..9757085a0220 100644 --- a/arch/um/kernel/physmem.c +++ b/arch/um/kernel/physmem.c | |||
@@ -164,10 +164,10 @@ __uml_setup("iomem=", parse_iomem, | |||
164 | * setup_iomem, both of which run during early boot. Afterwards, it's | 164 | * setup_iomem, both of which run during early boot. Afterwards, it's |
165 | * unchanged. | 165 | * unchanged. |
166 | */ | 166 | */ |
167 | struct iomem_region *iomem_regions = NULL; | 167 | struct iomem_region *iomem_regions; |
168 | 168 | ||
169 | /* Initialized in parse_iomem */ | 169 | /* Initialized in parse_iomem and unchanged thereafter */ |
170 | int iomem_size = 0; | 170 | int iomem_size; |
171 | 171 | ||
172 | unsigned long find_iomem(char *driver, unsigned long *len_out) | 172 | unsigned long find_iomem(char *driver, unsigned long *len_out) |
173 | { | 173 | { |