Bug 647677 - i8k module still uses asm()
Summary: i8k module still uses asm()
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 14
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-29 05:17 UTC by Steven Haigh
Modified: 2010-12-05 00:42 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-11-23 14:48:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
convert asm() to asm volatile() (580 bytes, patch)
2010-10-29 05:17 UTC, Steven Haigh
no flags Details | Diff

Description Steven Haigh 2010-10-29 05:17:16 UTC
Created attachment 456381 [details]
convert asm() to asm volatile()

Description of problem:
i8k still seems to use asm() for its calls. Under newer gcc versions, this seems to get optimised out. To prevent this, it should be called as: asm volatile().

Without it, the output of /proc/i8k is useless. It also shows in the loading of the i8k module:

[   30.519132] i8k: unable to get SMM Dell signature
[   30.519206] i8k: unable to get SMM BIOS version
[   30.519223] Dell laptop SMM driver v1.14 21/02/2005 Massimo Dal Zotto (dz)


Version-Release number of selected component (if applicable):
kernel-2.6.35.6-46.fc14.i686

The attached patch changes the two asm() calls to asm volatile() calls.

Comment 1 Steven Haigh 2010-10-29 05:22:00 UTC
Further information on this can be obtained here:
https://bbs.archlinux.org/viewtopic.php?pid=780692#p780692

I haven't tested this patch as yet - as my knowledge of how to build kernels the fedora way is very lacking. I would be more than happy to test this if someone can build me an rpm for it.

Comment 2 Kyle McMartin 2010-10-31 23:31:45 UTC
Thanks, I'll look at this and build you a test kernel tonight.

Comment 3 Kyle McMartin 2010-10-31 23:58:26 UTC
http://koji.fedoraproject.org/koji/taskinfo?taskID=2568002

F-14 scratch build here.

Also, I noticed there was a thread on lkml, so I replied with your info an CC'd the upstream author. Hopefully he'll pick up the patch. (http://lkml.org/lkml/2010/10/31/128)


--Kyle

Comment 4 Kyle McMartin 2010-11-01 00:04:48 UTC
http://koji.fedoraproject.org/koji/taskinfo?taskID=2568014

Woops, didn't notice the patch was relative to ./ so the build failed, give this one a try. (I'd have just built it locally, but I see you're on i686 and I don't have mock setup to build...)

Comment 5 Steven Haigh 2010-11-01 01:40:48 UTC
Thanks Kyle,

I'll give this a whirl as soon as I get some time in front of that machine. Should be 12-24 hours at most.

Comment 6 Steven Haigh 2010-11-01 07:15:44 UTC
I now get the following in dmesg:

[   27.848372] i8k: unable to get SMM BIOS version
[   27.848392] Dell laptop SMM driver v1.14 21/02/2005 Massimo Dal Zotto (dz)

/proc/i8k now has sane values, fan speed reporting works ok, as does temperature readings.

I would consider this to be fixed using this test kernel.

Comment 7 Kyle McMartin 2010-11-01 19:56:25 UTC
http://kyle.fedorapeople.org/kernel/2.6.35.6-49.2.bz647677.fc14/i686/

Can you try the kernel here? It should print out a line around there telling us why it can't get the SMM BIOS version, please paste that here. I think there's either a high bit set (so it's negative) or that call just plain fails, in which case the message is expected.

I'll queue up that fix for the releases.

--Kyle

Comment 8 Steven Haigh 2010-11-01 21:32:12 UTC
Ahhh - Right you are:

# uname -a
Linux dell8600 2.6.35.6-49.2.bz647677.fc14.i686 #1 SMP Mon Nov 1 14:58:04 EDT 2010 i686 i686 i386 GNU/Linux

[   28.580881] i8k: couldn't retrieve smm bios version (ret = -22)
[   28.580885] i8k: unable to get SMM BIOS version
[   28.580902] Dell laptop SMM driver v1.14 21/02/2005 Massimo Dal Zotto (dz)

Comment 9 Kyle McMartin 2010-11-02 02:01:42 UTC
Ah, that's -EINVAL. I guess that call isn't supported on your BIOS. :/

Ok, cool, thanks for testing that!

Comment 10 Kyle McMartin 2010-11-23 14:47:58 UTC
Sorry, I missed committing this after you tested it. Committed now to F14.

Comment 11 Fedora Update System 2010-12-03 15:38:37 UTC
kernel-2.6.35.9-64.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/kernel-2.6.35.9-64.fc14

Comment 12 Fedora Update System 2010-12-05 00:42:41 UTC
kernel-2.6.35.9-64.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.