aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2012-10-12 20:52:06 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2012-10-12 20:52:06 +0530
commit8ebbceb071c40f0ea667878a96779deb1f36c746 (patch)
tree40ca9cd2f9733036e0113824e1927e8e24a32acd
parent2027d925f44d49835beff1b4917d8fd91f8805d7 (diff)
parente2d8c1f52f5e3174c7c05332901e6f524c79ac1e (diff)
downloadlinaro-lsk-8ebbceb071c40f0ea667878a96779deb1f36c746.tar.gz
Merge branch 'task-placement-v2' into big-LITTLE-MP-v10big-LITTLE-MP-v10
This merge adds two fixup patches from tixy & morten on task-placement-v2 branch.
-rw-r--r--arch/arm/kernel/topology.c10
-rw-r--r--kernel/sched/fair.c5
2 files changed, 10 insertions, 5 deletions
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
index 58dac7a80e5..0b512331c0f 100644
--- a/arch/arm/kernel/topology.c
+++ b/arch/arm/kernel/topology.c
@@ -396,10 +396,12 @@ void __init arch_get_hmp_domains(struct list_head *hmp_domains_list)
* Must be ordered with respect to compute capacity.
* Fastest domain at head of list.
*/
- domain = (struct hmp_domain *)
- kmalloc(sizeof(struct hmp_domain), GFP_KERNEL);
- cpumask_copy(&domain->cpus, &hmp_slow_cpu_mask);
- list_add(&domain->hmp_domains, hmp_domains_list);
+ if(!cpumask_empty(&hmp_slow_cpu_mask)) {
+ domain = (struct hmp_domain *)
+ kmalloc(sizeof(struct hmp_domain), GFP_KERNEL);
+ cpumask_copy(&domain->cpus, &hmp_slow_cpu_mask);
+ list_add(&domain->hmp_domains, hmp_domains_list);
+ }
domain = (struct hmp_domain *)
kmalloc(sizeof(struct hmp_domain), GFP_KERNEL);
cpumask_copy(&domain->cpus, &hmp_fast_cpu_mask);
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index e9dd53cedc7..970026bda81 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5587,8 +5587,11 @@ static unsigned int hmp_down_migration(int cpu, struct sched_entity *se)
#ifdef CONFIG_SCHED_HMP_PRIO_FILTER
/* Filter by task priority */
- if (p->prio >= hmp_up_prio)
+ if ((p->prio >= hmp_up_prio) &&
+ cpumask_intersects(&hmp_slower_domain(cpu)->cpus,
+ tsk_cpus_allowed(p))) {
return 1;
+ }
#endif
/* Let the task load settle before doing another down migration */