Commit 005f7ea6 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Greg Kroah-Hartman

powerpc/64s/radix: Fix memory hot-unplug page table split

[ Upstream commit 31f210cf ]

create_physical_mapping expects physical addresses, but splitting
these mapping on hot unplug is supplying virtual (effective)
addresses.

Fixes: 4dd5f8a9 ("powerpc/mm/radix: Split linear mapping on hot-unplug")
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Reviewed-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190724084638.24982-2-npiggin@gmail.comSigned-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6db0e28b
......@@ -717,8 +717,8 @@ static int __meminit stop_machine_change_mapping(void *data)
spin_unlock(&init_mm.page_table_lock);
pte_clear(&init_mm, params->aligned_start, params->pte);
create_physical_mapping(params->aligned_start, params->start, -1);
create_physical_mapping(params->end, params->aligned_end, -1);
create_physical_mapping(__pa(params->aligned_start), __pa(params->start), -1);
create_physical_mapping(__pa(params->end), __pa(params->aligned_end), -1);
spin_lock(&init_mm.page_table_lock);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment