Bug 10654

Summary: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed gets BUG on Transmeta Crusoe CPU
Product: Power Management Reporter: CHIKAMA Masaki (masaki.chikama)
Component: cpufreqAssignee: cpufreq (cpufreq)
Status: CLOSED CODE_FIX    
Severity: normal CC: akpm, lenb
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.25 Subsystem:
Regression: No Bisected commit-id:

Description CHIKAMA Masaki 2008-05-08 19:22:44 UTC
Latest working kernel version: 2.6.24
Distribution: Fedora 9(rawhide)

Problem Description:

Reading from /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
gets BUG() on Transmeta CPU.
See https://bugzilla.redhat.com/show_bug.cgi?id=443354 for more info.
Comment 1 Andrew Morton 2008-05-09 00:08:46 UTC
Masaki Chikama has proposed a patch there.  Did you try it?
Comment 2 Andrew Morton 2008-05-09 00:09:55 UTC
Oh. that's you ;)

Please email the patch as per Documentation/SubmittingPatches to

Andrew Morton <akpm@linux-foundation.org>
cpufreq@www.linux.org.uk
Dave Jones <davej@codemonkey.org.uk>

Thanks.
Comment 3 Thomas Renninger 2008-05-09 05:13:42 UTC
The p4-clockmod must not be used, take the throttling interface exposed through drivers/acpi/processor_throttling.c
instead.

I hope it finally gets removed from the kernel, here a quote from the cpufreq list a while ago (Subject: Celeron 220):
-----------
DaveJ shut it off in the Fedora kernels a while ago now, and only a few people 
have even noticed, and most understood that it was for the best...
-----------
Comment 4 Dominik Brodowski 2008-05-28 06:15:43 UTC
Masaki Chikama: your patch at redhat's bugzilla seems to be the proper fix. Could you submit it to the cpufreq mailing list, please?

@Thomas: this is not p4-clockmod.
Comment 5 Andrew Morton 2008-05-28 12:07:20 UTC
I already have this patch in -mm, as cpufreq-fix-null-object-access-on-transmeta-cpu.patch
It has been sent to davej once but he is asleep.  I'll merge it up.

I'll add your acked-by to the patch and I'll close this report, thanks.
Comment 6 Len Brown 2011-07-30 05:44:38 UTC
closed by:

commit 879000f94442860e72c934f9e568989bc7fb8ec4
Author: CHIKAMA masaki <masaki.chikama@gmail.com>
Date:   Thu Jun 5 22:46:33 2008 -0700

    cpufreq: fix null object access on Transmeta CPU
    
    If cpu specific cpufreq driver(i.e.  longrun) has "setpolicy" function,
    governor object isn't set into cpufreq_policy object at "__cpufreq_set_policy"
    function in driver/cpufreq/cpufreq.c .
    
    This causes a null object access at "store_scaling_setspeed" and
    "show_scaling_setspeed" function in driver/cpufreq/cpufreq.c when reading or
    writing through /sys interface (ex.  cat
    /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed)
    
    Addresses:
        http://bugzilla.kernel.org/show_bug.cgi?id=10654
        https://bugzilla.redhat.com/show_bug.cgi?id=443354
    
    Signed-off-by: CHIKAMA Masaki <masaki.chikama@gmail.com>
    Cc: Dave Jones <davej@codemonkey.org.uk>
    Cc: Chuck Ebbert <cebbert@redhat.com>
    Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
    Cc: <stable@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>