cpuidle: lpm-levels: Disable dynamic routing of interrupts

LPM driver routes rpm-smd and mpm interrupts dynamically to the core
that is going to wake up next. For some targets for power reasons
it is recommended to affine these interrupts always to specific cores.

Add option to disable dynamic routing of these interrupts inside LPM
driver.

Change-Id: Ice2059a61f5dd9daf734ff74c86babe3fe133ec0
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
This commit is contained in:
Venkat Devarasetty 2015-02-06 19:43:01 +05:30
parent 9267628939
commit abc3015db3
4 changed files with 9 additions and 3 deletions

View file

@ -71,6 +71,8 @@ Required properties:
sleep.
- qcom,last-level - When set, the cluster level is applied only when
there is 1 online core.
- qcom,disable-dynamic-int-routing: When set disables the dynamic
routing of rpm-smd and mpm interrupts to next wake up core.
[Node bindings for qcom,pm-cpu]
qcom,pm-cpu contains the low power modes that a cpu could enter. Currently it

View file

@ -441,6 +441,8 @@ static int parse_cluster_level(struct device_node *node,
}
level->notify_rpm = of_property_read_bool(node, "qcom,notify-rpm");
level->disable_dynamic_routing = of_property_read_bool(node,
"qcom,disable-dynamic-int-routing");
level->last_core_only = of_property_read_bool(node,
"qcom,last-core-only");

View file

@ -477,19 +477,20 @@ static int cluster_configure(struct lpm_cluster *cluster, int idx,
cpu_cluster_pm_enter(cluster->aff_level);
}
if (level->notify_rpm) {
struct cpumask nextcpu;
struct cpumask nextcpu, *cpumask;
uint32_t us;
us = get_cluster_sleep_time(cluster, &nextcpu, from_idle);
cpumask = level->disable_dynamic_routing ? NULL : &nextcpu;
ret = msm_rpm_enter_sleep(0, &nextcpu);
ret = msm_rpm_enter_sleep(0, cpumask);
if (ret) {
pr_info("Failed msm_rpm_enter_sleep() rc = %d\n", ret);
goto failed_set_mode;
}
do_div(us, USEC_PER_SEC/SCLK_HZ);
msm_mpm_enter_sleep((uint32_t)us, from_idle, &nextcpu);
msm_mpm_enter_sleep((uint32_t)us, from_idle, cpumask);
}
cluster->last_level = idx;
spin_unlock(&cluster->sync_lock);

View file

@ -55,6 +55,7 @@ struct lpm_cluster_level {
struct cpumask num_cpu_votes;
struct power_params pwr;
bool notify_rpm;
bool disable_dynamic_routing;
bool sync_level;
bool last_core_only;
struct lpm_level_avail available;