diff options
author | Scott Wood <scottwood@freescale.com> | 2013-03-20 20:06:12 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-06-20 02:55:10 -0400 |
commit | 39a421ff0b7cb056e687894a9d5f57aa1303e1c8 (patch) | |
tree | ede72853ac4ea78efe931da8076dddf4d8b31819 /arch/powerpc/mm | |
parent | 35fd219a268cc82cef842518cd64ea6949629ba2 (diff) |
powerpc/mm/nohash: Ignore NULL stale_map entries
This happens with threads that are offline due to CPU hotplug
(including threads that were never "plugged in" to begin with because
SMT is disabled).
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/mmu_context_nohash.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c index e779642c25e5..810f8e4d74d4 100644 --- a/arch/powerpc/mm/mmu_context_nohash.c +++ b/arch/powerpc/mm/mmu_context_nohash.c | |||
@@ -112,8 +112,10 @@ static unsigned int steal_context_smp(unsigned int id) | |||
112 | */ | 112 | */ |
113 | for_each_cpu(cpu, mm_cpumask(mm)) { | 113 | for_each_cpu(cpu, mm_cpumask(mm)) { |
114 | for (i = cpu_first_thread_sibling(cpu); | 114 | for (i = cpu_first_thread_sibling(cpu); |
115 | i <= cpu_last_thread_sibling(cpu); i++) | 115 | i <= cpu_last_thread_sibling(cpu); i++) { |
116 | __set_bit(id, stale_map[i]); | 116 | if (stale_map[i]) |
117 | __set_bit(id, stale_map[i]); | ||
118 | } | ||
117 | cpu = i - 1; | 119 | cpu = i - 1; |
118 | } | 120 | } |
119 | return id; | 121 | return id; |
@@ -272,7 +274,8 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next) | |||
272 | /* XXX This clear should ultimately be part of local_flush_tlb_mm */ | 274 | /* XXX This clear should ultimately be part of local_flush_tlb_mm */ |
273 | for (i = cpu_first_thread_sibling(cpu); | 275 | for (i = cpu_first_thread_sibling(cpu); |
274 | i <= cpu_last_thread_sibling(cpu); i++) { | 276 | i <= cpu_last_thread_sibling(cpu); i++) { |
275 | __clear_bit(id, stale_map[i]); | 277 | if (stale_map[i]) |
278 | __clear_bit(id, stale_map[i]); | ||
276 | } | 279 | } |
277 | } | 280 | } |
278 | 281 | ||