From: "Adam J. Richter" <adam@yggdrasil.com>
To: greg@kroah.com, jung-ik.lee@intel.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: Patch: 2.5.45 PCI Fixups for PCI HotPlug
Date: Sun, 3 Nov 2002 04:31:50 -0800 [thread overview]
Message-ID: <20021103043150.A1201@baldur.yggdrasil.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]
Greg KH wrote:
>Hm, in looking at this, I know the majority of people who want
>CONFIG_HOTPLUG probably do not run with CONFIG_PCI_HOTPLUG as the
>hardware's still quite rare. To force those people to keep around all
>of the PCI quirks functions and tables after init happens, is a bit
>cruel. I wonder if it's time to start having different subsystems
>modify __devinit depending on their config variables.
Are there PCI bridge cards that use all of those? For
example, I thought that Triton was a series of Intel motherboard
chipsets for 586 processors. Perhaps you only need to keep a
few of those routines.
Jung-Ik: perhaps you could to an lspci and an "lspci -n" on
your machine when the bridge card is plugged in, which should provide
enough information to determine which routines you really need to
keep.
>Does this sound like a good idea? If so, I can probably knock up
>something for the PCI code pretty easily (yes, I'll keep in mind CardBus
>stuff, not all hotplug pci is on servers...)
>
>__pci_devinit anyone? :)
I posted a patch to define __usbinit and cousins to the
linux-kernel mailing list about two and a half years ago. The change
has been sitting in my <linux/init.h> since then. I just did a string
replacement to make the matching pci calls. Here an an untested patch
that shows both.
I believe that, theoretically, all __dev{init,exit}{,func}
should only be __dev<bus>{init,exit}{,func}.
--
Adam J. Richter __ ______________ 575 Oroville Road
adam@yggdrasil.com \ / Milpitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1063 bytes --]
--- linux-2.5.45/include/linux/init.h 2002-10-30 16:41:39.000000000 -0800
+++ linux/include/linux/init.h 2002-11-03 03:59:35.000000000 -0800
@@ -196,4 +196,33 @@
#define __devexit_p(x) NULL
#endif
+#ifdef CONFIG_PCI_HOTPLUG
+#define __pcidevinit
+#define __pcidevinitdata
+#define __pcidevexit
+#define __pcidevexitdata
+#else
+#define __pcidevinit __init
+#define __pcidevinitdata __initdata
+#define __pcidevexit __exit
+#define __pcidevexitdata __exitdata
+#endif
+
+/* Warning: without CONFIG_USB_HOTPLUG, you will also not support
+ hot plugging of USB *controllers*, even though they are usually PCI
+ devices, because they will generate USB hotplug events for their
+ attached devices when they (the controllers) are inserted or removed.
+*/
+#ifdef CONFIG_USB_HOTPLUG
+#define __usbdevinit
+#define __usbdevinitdata
+#define __usbdevexit
+#define __usbdevexitdata
+#else
+#define __usbdevinit __init
+#define __usbdevinitdata __initdata
+#define __usbdevexit __exit
+#define __usbdevexitdata __exitdata
+#endif
+
#endif /* _LINUX_INIT_H */
next reply other threads:[~2002-11-03 12:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-03 12:31 Adam J. Richter [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-11-06 0:14 Adam J. Richter
2002-11-05 13:17 Adam J. Richter
2002-11-05 15:28 ` Ivan Kokshaysky
2002-11-04 20:29 Adam J. Richter
2002-11-04 20:44 ` Jeff Garzik
2002-11-05 13:01 ` Ivan Kokshaysky
2002-11-04 18:23 Adam J. Richter
2002-11-04 19:05 ` Alan Cox
2002-11-04 18:06 Lee, Jung-Ik
2002-11-03 0:56 Lee, Jung-Ik
2002-11-03 7:58 ` Greg KH
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=20021103043150.A1201@baldur.yggdrasil.com \
--to=adam@yggdrasil.com \
--cc=greg@kroah.com \
--cc=jung-ik.lee@intel.com \
--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
all inboxes | Powered by JetHome®