Skip to contentSkip to conversation

UML - Locking comments in iomem driver

PATCH New Jeff Dike 1 participant 1 message Jan 5, 2007 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 8/9 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.

--

 arch/um/kernel/mem.c     |   10 ----------
 arch/um/kernel/physmem.c |   17 +++++++++++++++++
 2 files changed, 17 insertions(+), 10 deletions(-)
arch/um/kernel/mem.c +0 -10
Index: linux-2.6.18-mm/arch/um/kernel/mem.c
===================================================================
@@ -368,16 +368,6 @@ struct page *pte_alloc_one(struct mm_str
 	return pte;
 }
 
-struct iomem_region *iomem_regions = NULL;
-int iomem_size = 0;
-
-extern int parse_iomem(char *str, int *add) __init;
-
-__uml_setup("iomem=", parse_iomem,
-"iomem=<name>,<file>\n"
-"    Configure <file> as an IO memory region named <name>.\n\n"
-);
-
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
  * Emacs will notice this stuff at the end of the file and automatically
arch/um/kernel/physmem.c +17 -0
Index: linux-2.6.18-mm/arch/um/kernel/physmem.c
===================================================================
@@ -398,6 +398,23 @@ __uml_setup("mem=", uml_mem_setup,
 "	Example: mem=64M\n\n"
 );
 
+extern int __init parse_iomem(char *str, int *add);
+
+__uml_setup("iomem=", parse_iomem,
+"iomem=<name>,<file>\n"
+"    Configure <file> as an IO memory region named <name>.\n\n"
+);
+
+/*
+ * This list is constructed in parse_iomem and addresses filled in in
+ * setup_iomem, both of which run during early boot.  Afterwards, it's
+ * unchanged.
+ */
+struct iomem_region *iomem_regions = NULL;
+
+/* Initialized in parse_iomem */
+int iomem_size = 0;
+
 unsigned long find_iomem(char *driver, unsigned long *len_out)
 {
 	struct iomem_region *region = iomem_regions;

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel