* [PATCH] powerpc/pseries: in lmb_is_removable(), advance pfn if section is not present
@ 2020-01-10 4:54 Pingfan Liu
2020-01-29 5:17 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Pingfan Liu @ 2020-01-10 4:54 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Paul Mackerras, 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 <kernelfans@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
To: linuxppc-dev@lists.ozlabs.org
---
arch/powerpc/platforms/pseries/hotplug-memory.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
index c126b94..a4d40a3 100644
--- a/arch/powerpc/platforms/pseries/hotplug-memory.c
+++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
@@ -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;
--
2.7.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/pseries: in lmb_is_removable(), advance pfn if section is not present
2020-01-10 4:54 [PATCH] powerpc/pseries: in lmb_is_removable(), advance pfn if section is not present Pingfan Liu
@ 2020-01-29 5:17 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2020-01-29 5:17 UTC (permalink / raw)
To: Pingfan Liu, linuxppc-dev; +Cc: Paul Mackerras, Pingfan Liu
On Fri, 2020-01-10 at 04:54:02 UTC, Pingfan Liu wrote:
> 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 <kernelfans@gmail.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> To: linuxppc-dev@lists.ozlabs.org
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/fbee6ba2dca30d302efe6bddb3a886f5e964a257
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-29 6:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-10 4:54 [PATCH] powerpc/pseries: in lmb_is_removable(), advance pfn if section is not present Pingfan Liu
2020-01-29 5:17 ` Michael Ellerman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.