Skip to content

Commit 94c282d

Browse files
cfd-36Linus Torvalds
authored andcommitted
[PATCH] uml: locking comments in iomem driver
Comment some lack of locking in the iomem driver. Also, a couple of variables are in the wrong place, so they are moved. Signed-off-by: Jeff Dike <jdike@addtoit.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>
1 parent c6256c6 commit 94c282d

2 files changed

Lines changed: 17 additions & 10 deletions

File tree

‎arch/um/kernel/mem.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -367,16 +367,6 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
367367
return pte;
368368
}
369369

370-
struct iomem_region *iomem_regions = NULL;
371-
int iomem_size = 0;
372-
373-
extern int parse_iomem(char *str, int *add) __init;
374-
375-
__uml_setup("iomem=", parse_iomem,
376-
"iomem=<name>,<file>\n"
377-
" Configure <file> as an IO memory region named <name>.\n\n"
378-
);
379-
380370
/*
381371
* Overrides for Emacs so that we follow Linus's tabbing style.
382372
* Emacs will notice this stuff at the end of the file and automatically

‎arch/um/kernel/physmem.c‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,23 @@ __uml_setup("mem=", uml_mem_setup,
398398
" Example: mem=64M\n\n"
399399
);
400400

401+
extern int __init parse_iomem(char *str, int *add);
402+
403+
__uml_setup("iomem=", parse_iomem,
404+
"iomem=<name>,<file>\n"
405+
" Configure <file> as an IO memory region named <name>.\n\n"
406+
);
407+
408+
/*
409+
* This list is constructed in parse_iomem and addresses filled in in
410+
* setup_iomem, both of which run during early boot. Afterwards, it's
411+
* unchanged.
412+
*/
413+
struct iomem_region *iomem_regions = NULL;
414+
415+
/* Initialized in parse_iomem */
416+
int iomem_size = 0;
417+
401418
unsigned long find_iomem(char *driver, unsigned long *len_out)
402419
{
403420
struct iomem_region *region = iomem_regions;

0 commit comments

Comments
 (0)