LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 12-29-2008, 09:28 AM   #1
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,629

Rep: Reputation: 142Reputation: 142
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
 
Old 12-29-2008, 10:44 AM   #2
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad W520
Posts: 4,676

Rep: Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237
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 ?
 
Old 12-29-2008, 11:23 AM   #3
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,629

Original Poster
Rep: Reputation: 142Reputation: 142
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
 
Old 12-29-2008, 11:55 AM   #4
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
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.
 
Old 12-29-2008, 12:05 PM   #5
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,629

Original Poster
Rep: Reputation: 142Reputation: 142
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
 
Old 12-29-2008, 12:39 PM   #6
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad W520
Posts: 4,676

Rep: Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237
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$

Last edited by Didier Spaier; 12-29-2008 at 12:51 PM. Reason: Wrong paste of locate's output
 
Old 12-29-2008, 12:56 PM   #7
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
I don't use any of the default Slackware kernels on my machines personally, but the package browser agrees with Didier.
 
Old 12-29-2008, 01:07 PM   #8
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,629

Original Poster
Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by Didier Spaier View Post
Sorry Gargamel you are wrong, this module is in *both* trees, [...]
You are right. I need new glasses. Thank you.

gargamel
 
Old 12-29-2008, 01:47 PM   #9
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,629

Original Poster
Rep: Reputation: 142Reputation: 142
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
 
Old 12-29-2008, 02:13 PM   #10
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad W520
Posts: 4,676

Rep: Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237
I'm happy it works now. Take care.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
fatal error attempting to install /var/log/mount/slackware/a/kernel-modules-smp-2.6.2 v@ny@ Slackware - Installation 10 05-19-2010 02:40 AM
No kernel modules found for Linux 2.6.27.7-smp. w1k0 Slackware 11 12-23-2008 03:24 PM
SMP vs Non-SMP Kernel questions paulsiu Linux - Kernel 1 05-29-2007 04:58 PM
Hyperthread server goes to kernel panic with SMP kernic, boots ok with non SMP kernel abefroman Linux - Kernel 1 09-15-2006 06:43 PM
Any reason to keep a non-smp kernel installed on a smp FC3 machine? jim-j Fedora 2 03-12-2006 08:06 AM


All times are GMT -5. The time now is 05:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration