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

Commit 75c1d539 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt
Browse files

powerpc: Fix CONFIG_DEBUG_PAGEALLOC on 603/e300



So we tried to speed things up a bit using flush_hash_pages() directly
but that falls over on 603 of course meaning we fail to flush the TLB
properly and we may even end up having it corrupt memory randomly by
accessing a hash table that doesn't exist.

This removes the "optimization" by always going through flush_tlb_page()
for now at least.

Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent aef40e87
Loading
Loading
Loading
Loading
+0 −4
Original line number Original line Diff line number Diff line
@@ -393,11 +393,7 @@ static int __change_page_attr(struct page *page, pgprot_t prot)
		return -EINVAL;
		return -EINVAL;
	__set_pte_at(&init_mm, address, kpte, mk_pte(page, prot), 0);
	__set_pte_at(&init_mm, address, kpte, mk_pte(page, prot), 0);
	wmb();
	wmb();
#ifdef CONFIG_PPC_STD_MMU
	flush_hash_pages(0, address, pmd_val(*kpmd), 1);
#else
	flush_tlb_page(NULL, address);
	flush_tlb_page(NULL, address);
#endif
	pte_unmap(kpte);
	pte_unmap(kpte);


	return 0;
	return 0;