diff options
| author | Venkata Rao Kakani <vkakani@codeaurora.org> | 2018-06-18 14:23:12 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-06-21 03:44:06 -0700 |
| commit | ebef173049eb8ba6c97ba0fa8367796bfafac420 (patch) | |
| tree | 22f7d72da4be58d5184da3ac12c9f3a13fec5b9e | |
| parent | 2386158c7be40e15d74aab3d18a54001047f0442 (diff) | |
ARM: memory hotplug: stop cpus while memory hotremove
Avoid page table corruptions during memory hotremove by
stopping all other cpus.
Change-Id: If4084768044dd95601bdc5993d14bc6b0a5921c3
Signed-off-by: Venkata Rao Kakani <vkakani@codeaurora.org>
| -rw-r--r-- | arch/arm64/mm/mmu.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index fc7a1c1e5d0f..24b0ed38ab7d 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -1037,7 +1037,11 @@ void remove_pagetable(unsigned long start, unsigned long end, bool direct) unsigned long addr; pgd_t *pgd; pud_t *pud; + int cpu; + for_each_possible_cpu(cpu) + if (current->cpu != cpu) + sched_isolate_cpu(cpu); for (addr = start; addr < end; addr = next) { next = pgd_addr_end(addr, end); @@ -1058,6 +1062,9 @@ void remove_pagetable(unsigned long start, unsigned long end, bool direct) } flush_tlb_all(); + for_each_possible_cpu(cpu) + if (current->cpu != cpu) + sched_unisolate_cpu_unlocked(cpu); } |
