Patch(?): linux-2.4.0-test11-pre4/drivers/sound/yss225.c compilefailure
In the particular case of yss225.c, I understand now that it
is ISA only, which is not hot pluggable, so __initdata should be fine; however, I would like to respond to some other points that Jeff Garzik raised.
Quoted 3 lines · Jeff Garzik
Please err on the conservative side -- IMHO you shouldn't mark a driver as hotpluggable (by using the '
__dev' prefix) unless you know it is necessary.
To the best of my knowledge, using __devinit does not "mark" a
driver as hot pluggable. All __devinit{,data} does is resolve to __init{,data} if CONFIG_HOTPLUG is undefined, and resolve to nothing if CONFIG_HOTPLUG is defined.
If a programmer errs in favor of __devinit, the result is
extra memory consumption under CONFIG_HOTPLUG. If a programmer errs in favor of __init, the result is a crash during hot p ug insertion. Avoiding crashes at the expensive of a pretty small amount of memory usage is the more "conservative" way to err.
Quoted 3 lines
Otherwise, you rob
CONFIG_HOTPLUGpeople of some memory that could otherwise be freed at boot. And the number ofCONFIG_HOTPLUGpeople is not small, it includes not only the CardBus users but USB users too...
We have been discussing this on linux-devel-usb. The
latest patches submitted to Linus and in 2.4.0-test10-pre{3,4} support USB hot plugging regardless of whether CONFIG_HOTPLUG is specified.
bash% find linux-2.4.0-test11-pre4/drivers/usb -type f | xargs egrep HOTPLUG bash%
Having USB hot plugging without needing to build in PCI
hot plugging is useful, since there are lots of devices that lack PCI hot plugging hardware but support USB hot plugging, including, for example, almost all desktop PC's and typical "appliance" devices. In addition, other places in the USB code have always relied on hot plugging by simulating a disconnect and reconnect to recover from some errors, a kludge which could potentially result in loss of some device state, but which is too complex to fix before 2.4.0.
After 2.4.0, and after the fake disconnect/reconnect code indrivers/usb/{devio,storage/scsiglue}.c is designed out, then we may want to explore adding __usbdevinit{,data} defines in include/linux/init.h that would be controlled by a new CONFIG_USB_HOTPLUG option, as in the patches that I posted for this to linux-usb-devel.
In that case, CONFIG_USB_HOTPLUG=y would give you the current
behavior and CONFIG_USB_HOTPLUG=n would give you a slightly smaller kernel that lacked the ability to support USB hot plugging. There is some question as to whether CONFIG_USB_HOTPLUG=n would just be a cool hack or if someone actually would use it. I am very interested in feeback on this question.
Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104 [email protected] \ / San Jose, California 95129-1034 +1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 5 lines · Adam J. Richter
If a programmer errs in favor of
__devinit, the result is
extra memory consumption underCONFIG_HOTPLUG. If a programmer errs in favor of__init, the result is a crash during hot p ug insertion. Avoiding crashes at the expensive of a pretty small amount of memory usage is the more "conservative" way to err.
You suggest avoiding correctness in order to protect against dumb programmers. That path leads to Windows.
Quoted 10 lines
Quoted 3 lines
Otherwise, you rob
CONFIG_HOTPLUGpeople of some memory that could otherwise be freed at boot. And the number ofCONFIG_HOTPLUGpeople is not small, it includes not only the CardBus users but USB users too...We have been discussing this on linux-devel-usb. The
latest patches submitted to Linus and in 2.4.0-test10-pre{3,4} support USB hot plugging regardless of whetherCONFIG_HOTPLUGis specified.bash% find linux-2.4.0-test11-pre4/drivers/usb -type f | xargs egrep HOTPLUG
Read the code. test11-pre[34] was broken due to my recent CONFIG_KMOD/CONFIG_HOTPLUG separation, and should have had CONFIG_HOTPLUG. test11-pre5 has CONFIG_HOTPLUG. As it should.
Quoted 2 lines
Having USB hot plugging without needing to build in PCI
hot plugging is useful,
Of course. But CONFIG_HOTPLUG does not mean PCI hotplugging. It means any hotplug support in the kernel. That is why __devinit exists and is used in a generic fashion.
Quoted 4 lines
After 2.4.0, [...] we maywant to explore adding __usbdevinit{,data} defines in
include/linux/init.hthat would be controlled by a newCONFIG_USB_HOTPLUGoption, as in the patches that I posted for this to linux-usb-devel.
This is not just a USB issue. Please discuss this on linux-kernel, so we can have a coherent hotplug strategy for the entire kernel.
If we are going to create CONFIG_USB_HOTPLUG, we must -eliminate- CONFIG_HOTPLUG, and create CONFIG_PCI_HOTPLUG, and CONFIG_ANOTHERBUS_HOTPLUG and so on, for each hotplug bus.
Jeff
Signature · 7 lines
Jeff Garzik | Building 1024 | The chief enemy of creativity is "good" sense MandrakeSoft | -- Picasso - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/
Quoted 3 lines · Jeff Garzik
This is not just a USB issue. Please discuss this on linux-kernel, so we can have a coherent hotplug strategy for the entire kernel.
I agree. If I see the topic come up on linux-usb-devel again, I'll push it over to linux-kernel.
Quoted 3 lines
If we are going to create
CONFIG_USB_HOTPLUG, we must -eliminate-CONFIG_HOTPLUG, and createCONFIG_PCI_HOTPLUG, andCONFIG_ANOTHERBUS_HOTPLUGand so on, for each hotplug bus.
Argh!
I thought the whole point of this was to make there be only one hotplug strategy, due to the fact that this is a real need.
Please let's not go down this path. It was all starting to look so nice...
greg k-h
Signature · 6 lines
greg@(kroah|wirex).com http://immunix.org/~greg - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/
Quoted 11 lines · Greg KH
Quoted 3 lines · Jeff Garzik
If we are going to create
CONFIG_USB_HOTPLUG, we must -eliminate-CONFIG_HOTPLUG, and createCONFIG_PCI_HOTPLUG, andCONFIG_ANOTHERBUS_HOTPLUGand so on, for each hotplug bus.Argh!
I thought the whole point of this was to make there be only one hotplug strategy, due to the fact that this is a real need.Please let's not go down this path. It was all starting to look so nice...
I -want- there to be only one hotplug strategy, but Adam seemed to be talking about the opposite, with his CONFIG_USB_HOTPLUG suggestion.
I'm hoping that Linus will disagree with the splintering of CONFIG_HOTPLUG too...
I think it's too late in 2.4.x cycle to change now anyway.
Jeff
Signature · 7 lines
Jeff Garzik | Building 1024 | The chief enemy of creativity is "good" sense MandrakeSoft | -- Picasso - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/
College of Cardinals Vote!!!
Quoted 5 lines · Jeff Garzik
I -want- there to be only one hotplug strategy, but Adam seemed to be talking about the opposite, with his
CONFIG_USB_HOTPLUGsuggestion.I'm hoping that Linus will disagree with the splintering of
CONFIG_HOTPLUGtoo...
CONFIG_HOTPLUG CONFIG_'parse like hell'_HOTPLUG
2 0
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 3 lines · Jeff Garzik
I -want- there to be only one hotplug strategy, but Adam seemed to be talking about the opposite, with his
CONFIG_USB_HOTPLUGsuggestion.
Here's Adam's proposal for CONFIG_USB_HOTPLUG:
http://www.geocrawler.com/lists/3/SourceForge/2571/250/4599696/
Quoted 1 line
From what I remember (and from looking at this message), all he seems to
want is to redefine the __init and __initdata macros depending on a config item. There's no other grander scheme of things, right Adam?
Although such a small memory savings for turning a bus whose main goal in life is to enable hot plugged devices into a fixed connection doesn't seem worth it.
We are talking embedded USB hosts here, not devices. USB devices running Linux is a whole 'nother thing, which I'm just now starting to look into...
Comments Adam?
thanks,
greg k-h
Signature · 6 lines
greg@(kroah|wirex).com http://immunix.org/~greg - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/