linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Enable all events for initramfs
@ 2004-07-13 11:16 Hannes Reinecke
  2004-07-14  4:01 ` Alexander E. Patrakov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hannes Reinecke @ 2004-07-13 11:16 UTC (permalink / raw)
  To: Linux Kernel; +Cc: hotplug

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

Hi all,

currently most driver events are not sent out when using initramfs as 
driver_init() (which triggers the events) is called before init_workqueues.

This patch rearranges the init calls so that the hotplug event queue is 
enabled prior to calling driver_init(), hence we're getting all hotplug 
events again.

Patch is relative to 2.6.7-mm6, but should apply to 2.6.8-rc1 also.

Please apply.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke			hare@suse.de
SuSE Linux AG				S390 & zSeries
Maxfeldstraße 5				+49 911 74053 688
90409 Nürnberg				http://www.suse.de

[-- Attachment #2: early-hotplug-events.patch --]
[-- Type: text/x-patch, Size: 1120 bytes --]

--- linux-2.6.7-mm6/init/main.c.orig	2004-07-09 11:01:04.000000000 +0200
+++ linux-2.6.7-mm6/init/main.c	2004-07-09 11:14:19.000000000 +0200
@@ -93,6 +93,7 @@
 extern void populate_rootfs(void);
 extern void driver_init(void);
 extern void prepare_namespace(void);
+extern void usermodehelper_init(void);
 
 #ifdef CONFIG_TC
 extern void tc_init(void);
@@ -599,6 +600,10 @@
  */
 static void __init do_basic_setup(void)
 {
+	/* drivers will send hotplug events */
+	init_workqueues();
+	usermodehelper_init();
+
 	driver_init();
 
 #ifdef CONFIG_SYSCTL
@@ -608,7 +613,6 @@
 	/* Networking initialization needs a process context */ 
 	sock_init();
 
-	init_workqueues();
 	do_initcalls();
 }
 
--- linux-2.6.7-mm6/kernel/kmod.c.orig	2004-07-09 11:02:32.000000000 +0200
+++ linux-2.6.7-mm6/kernel/kmod.c	2004-07-13 14:11:09.287575443 +0200
@@ -272,10 +272,8 @@
 }
 EXPORT_SYMBOL(call_usermodehelper);
 
-static __init int usermodehelper_init(void)
+void __init usermodehelper_init(void)
 {
 	khelper_wq = create_singlethread_workqueue("khelper");
 	BUG_ON(!khelper_wq);
-	return 0;
 }
-core_initcall(usermodehelper_init);

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

end of thread, other threads:[~2004-07-15 16:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-13 11:16 [PATCH] Enable all events for initramfs Hannes Reinecke
2004-07-14  4:01 ` Alexander E. Patrakov
2004-07-14  6:24 ` Olaf Hering
2004-07-15 16:45 ` Alexander E. Patrakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).