powerpc/pseries: in lmb_is_removable(), advance pfn if section is not present
PATCH 1/1 powerpc/pseries: in lmb_is_removable(), advance pfn if section is not present
In lmb_is_removable(), if a section is not present, it should continue to test the rest sections in the block. But the current code fails to do so.
Signed-off-by Pingfan Liu <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
--- arch/powerpc/platforms/pseries/hotplug-memory.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/powerpc/platforms/pseries/hotplug-memory.c +3 -1
@@ -360,8 +360,10 @@ static bool lmb_is_removable(struct drmem_lmb *lmb)for (i =0 ; i < scns_per_block; i++) { pfn =PFN_DOWN (phys_addr); -if (!pfn_present (pfn)) +if (!pfn_present (pfn)) { + phys_addr +=MIN_MEMORY_BLOCK_SIZE ;continue ; + } rc = rc &&is_mem_section_removable (pfn,PAGES_PER_SECTION ); phys_addr +=MIN_MEMORY_BLOCK_SIZE ;
Signature · 1 line
2.7.5
Michael Ellerman
AppliedQuoted 8 lines · Pingfan Liu
In
lmb_is_removable(), if a section is not present, it should continue to test the rest sections in the block. But the current code fails to do so.Signed-off-by Pingfan Liu <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Cc Michael Ellerman <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/fbee6ba2dca30d302efe6bddb3a886f5e964a257
cheers