Bug 9807

Summary: ACPI processor idle driver creates /proc/acpi/processor/*/power although C2 or C3 isn't supported
Product: ACPI Reporter: Yi Yang (yi.y.yang)
Component: Power-ProcessorAssignee: acpi_power-processor
Status: REJECTED DOCUMENTED    
Severity: normal CC: acpi-bugzilla, yi.y.yang
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.24-rc8 Subsystem:
Regression: --- Bisected commit-id:
Attachments: Fix patch for this bug

Description Yi Yang 2008-01-24 01:49:16 UTC
Latest working kernel version: None
Earliest failing kernel version: All
Distribution: FC8
Hardware Environment: All
Software Environment: All
Problem Description: ACPI processor idle driver makes sense only if the processor supports
C2 or C3. For legacy C0 and C1, just the original pm_idle is working
, statistics info about promotion, demotion, latency, usage and
duration are empty or 0, so these are misleading, users'll think their
CPUs support C states (C2 or C3), /proc/acpi/processor/CPU*/power
shouldn't exist for this case at all.

Steps to reproduce: 

[root@localhost ~]# dmesg | grep power
[root@localhost ~]# cat /proc/acpi/processor/CPU0/info
processor id:            0
acpi id:                 1
bus mastering control:   yes
power management:        no
throttling control:      yes
limit interface:         yes
[root@localhost ~]# cat /proc/acpi/processor/CPU0/power
active state:            C0
max_cstate:              C8
bus master activity:     00000000
maximum allowed latency: 2000 usec
states:
    C1:                  type[C1] promotion[--] demotion[--] latency[000] usage[00000000] duration[00000000000000000000]
Comment 1 Yi Yang 2008-01-24 01:50:59 UTC
Created attachment 14556 [details]
Fix patch for this bug

This patch fixes this issue, it make ACPI processor idle driver to create
proc entry only if the processor supports C2 or C3.
Comment 2 Len Brown 2008-01-28 17:28:59 UTC
It is not a bug that the power file exists for systems with just C1.
It is a bug that the C1 count does not increment on such systems --
a bug that venki is planning to fix the the benefit of powertop users.