Merge branch 'pm-cpuidle'
* pm-cpuidle: cpuidle: Remove time measurement in poll state cpuidle: Remove manual selection of the multiple driver support cpuidle: ladder governor - use macro instead of hardcoded value cpuidle: big_little: Fix build error cpuidle: menu governor - remove unused macro STDDEV_THRESH cpuidle: fix permission for driver name sysfs node cpuidle: move idle traces to cpuidle_enter_state()
This commit is contained in:
commit
eada238f48
|
@ -15,12 +15,7 @@ config CPU_IDLE
|
||||||
if CPU_IDLE
|
if CPU_IDLE
|
||||||
|
|
||||||
config CPU_IDLE_MULTIPLE_DRIVERS
|
config CPU_IDLE_MULTIPLE_DRIVERS
|
||||||
bool "Support multiple cpuidle drivers"
|
bool
|
||||||
default n
|
|
||||||
help
|
|
||||||
Allows the cpuidle framework to use different drivers for each CPU.
|
|
||||||
This is useful if you have a system with different CPU latencies and
|
|
||||||
states. If unsure say N.
|
|
||||||
|
|
||||||
config CPU_IDLE_GOV_LADDER
|
config CPU_IDLE_GOV_LADDER
|
||||||
bool "Ladder governor (for periodic timer tick)"
|
bool "Ladder governor (for periodic timer tick)"
|
||||||
|
|
|
@ -10,6 +10,7 @@ config ARM_ARMADA_370_XP_CPUIDLE
|
||||||
config ARM_BIG_LITTLE_CPUIDLE
|
config ARM_BIG_LITTLE_CPUIDLE
|
||||||
bool "Support for ARM big.LITTLE processors"
|
bool "Support for ARM big.LITTLE processors"
|
||||||
depends on ARCH_VEXPRESS_TC2_PM
|
depends on ARCH_VEXPRESS_TC2_PM
|
||||||
|
depends on MCPM
|
||||||
select ARM_CPU_SUSPEND
|
select ARM_CPU_SUSPEND
|
||||||
select CPU_IDLE_MULTIPLE_DRIVERS
|
select CPU_IDLE_MULTIPLE_DRIVERS
|
||||||
help
|
help
|
||||||
|
|
|
@ -119,11 +119,13 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
|
||||||
ktime_t time_start, time_end;
|
ktime_t time_start, time_end;
|
||||||
s64 diff;
|
s64 diff;
|
||||||
|
|
||||||
|
trace_cpu_idle_rcuidle(index, dev->cpu);
|
||||||
time_start = ktime_get();
|
time_start = ktime_get();
|
||||||
|
|
||||||
entered_state = target_state->enter(dev, drv, index);
|
entered_state = target_state->enter(dev, drv, index);
|
||||||
|
|
||||||
time_end = ktime_get();
|
time_end = ktime_get();
|
||||||
|
trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu);
|
||||||
|
|
||||||
if (!cpuidle_state_is_coupled(dev, drv, entered_state))
|
if (!cpuidle_state_is_coupled(dev, drv, entered_state))
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
|
|
|
@ -182,10 +182,6 @@ static void __cpuidle_driver_init(struct cpuidle_driver *drv)
|
||||||
static int poll_idle(struct cpuidle_device *dev,
|
static int poll_idle(struct cpuidle_device *dev,
|
||||||
struct cpuidle_driver *drv, int index)
|
struct cpuidle_driver *drv, int index)
|
||||||
{
|
{
|
||||||
ktime_t t1, t2;
|
|
||||||
s64 diff;
|
|
||||||
|
|
||||||
t1 = ktime_get();
|
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
if (!current_set_polling_and_test()) {
|
if (!current_set_polling_and_test()) {
|
||||||
while (!need_resched())
|
while (!need_resched())
|
||||||
|
@ -193,13 +189,6 @@ static int poll_idle(struct cpuidle_device *dev,
|
||||||
}
|
}
|
||||||
current_clr_polling();
|
current_clr_polling();
|
||||||
|
|
||||||
t2 = ktime_get();
|
|
||||||
diff = ktime_to_us(ktime_sub(t2, t1));
|
|
||||||
if (diff > INT_MAX)
|
|
||||||
diff = INT_MAX;
|
|
||||||
|
|
||||||
dev->last_residency = (int) diff;
|
|
||||||
|
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ static int ladder_enable_device(struct cpuidle_driver *drv,
|
||||||
|
|
||||||
ldev->last_state_idx = CPUIDLE_DRIVER_STATE_START;
|
ldev->last_state_idx = CPUIDLE_DRIVER_STATE_START;
|
||||||
|
|
||||||
for (i = 0; i < drv->state_count; i++) {
|
for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++) {
|
||||||
state = &drv->states[i];
|
state = &drv->states[i];
|
||||||
lstate = &ldev->states[i];
|
lstate = &ldev->states[i];
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ static int ladder_enable_device(struct cpuidle_driver *drv,
|
||||||
|
|
||||||
if (i < drv->state_count - 1)
|
if (i < drv->state_count - 1)
|
||||||
lstate->threshold.promotion_time = state->exit_latency;
|
lstate->threshold.promotion_time = state->exit_latency;
|
||||||
if (i > 0)
|
if (i > CPUIDLE_DRIVER_STATE_START)
|
||||||
lstate->threshold.demotion_time = state->exit_latency;
|
lstate->threshold.demotion_time = state->exit_latency;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
#define RESOLUTION 1024
|
#define RESOLUTION 1024
|
||||||
#define DECAY 8
|
#define DECAY 8
|
||||||
#define MAX_INTERESTING 50000
|
#define MAX_INTERESTING 50000
|
||||||
#define STDDEV_THRESH 400
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -445,7 +445,7 @@ static void cpuidle_remove_state_sysfs(struct cpuidle_device *device)
|
||||||
|
|
||||||
#define define_one_driver_ro(_name, show) \
|
#define define_one_driver_ro(_name, show) \
|
||||||
static struct cpuidle_driver_attr attr_driver_##_name = \
|
static struct cpuidle_driver_attr attr_driver_##_name = \
|
||||||
__ATTR(_name, 0644, show, NULL)
|
__ATTR(_name, 0444, show, NULL)
|
||||||
|
|
||||||
struct cpuidle_driver_kobj {
|
struct cpuidle_driver_kobj {
|
||||||
struct cpuidle_driver *drv;
|
struct cpuidle_driver *drv;
|
||||||
|
|
|
@ -147,8 +147,6 @@ use_default:
|
||||||
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu))
|
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu))
|
||||||
goto use_default;
|
goto use_default;
|
||||||
|
|
||||||
trace_cpu_idle_rcuidle(next_state, dev->cpu);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enter the idle state previously returned by the governor decision.
|
* Enter the idle state previously returned by the governor decision.
|
||||||
* This function will block until an interrupt occurs and will take
|
* This function will block until an interrupt occurs and will take
|
||||||
|
@ -156,8 +154,6 @@ use_default:
|
||||||
*/
|
*/
|
||||||
entered_state = cpuidle_enter(drv, dev, next_state);
|
entered_state = cpuidle_enter(drv, dev, next_state);
|
||||||
|
|
||||||
trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu);
|
|
||||||
|
|
||||||
if (broadcast)
|
if (broadcast)
|
||||||
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu);
|
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue