public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] UML - part 2 of 3
@ 2002-07-28 16:34 Jeff Dike
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Dike @ 2002-07-28 16:34 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, jdike

This patch (against 2.5.29) contains all of the changes to generic code 
needed by UML.  Per the first part of this set, include/linkage.h is no
longer changed by UML.

CREDITS -
	Changes my address and adds a UML credit for Lars Brinkoff.

MAINTAINERS -
	Adds a UML entry.

Makefile -
	When ARCH=um is on the command line to do a UML build, the old value
of ARCH is saved in $(SUBARCH) for the later use of the UML build.

drivers/char/Makefile -
	Sets KEYMAP, KEYBD, CONSOLE empty to prevent hardware drivers from
being compiled in.

drivers/net/setup.c -
	Backs out a UML hook which leaked into your tree which UML no
longer uses.

init/do_mounts.c -
	Adds a set of entries to dev_name_struct for the UML block device.

				Jeff

diff -Naur orig/CREDITS linus/CREDITS
--- orig/CREDITS	Sat Jul 27 21:52:33 2002
+++ linus/CREDITS	Sun Jul 28 00:35:55 2002
@@ -433,6 +433,7 @@
 E: lars@nocrew.org
 W: http://lars.nocrew.org/
 D: dsp56k device driver
+D: ptrace proxy in user mode kernel port
 S: Kopmansg 2
 S: 411 13  Goteborg
 S: Sweden
@@ -725,7 +726,7 @@
 E: jdike@karaya.com
 W: http://user-mode-linux.sourceforge.net
 D: User mode kernel port
-S: RR1 Box 67C
+S: 375 Tubbs Hill Rd
 S: Deering NH 03244
 S: USA
 
diff -Naur orig/MAINTAINERS linus/MAINTAINERS
--- orig/MAINTAINERS	Tue Jul 16 23:55:50 2002
+++ linus/MAINTAINERS	Thu Jul 25 18:49:30 2002
@@ -1849,6 +1849,14 @@
 L:	linux-usb-devel@lists.sourceforge.net
 S:	Maintained
 
+USER-MODE LINUX
+P:	Jeff Dike
+M:	jdike@karaya.com
+L:	user-mode-linux-devel@lists.sourceforge.net
+L:	user-mode-linux-user@lists.sourceforge.net
+W:	http://user-mode-linux.sourceforge.net
+S:	Maintained
+	
 VFAT FILESYSTEM:
 P:	Gordon Chaffee
 M:	chaffee@cs.berkeley.edu
diff -Naur orig/Makefile linus/Makefile
--- orig/Makefile	Sat Jul 27 21:52:33 2002
+++ linus/Makefile	Sun Jul 28 00:35:55 2002
@@ -27,7 +27,15 @@
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
-ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
+# SUBARCH tells the usermode build what the underlying arch is.  That is set
+# first, and if a usermode build is happening, the "ARCH=um" on the command
+# line overrides the setting of ARCH below.  If a native build is happening,
+# then ARCH is assigned, getting whatever value it gets normally, and 
+# SUBARCH is subsequently ignored.
+
+SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
+ARCH := $(SUBARCH)
+
 KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g")
 
 CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
diff -Naur orig/drivers/char/Makefile linus/drivers/char/Makefile
--- orig/drivers/char/Makefile	Thu Jul 25 12:31:26 2002
+++ linus/drivers/char/Makefile	Thu Jul 25 17:07:06 2002
@@ -65,6 +65,12 @@
   endif
 endif
 
+ifeq ($(ARCH),um)
+  KEYMAP   =
+  KEYBD    =
+  CONSOLE  =
+endif
+
 ifeq ($(ARCH),sh)
   KEYMAP   =
   KEYBD    =
diff -Naur orig/drivers/net/setup.c linus/drivers/net/setup.c
--- orig/drivers/net/setup.c	Sat Jul 21 21:26:53 2001
+++ linus/drivers/net/setup.c	Wed Jul 10 15:40:57 2002
@@ -28,7 +28,6 @@
 extern int lmc_setup(void);
 
 extern int madgemc_probe(void);
-extern int uml_net_probe(void);
 
 /* Pad device name to IFNAMSIZ=16. F.e. __PAD6 is string of 9 zeros. */
 #define __PAD6 "\0\0\0\0\0\0\0\0\0"
@@ -102,9 +101,6 @@
  */  
 #ifdef CONFIG_MADGEMC
 	{madgemc_probe, 0},
-#endif
-#ifdef CONFIG_UML_NET
-	{uml_net_probe, 0},
 #endif
  
 	{NULL, 0},
diff -Naur orig/init/do_mounts.c linus/init/do_mounts.c
--- orig/init/do_mounts.c	Sat Jul 27 21:52:34 2002
+++ linus/init/do_mounts.c	Sun Jul 28 00:35:56 2002
@@ -156,6 +156,22 @@
 	{ "pf",		0x2f00 },
 	{ "apblock", APBLOCK_MAJOR << 8},
 	{ "ddv", DDV_MAJOR << 8},
+ 	{ "ubd0", UBD_MAJOR << 8 | 0 << 4},
+ 	{ "ubda", UBD_MAJOR << 8 | 0 << 4},
+ 	{ "ubd1", UBD_MAJOR << 8 | 1 << 4},
+ 	{ "ubdb", UBD_MAJOR << 8 | 1 << 4},
+ 	{ "ubd2", UBD_MAJOR << 8 | 2 << 4},
+ 	{ "ubdc", UBD_MAJOR << 8 | 2 << 4},
+ 	{ "ubd3", UBD_MAJOR << 8 | 3 << 4},
+ 	{ "ubdd", UBD_MAJOR << 8 | 3 << 4},
+ 	{ "ubd4", UBD_MAJOR << 8 | 4 << 4},
+ 	{ "ubde", UBD_MAJOR << 8 | 4 << 4},
+ 	{ "ubd5", UBD_MAJOR << 8 | 5 << 4},
+ 	{ "ubdf", UBD_MAJOR << 8 | 5 << 4},
+ 	{ "ubd6", UBD_MAJOR << 8 | 6 << 4},
+ 	{ "ubdg", UBD_MAJOR << 8 | 6 << 4},
+ 	{ "ubd7", UBD_MAJOR << 8 | 7 << 4},
+ 	{ "ubdh", UBD_MAJOR << 8 | 7 << 4},
 	{ "jsfd",    JSFD_MAJOR << 8},
 #if defined(CONFIG_ARCH_S390)
 	{ "dasda", (DASD_MAJOR << MINORBITS) },


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] UML - part 2 of 3
@ 2002-08-03  3:40 Jeff Dike
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Dike @ 2002-08-03  3:40 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, jdike

This patch (against 2.5.30) contains all of the changes to generic code 
needed by UML.

CREDITS -
	Changes my address and adds a UML credit for Lars Brinkoff.

MAINTAINERS -
	Adds a UML entry.

Makefile -
	When ARCH=um is on the command line to do a UML build, the old value
of ARCH is saved in $(SUBARCH) for the later use of the UML build.

drivers/char/Makefile -
	Sets KEYMAP, KEYBD, CONSOLE empty to prevent hardware drivers from
being compiled in.

drivers/net/setup.c -
	Backs out a UML hook which leaked into your tree which UML no
longer uses.

init/do_mounts.c -
	Adds a set of entries to dev_name_struct for the UML block device.

				Jeff
diff -Naur orig/CREDITS linus/CREDITS
--- orig/CREDITS	Thu Aug  1 20:40:49 2002
+++ linus/CREDITS	Fri Aug  2 22:04:38 2002
@@ -433,6 +433,7 @@
 E: lars@nocrew.org
 W: http://lars.nocrew.org/
 D: dsp56k device driver
+D: ptrace proxy in user mode kernel port
 S: Kopmansg 2
 S: 411 13  Goteborg
 S: Sweden
@@ -725,7 +726,7 @@
 E: jdike@karaya.com
 W: http://user-mode-linux.sourceforge.net
 D: User mode kernel port
-S: RR1 Box 67C
+S: 375 Tubbs Hill Rd
 S: Deering NH 03244
 S: USA
 
diff -Naur orig/MAINTAINERS linus/MAINTAINERS
--- orig/MAINTAINERS	Thu Aug  1 20:40:49 2002
+++ linus/MAINTAINERS	Fri Aug  2 22:04:38 2002
@@ -1858,6 +1858,14 @@
 L:	linux-usb-devel@lists.sourceforge.net
 S:	Maintained
 
+USER-MODE LINUX
+P:	Jeff Dike
+M:	jdike@karaya.com
+L:	user-mode-linux-devel@lists.sourceforge.net
+L:	user-mode-linux-user@lists.sourceforge.net
+W:	http://user-mode-linux.sourceforge.net
+S:	Maintained
+	
 VFAT FILESYSTEM:
 P:	Gordon Chaffee
 M:	chaffee@cs.berkeley.edu
diff -Naur orig/Makefile linus/Makefile
--- orig/Makefile	Thu Aug  1 20:40:49 2002
+++ linus/Makefile	Fri Aug  2 22:04:38 2002
@@ -27,7 +27,15 @@
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
-ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
+# SUBARCH tells the usermode build what the underlying arch is.  That is set
+# first, and if a usermode build is happening, the "ARCH=um" on the command
+# line overrides the setting of ARCH below.  If a native build is happening,
+# then ARCH is assigned, getting whatever value it gets normally, and 
+# SUBARCH is subsequently ignored.
+
+SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
+ARCH := $(SUBARCH)
+
 KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g")
 
 CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
diff -Naur orig/drivers/char/Makefile linus/drivers/char/Makefile
--- orig/drivers/char/Makefile	Thu Aug  1 20:40:53 2002
+++ linus/drivers/char/Makefile	Fri Aug  2 22:04:41 2002
@@ -65,6 +65,12 @@
   endif
 endif
 
+ifeq ($(ARCH),um)
+  KEYMAP   =
+  KEYBD    =
+  CONSOLE  =
+endif
+
 ifeq ($(ARCH),sh)
   KEYMAP   =
   KEYBD    =
diff -Naur orig/drivers/net/setup.c linus/drivers/net/setup.c
--- orig/drivers/net/setup.c	Sat Jul 21 21:26:53 2001
+++ linus/drivers/net/setup.c	Wed Jul 10 15:40:57 2002
@@ -28,7 +28,6 @@
 extern int lmc_setup(void);
 
 extern int madgemc_probe(void);
-extern int uml_net_probe(void);
 
 /* Pad device name to IFNAMSIZ=16. F.e. __PAD6 is string of 9 zeros. */
 #define __PAD6 "\0\0\0\0\0\0\0\0\0"
@@ -102,9 +101,6 @@
  */  
 #ifdef CONFIG_MADGEMC
 	{madgemc_probe, 0},
-#endif
-#ifdef CONFIG_UML_NET
-	{uml_net_probe, 0},
 #endif
  
 	{NULL, 0},
diff -Naur orig/init/do_mounts.c linus/init/do_mounts.c
--- orig/init/do_mounts.c	Thu Aug  1 20:41:01 2002
+++ linus/init/do_mounts.c	Fri Aug  2 22:04:47 2002
@@ -156,6 +156,22 @@
 	{ "pf",		0x2f00 },
 	{ "apblock", APBLOCK_MAJOR << 8},
 	{ "ddv", DDV_MAJOR << 8},
+ 	{ "ubd0", UBD_MAJOR << 8 | 0 << 4},
+ 	{ "ubda", UBD_MAJOR << 8 | 0 << 4},
+ 	{ "ubd1", UBD_MAJOR << 8 | 1 << 4},
+ 	{ "ubdb", UBD_MAJOR << 8 | 1 << 4},
+ 	{ "ubd2", UBD_MAJOR << 8 | 2 << 4},
+ 	{ "ubdc", UBD_MAJOR << 8 | 2 << 4},
+ 	{ "ubd3", UBD_MAJOR << 8 | 3 << 4},
+ 	{ "ubdd", UBD_MAJOR << 8 | 3 << 4},
+ 	{ "ubd4", UBD_MAJOR << 8 | 4 << 4},
+ 	{ "ubde", UBD_MAJOR << 8 | 4 << 4},
+ 	{ "ubd5", UBD_MAJOR << 8 | 5 << 4},
+ 	{ "ubdf", UBD_MAJOR << 8 | 5 << 4},
+ 	{ "ubd6", UBD_MAJOR << 8 | 6 << 4},
+ 	{ "ubdg", UBD_MAJOR << 8 | 6 << 4},
+ 	{ "ubd7", UBD_MAJOR << 8 | 7 << 4},
+ 	{ "ubdh", UBD_MAJOR << 8 | 7 << 4},
 	{ "jsfd",    JSFD_MAJOR << 8},
 #if defined(CONFIG_ARCH_S390)
 	{ "dasda", (DASD_MAJOR << MINORBITS) },


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] UML - part 2 of 3
  2002-08-13 17:05 Jeff Dike
@ 2002-08-13 16:13 ` Linus Torvalds
  2002-08-13 20:08   ` Jeff Dike
  0 siblings, 1 reply; 6+ messages in thread
From: Linus Torvalds @ 2002-08-13 16:13 UTC (permalink / raw)
  To: Jeff Dike; +Cc: linux-kernel


On Tue, 13 Aug 2002, Jeff Dike wrote:
>
> This patch contains the remaining unmerged change to generic code that UML 
> needs.  It adds boot entries for the UML block device.

I absolutely detest the array in do_mounts, and I detest it even more when 
somebody adds a gazillion new entries to it.

Please use "root=0xXXYY" instead, or consider figuring out the name 
_automatically_ from the list of genhd's in the system (ie the reverse of 
blkdev_name() or whatever it is called).

		Linus


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] UML - part 2 of 3
@ 2002-08-13 17:05 Jeff Dike
  2002-08-13 16:13 ` Linus Torvalds
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Dike @ 2002-08-13 17:05 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, jdike

This patch contains the remaining unmerged change to generic code that UML 
needs.  It adds boot entries for the UML block device.

				Jeff

diff -Naur orig/init/do_mounts.c linus/init/do_mounts.c
--- orig/init/do_mounts.c	Thu Aug  1 20:41:01 2002
+++ linus/init/do_mounts.c	Fri Aug  2 22:04:47 2002
@@ -156,6 +156,22 @@
 	{ "pf",		0x2f00 },
 	{ "apblock", APBLOCK_MAJOR << 8},
 	{ "ddv", DDV_MAJOR << 8},
+ 	{ "ubd0", UBD_MAJOR << 8 | 0 << 4},
+ 	{ "ubda", UBD_MAJOR << 8 | 0 << 4},
+ 	{ "ubd1", UBD_MAJOR << 8 | 1 << 4},
+ 	{ "ubdb", UBD_MAJOR << 8 | 1 << 4},
+ 	{ "ubd2", UBD_MAJOR << 8 | 2 << 4},
+ 	{ "ubdc", UBD_MAJOR << 8 | 2 << 4},
+ 	{ "ubd3", UBD_MAJOR << 8 | 3 << 4},
+ 	{ "ubdd", UBD_MAJOR << 8 | 3 << 4},
+ 	{ "ubd4", UBD_MAJOR << 8 | 4 << 4},
+ 	{ "ubde", UBD_MAJOR << 8 | 4 << 4},
+ 	{ "ubd5", UBD_MAJOR << 8 | 5 << 4},
+ 	{ "ubdf", UBD_MAJOR << 8 | 5 << 4},
+ 	{ "ubd6", UBD_MAJOR << 8 | 6 << 4},
+ 	{ "ubdg", UBD_MAJOR << 8 | 6 << 4},
+ 	{ "ubd7", UBD_MAJOR << 8 | 7 << 4},
+ 	{ "ubdh", UBD_MAJOR << 8 | 7 << 4},
 	{ "jsfd",    JSFD_MAJOR << 8},
 #if defined(CONFIG_ARCH_S390)
 	{ "dasda", (DASD_MAJOR << MINORBITS) },


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] UML - part 2 of 3
  2002-08-13 20:08   ` Jeff Dike
@ 2002-08-13 19:26     ` Linus Torvalds
  0 siblings, 0 replies; 6+ messages in thread
From: Linus Torvalds @ 2002-08-13 19:26 UTC (permalink / raw)
  To: Jeff Dike; +Cc: linux-kernel


On Tue, 13 Aug 2002, Jeff Dike wrote:
> 
> The root_dev_names array looks like it can be eliminated entirely, as long
> as the gendisk list is populated before checksetup.

Well, think of it as "gendisk is populated before root device needs to be 
mounted".

And the fact is, it clearly has to be _anyway_.

The name lookup shouldn't be done any earlier than the actual mount 
anyway.

		Linus


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] UML - part 2 of 3
  2002-08-13 16:13 ` Linus Torvalds
@ 2002-08-13 20:08   ` Jeff Dike
  2002-08-13 19:26     ` Linus Torvalds
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Dike @ 2002-08-13 20:08 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

torvalds@transmeta.com said:
> Please use "root=0xXXYY" instead, or consider figuring out the name
> _automatically_ from the list of genhd's in the system (ie the reverse
> of  blkdev_name() or whatever it is called).

OK, consider that patch withdrawn.  In its place is the one below.  It's in
UML arch code, so it needs to be applied after UML itself.  It disables
'root=/dev/ubdxx' in UML for the time being.

The root_dev_names array looks like it can be eliminated entirely, as long
as the gendisk list is populated before checksetup.  This means either there
needs to be a before_setup_initcall or the calculation of the rootdev kdev_t
needs to be split out from the argument parsing and put in a late initcall.
I don't know if that breaks anything.

If that is reasonable, I can start laying the groundwork.

				Jeff

--- linus/arch/um/kernel/um_arch.c~     Fri Aug  2 22:06:03 2002
+++ linus/arch/um/kernel/um_arch.c      Tue Aug 13 14:32:39 2002
@@ -38,7 +38,7 @@
 int fg_console;
 struct kbd_struct kbd_table[MAX_NR_CONSOLES];
 
-#define DEFAULT_COMMAND_LINE "root=/dev/ubd0"
+#define DEFAULT_COMMAND_LINE "root=6200"
 
 unsigned long thread_saved_pc(struct task_struct *task)
 {


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-08-13 19:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-28 16:34 [PATCH] UML - part 2 of 3 Jeff Dike
  -- strict thread matches above, loose matches on Subject: below --
2002-08-03  3:40 Jeff Dike
2002-08-13 17:05 Jeff Dike
2002-08-13 16:13 ` Linus Torvalds
2002-08-13 20:08   ` Jeff Dike
2002-08-13 19:26     ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox