mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
99e98d3fb1
There are two reasons why CPU idle states may be disabled: either because the driver has disabled them or because they have been disabled by user space via sysfs. In the former case, the state's "disabled" flag is set once during the initialization of the driver and it is never cleared later (it is read-only effectively). In the latter case, the "disable" field of the given state's cpuidle_state_usage struct is set and it may be changed via sysfs. Thus checking whether or not an idle state has been disabled involves reading these two flags every time. In order to avoid the additional check of the state's "disabled" flag (which is effectively read-only anyway), use the value of it at the init time to set a (new) flag in the "disable" field of that state's cpuidle_state_usage structure and use the sysfs interface to manipulate another (new) flag in it. This way the state is disabled whenever the "disable" field of its cpuidle_state_usage structure is nonzero, whatever the reason, and it is the only place to look into to check whether or not the state has been disabled. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> |
||
---|---|---|
.. | ||
governors | ||
coupled.c | ||
cpuidle-arm.c | ||
cpuidle-at91.c | ||
cpuidle-big_little.c | ||
cpuidle-calxeda.c | ||
cpuidle-clps711x.c | ||
cpuidle-cps.c | ||
cpuidle-exynos.c | ||
cpuidle-haltpoll.c | ||
cpuidle-kirkwood.c | ||
cpuidle-mvebu-v7.c | ||
cpuidle-powernv.c | ||
cpuidle-psci.c | ||
cpuidle-pseries.c | ||
cpuidle-ux500.c | ||
cpuidle-zynq.c | ||
cpuidle.c | ||
cpuidle.h | ||
driver.c | ||
dt_idle_states.c | ||
dt_idle_states.h | ||
governor.c | ||
Kconfig | ||
Kconfig.arm | ||
Kconfig.mips | ||
Kconfig.powerpc | ||
Makefile | ||
poll_state.c | ||
sysfs.c |