Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebef1730 authored by Venkata Rao Kakani's avatar Venkata Rao Kakani Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarVenkata Rao Kakani <vkakani@codeaurora.org>
parent 2386158c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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);
}