Bug 647677

Summary: i8k module still uses asm()
Product: [Fedora] Fedora Reporter: Steven Haigh <netwiz>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 14CC: dougsland, gansalmon, itamar, jonathan, kernel-maint, kmcmartin, madhu.chinakonda
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-23 14:48:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
convert asm() to asm volatile() none

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.