aboutsummaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2012-10-12 13:45:35 +0100
committerJon Medhurst <tixy@linaro.org>2013-07-17 11:12:26 +0100
commit362036513b1dff299b2035d5b928a203742b98d7 (patch)
treefb940630236f9c9a7a40146a0b91641c66b1568c /arch/arm
parent1b8ae251638844173bd04a4c9e543581f3d92fbd (diff)
ARM: sched: Avoid empty 'slow' HMP domain
On homogeneous (non-heterogeneous) systems all CPUs will be declared 'fast' and the slow cpu list will be empty. In this situation we need to avoid adding an empty slow HMP domain otherwise the scheduler code will blow up when it attempts to move a task to the slow domain. Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/kernel/topology.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
index 627e14e44af5..0d406ff2e5b6 100644
--- a/arch/arm/kernel/topology.c
+++ b/arch/arm/kernel/topology.c
@@ -368,10 +368,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);