powerpc/mm/altmap: Fix altmap boundary check
stable inclusion from stable-v5.10.190 commit fbb6657037d4d396a320b945e14c5db721bc1c3a category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I928UI Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fbb6657037d4d396a320b945e14c5db721bc1c3a -------------------------------- [ Upstream commit 6722b257 ] altmap->free includes the entire free space from which altmap blocks can be allocated. So when checking whether the kernel is doing altmap block free, compute the boundary correctly, otherwise memory hotunplug can fail. Fixes: 9ef34630 ("powerpc/mm: Fallback to RAM if the altmap is unusable") Signed-off-by:"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> Reviewed-by:
David Hildenbrand <david@redhat.com> Signed-off-by:
Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230724181320.471386-1-aneesh.kumar@linux.ibm.com Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment