Export symbols so CONFIG_INPUT works as a module
Subsystems (4)
PATCH 1/1 Export symbols so CONFIG_INPUT works as a module
Currently, modular input support fails to load with the following error:
qube:# modprobe input
input: Unknown symbol kobject_get_path
input: Unknown symbol add_input_randomness
In the short run, this can be solved by exporting these two symbols. There have been discussions about fixing this in a different manner, see http://www.ussg.iu.edu/hypermail/linux/kernel/0505.2/1068.html
Since this was in the days of 2.6.12-rc4 and modular input support is still broken, I suggest these symbols to be exported for now.
---
drivers/char/random.c | 2 ++ lib/kobject.c | 1 + 2 files changed, 3 insertions(+)
drivers/char/random.c +2 -0
@@ -647,6 +647,8 @@ (type << 4) ^ code ^ (code >> 4) ^ value); } +EXPORT_SYMBOL (add_input_randomness); +void add_interrupt_randomness (int irq) {if (irq >=NR_IRQS || irq_timer_state[irq] ==0 )
lib/kobject.c +1 -0
@@ -527,6 +527,7 @@EXPORT_SYMBOL (kobject_init);EXPORT_SYMBOL (kobject_register);EXPORT_SYMBOL (kobject_unregister); +EXPORT_SYMBOL (kobject_get_path);EXPORT_SYMBOL (kobject_get);EXPORT_SYMBOL (kobject_put);EXPORT_SYMBOL (kobject_add);
Signature · 2 lines
Martin Michlmayr http://www.cyrius.com/
Quoted 11 lines · Martin Michlmayr
Currently, modular input support fails to load with the following error:
qube:# modprobe input
input: Unknown symbolkobject_get_path
input: Unknown symboladd_input_randomnessIn the short run, this can be solved by exporting these two symbols. There have been discussions about fixing this in a different manner, see http://www.ussg.iu.edu/hypermail/linux/kernel/0505.2/1068.html
Since this was in the days of 2.6.12-rc4 and modular input support is still broken, I suggest these symbols to be exported for now.
better make these _GPL exports to make sure people understand these are internal things...
Quoted 11 lines · Martin Michlmayr
Currently, modular input support fails to load with the following error:
qube:# modprobe input
input: Unknown symbolkobject_get_path
input: Unknown symboladd_input_randomnessIn the short run, this can be solved by exporting these two symbols. There have been discussions about fixing this in a different manner, see http://www.ussg.iu.edu/hypermail/linux/kernel/0505.2/1068.html
Since this was in the days of 2.6.12-rc4 and modular input support is still broken, I suggest these symbols to be exported for now.
Is there actually any practical reason why you would want to make the input layer modular ?
Dave
Quoted 7 lines · Dave Jones
Quoted 6 lines · Martin Michlmayr
Currently, modular input support fails to load with the following error:
qube:# modprobe input
input: Unknown symbolkobject_get_path
input: Unknown symboladd_input_randomness
Quoted 8 lines
Quoted 5 lines
In the short run, this can be solved by exporting these two symbols. There have been discussions about fixing this in a different manner, see http://www.ussg.iu.edu/hypermail/linux/kernel/0505.2/1068.html
Since this was in the days of 2.6.12-rc4 and modular input support is still broken, I suggest these symbols to be exported for now.Is there actually any practical reason why you would want to make the input layer modular ?
More interesting question: is pis^H^H^Hsysfs interaction in there safe for modular code?
Dmitry Torokhov
maintainerQuoted 14 lines · Al Viro
Quoted 13 lines · Dave Jones
Quoted 11 lines · Martin Michlmayr
Currently, modular input support fails to load with the following error:
qube:# modprobe input
input: Unknown symbolkobject_get_path
input: Unknown symboladd_input_randomnessIn the short run, this can be solved by exporting these two symbols. There have been discussions about fixing this in a different manner, see http://www.ussg.iu.edu/hypermail/linux/kernel/0505.2/1068.html
Since this was in the days of 2.6.12-rc4 and modular input support is still broken, I suggest these symbols to be exported for now.
Quoted 5 lines
Quoted 2 lines
Is there actually any practical reason why you would want to make the input layer modular ?
More interesting question: is pis^H^H^Hsysfs interaction in there safe for modular code?
The core should be safe, at least I was trying to make it this way, so if you see something wrong - shout. Locking is another question though...
--
Dmitry
Quoted 6 lines · Dmitry Torokhov
Quoted 2 lines
More interesting question: is pis^H^H^Hsysfs interaction in there safe for modular code?
The core should be safe, at least I was trying to make it this way, so if you see something wrong - shout. Locking is another question though...
So do you want an updated patch using _GPL to export the symbols or to change CONFIG_INPUT to boolean?
Signature · 2 lines
Martin Michlmayr http://www.cyrius.com/
Quoted 10 lines · Martin Michlmayr
Quoted 6 lines · Dmitry Torokhov
Quoted 2 lines
More interesting question: is pis^H^H^Hsysfs interaction in there safe for modular code?
The core should be safe, at least I was trying to make it this way, so if you see something wrong - shout. Locking is another question though...
So do you want an updated patch using
_GPLto export the symbols or to changeCONFIG_INPUTto boolean?
I guess having input core as a module does not make much sense, so we should change CONFIG_INPUT to be boolean _and_ clean up the core code removing module unloading support.
Signature · 1 line
Dmitry
Quoted 9 lines · Dmitry Torokhov
Quoted 8 lines · Martin Michlmayr
Quoted 6 lines · Dmitry Torokhov
Quoted 2 lines
More interesting question: is pis^H^H^Hsysfs interaction in there safe for modular code?
The core should be safe, at least I was trying to make it this way, so if you see something wrong - shout. Locking is another question though...
Quoted 6 lines
Quoted 2 lines
So do you want an updated patch using
_GPLto export the symbols or to changeCONFIG_INPUTto boolean?I guess having input core as a module does not make much sense, so we should change
CONFIG_INPUTto be boolean _and_ clean up the core code removing module unloading support.
Well, USB or SCSI cores are also modules, so I think there is some point in having that functionality.
What were the required symbols?
Signature · 2 lines
Vojtech Pavlik SuSE Labs, SuSE CR
Quoted 4 lines · Vojtech Pavlik
Well, USB or SCSI cores are also modules, so I think there is some point in having that functionality.
What were the required symbols?
input: Unknown symbol kobject_get_path
input: Unknown symbol add_input_randomness
Signature · 2 lines
Martin Michlmayr http://www.cyrius.com/
Quoted 13 lines · Vojtech Pavlik
Quoted 12 lines · Dmitry Torokhov
Quoted 10 lines · Martin Michlmayr
Quoted 6 lines · Dmitry Torokhov
Quoted 2 lines
More interesting question: is pis^H^H^Hsysfs interaction in there safe for modular code?
The core should be safe, at least I was trying to make it this way, so if you see something wrong - shout. Locking is another question though...
So do you want an updated patch using
_GPLto export the symbols or to changeCONFIG_INPUTto boolean?
Quoted 7 lines
Quoted 3 lines
I guess having input core as a module does not make much sense, so we should change
CONFIG_INPUTto be boolean _and_ clean up the core code removing module unloading support.Well, USB or SCSI cores are also modules, so I think there is some point in having that functionality.
...
The difference is that USB and SCSI are not that essential, and therefore not always enabled if CONFIG_EMBEDDED=n. It's therefore e.g. not uncommon that distributions offer modular USB and SCSI cores.
Are there really people building kernels for that much space limited environments that they set CONFIG_EMBEDDED=y, and at the same time want CONFIG_INPUT=m?
I'd have expected people using CONFIG_EMBEDDED=y to usually also set CONFIG_MODULES=n for getting a smaller kernel.
Quoted 1 line
Vojtech Pavlik
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 4 lines
I guess having input core as a module does not make much sense, so we should change
CONFIG_INPUTto be boolean _and_ clean up the core code removing module unloading support.
Embedded devices with keyboard hotplugging?
Jan Engelhardt
PATCH 1/1 make INPUT a bool
In reply to Dmitry TorokhovQuoted 9 lines · Dmitry Torokhov
Quoted 8 lines · Martin Michlmayr
Quoted 6 lines · Dmitry Torokhov
Quoted 2 lines
More interesting question: is pis^H^H^Hsysfs interaction in there safe for modular code?
The core should be safe, at least I was trying to make it this way, so if you see something wrong - shout. Locking is another question though...
Quoted 6 lines
Quoted 2 lines
So do you want an updated patch using
_GPLto export the symbols or to changeCONFIG_INPUTto boolean?I guess having input core as a module does not make much sense, so we should change
CONFIG_INPUTto be boolean _and_ clean up the core code removing module unloading support.
Is the patch below what you were thinking of?
Quoted 1 line
Dmitry
cu
Adrian
<-- snip -->
Make INPUT a bool.
INPUT!=y is only possible if EMBEDDED=y, and in such cases it doesn't make that much sense to make it modular.
---
drivers/input/Kconfig | 2 +- drivers/input/input.c | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-)
drivers/input/Kconfig renamed from drivers/input/Kconfig.old +1 -1
@@ -5,7 +5,7 @@ menu "Input device support" config INPUT - tristate "Generic input layer (needed for keyboard, mouse, ...)" if EMBEDDED + bool "Generic input layer (needed for keyboard, mouse, ...)" if EMBEDDED default y ---help--- Say Y here if you have any input device (mouse, keyboard, tablet,
drivers/input/input.c renamed from drivers/input/input.c.old +0 -8
@@ -984,12 +984,4 @@return err; } -static void __exit input_exit(void) -{ -input_proc_exit (); -unregister_chrdev (INPUT_MAJOR ,"input" ); -class_unregister (&input_class); -} -subsys_initcall (input_init); -module_exit (input_exit);
Quoted 2 lines · Dave Jones
Is there actually any practical reason why you would want to make the input layer modular ?
Not really, but if it doesn't work as a module then Kbuild shouldn't allow you to configure it like that.
Signature · 2 lines
Martin Michlmayr http://www.cyrius.com/
Quoted 6 lines · Martin Michlmayr
Quoted 2 lines · Dave Jones
Is there actually any practical reason why you would want to make the input layer modular ?
Not really, but if it doesn't work as a module then
Kbuildshouldn't allow you to configure it like that.
That's the point I'm trying to make. If there's no good reason, it may as well be boolean.
Dave