LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Non-SMP kernel modules for SMP kernel: Best practice? (http://www.linuxquestions.org/questions/slackware-14/non-smp-kernel-modules-for-smp-kernel-best-practice-693643/)

gargamel 12-29-2008 09:28 AM

Non-SMP kernel modules for SMP kernel: Best practice?
 
Hi all,

I have a question regarding kernel modules. I found that the
generic SMP kernel only looks in /lib/modules/2.6.27.7-smp.
This is obviously the correct behaviour, however, not all
the modules for non-SMP kernels are to be found there.

In my case, for a complete shutdown of my old laptop I need
the toshiba_acpi kernel module. This is not available in the
SMP kernel module tree, but I found it in the non-SMP kernel
module tree.

Question is now, what is the best way to make this module
available to my kernel?

I see various options.

(1) Copy the module to the SMP module tree
(2) Switch to non-SMP kernel, although the Slackware 12.2 docs
do explicitly NOT recommend this.

What would you recommend?

Thanks to all,

gargamel

Didier Spaier 12-29-2008 10:44 AM

On my system. (I run Slackware 12.2 with a generic-smp-2.6.27.7-smp kernel), there *is* a kernel module for toshiba_acpi :
Code:

bash-3.1$ ls -l /lib/modules/2.6.27.7/kernel/drivers/acpi/toshiba_acpi.ko
-rw-r--r-- 1 root root 8044 2008-11-21 06:02 /lib/modules/2.6.27.7/kernel/drivers/acpi/toshiba_acpi.ko

If I try to modprobe it, it fails, which is normal: my laptop is not a toshiba:
Code:

bash-3.1# modprobe toshiba_acpi
FATAL: Error inserting toshiba_acpi (/lib/modules/2.6.27.7-smp/kernel/drivers/acpi/toshiba_acpi.ko): No such device
bash-3.1#

But it should work for you, even if you use a huge-smp kernel: in this case too the driver is compiled as a module, as it should:
Code:

bash-3.1# grep ACPI_TOSHIBA /boot/config-huge-smp-2.6.27.7-smp
CONFIG_ACPI_TOSHIBA=m
bash-3.1#

So AFAIK all you have to do is uncomment the relevant line in /etc/rc.d/rc.modules-2.6.27-7-smp:
Code:

bash-3.1$ grep toshiba_acpi /etc/rc.d/rc.modules-2.6.27.7-smp
#/sbin/modprobe toshiba_acpi
bash-3.1$

Did I miss something ?

gargamel 12-29-2008 11:23 AM

Thanks, but I too have the module on my machine, in the same directory like you,
i. e. /lib/modules/2.6.27.7. My problem is, that the generic SMP kernel doesn't
look there, but only in /lib/modules/2.6.27.7-smp. Which doesn't have the module
toshiba_acpi.

And *this* is the main reason for your error message. You would get a different
response if modprobe would look in /lib/modules/2.6.27.7 instead of
/lib/modules/2.6.27.7-smp. The command wouldn't be able to successfully load
the module, but it would not simply tell you that the file or directory isn't
found.

So the module is there, it is just not found. And my question is, what is the
best way to make it visible/accessible for the generic SMP kernel, and if this
is a good idea, at all. Because there is probably a reason, why the ACPI stuff
is blacklisted for generic SMP kernels...

gargamel

gargamel

MS3FGX 12-29-2008 11:55 AM

Well you aren't going to be able to load the non-SMP kernel module into the SMP kernel, it will reject it because the builds are different. So you would either have to build the Toshiba modules for the SMP kernel, or switch to a non-SMP kernel.

But I think you are right to wonder why they are blacklisted in the first place. Certainly there is a reason, but I don't personally know what it is.

gargamel 12-29-2008 12:05 PM

Ok, thanks.

I'll have to see, what makes more sense.

(1) Switching to non-SMP kernel has the advantage that I wouldn't have to
compile and maintain anything, because I could rely on Slackware patches.
But the docs strongly recommend the SMP kernel.

(2) Compile the module. Need to figure out, what exactly to do, then maintain
it. Although this shouldn't be a big effort. I haven't seen a patch for
toshiba_acpi ever, so I would only have to recompile it, when a new kernel
comes out.

Thanks!

gargamel

Didier Spaier 12-29-2008 12:39 PM

Quote:

My problem is, that the generic SMP kernel doesn't
look there, but only in /lib/modules/2.6.27.7-smp. Which doesn't have the module
toshiba_acpi.
Sorry Gargamel you are wrong, this module is in *both* trees, even though I did the "ls -l" in the non-smp one by distraction :
Code:

bash-3.1$ locate toshiba_acpi.ko
/lib/modules/2.6.27.7-smp/kernel/drivers/acpi/toshiba_acpi.ko
/lib/modules/2.6.27.7/kernel/drivers/acpi/toshiba_acpi.ko
bash-3.1$


MS3FGX 12-29-2008 12:56 PM

I don't use any of the default Slackware kernels on my machines personally, but the package browser agrees with Didier.

gargamel 12-29-2008 01:07 PM

Quote:

Originally Posted by Didier Spaier (Post 3390562)
Sorry Gargamel you are wrong, this module is in *both* trees, [...]

You are right. I need new glasses. Thank you.

gargamel

gargamel 12-29-2008 01:47 PM

SOLVED!

I added "acpi=force" to /etc/lilo.conf:
Code:

append=" vt.default_utf8=1 acpi=force"
and
modified /etc/rc.d/rc.modules to
Code:

modprobe toshiba_acpi
.

The effect of the LILO append line is, that the ACPI daemon
is started when the system is booted. And once this daemon
runs, the toshiba_acpi module can be loaded without complaints
about missing devices.

So thanks all along and SORRY for the (i. e. my)
confusion!!!

gargamel

Didier Spaier 12-29-2008 02:13 PM

I'm happy it works now. Take care. :cool:


All times are GMT -5. The time now is 03:33 AM.