From: Hannes Reinecke <hare@suse.de>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: hotplug <linux-hotplug-devel@lists.sourceforge.net>
Subject: [PATCH] Enable all events for initramfs
Date: Tue, 13 Jul 2004 11:16:31 +0000 [thread overview]
Message-ID: <40F3C48F.30905@suse.de> (raw)
[-- 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);
next reply other threads:[~2004-07-13 11:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-13 11:16 Hannes Reinecke [this message]
2004-07-14 4:01 ` [PATCH] Enable all events for initramfs Alexander E. Patrakov
2004-07-14 6:24 ` Olaf Hering
2004-07-15 16:45 ` Alexander E. Patrakov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40F3C48F.30905@suse.de \
--to=hare@suse.de \
--cc=linux-hotplug-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).