* [to-be-updated] mm-hwpoison-introduce-per-memory_block-hwpoison-counter-fix.patch removed from -mm tree
@ 2022-09-28 14:42 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-09-28 14:42 UTC (permalink / raw)
To: mm-commits, lkp, naoya.horiguchi, akpm
The quilt patch titled
Subject: mm-hwpoison-introduce-per-memory_block-hwpoison-counter-fix
has been removed from the -mm tree. Its filename was
mm-hwpoison-introduce-per-memory_block-hwpoison-counter-fix.patch
This patch was dropped because an updated version will be merged
------------------------------------------------------
From: Naoya Horiguchi <naoya.horiguchi@linux.dev>
Subject: mm-hwpoison-introduce-per-memory_block-hwpoison-counter-fix
Date: Fri, 23 Sep 2022 17:18:27 +0900
>
> All errors (new ones prefixed by >>):
>
> drivers/base/memory.c: In function 'memory_block_online':
> >> drivers/base/memory.c:186:34: error: 'struct memory_block' has no member named 'nr_hwpoison'
> 186 | if (atomic_long_read(&mem->nr_hwpoison))
> | ^~
> drivers/base/memory.c: In function 'remove_memory_block_devices':
> drivers/base/memory.c:870:61: error: 'struct memory_block' has no member named 'nr_hwpoison'
> 870 | clear_hwpoisoned_pages(atomic_long_read(&mem->nr_hwpoison));
> | ^~
>
I should've used the accessor memblk_nr_poison() to acccess to
->nr_hwpoison.
Link: https://lkml.kernel.org/r/20220923081827.GA1357512@ik1-406-35019.vs.sakura.ne.jp
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/base/memory.c | 9 +++++++--
include/linux/mm.h | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)
--- a/drivers/base/memory.c~mm-hwpoison-introduce-per-memory_block-hwpoison-counter-fix
+++ a/drivers/base/memory.c
@@ -183,7 +183,7 @@ static int memory_block_online(struct me
struct zone *zone;
int ret;
- if (atomic_long_read(&mem->nr_hwpoison))
+ if (memblk_nr_poison(start_pfn))
return -EHWPOISON;
zone = zone_for_pfn_range(mem->online_type, mem->nid, mem->group,
@@ -867,7 +867,7 @@ void remove_memory_block_devices(unsigne
mem = find_memory_block_by_id(block_id);
if (WARN_ON_ONCE(!mem))
continue;
- clear_hwpoisoned_pages(atomic_long_read(&mem->nr_hwpoison));
+ clear_hwpoisoned_pages(memblk_nr_poison(start));
unregister_memory_block_under_nodes(mem);
remove_memory_block(mem);
}
@@ -1199,4 +1199,9 @@ unsigned long memblk_nr_poison(unsigned
return 0;
}
+#else
+unsigned long memblk_nr_poison(unsigned long pfn)
+{
+ return 0;
+}
#endif
--- a/include/linux/mm.h~mm-hwpoison-introduce-per-memory_block-hwpoison-counter-fix
+++ a/include/linux/mm.h
@@ -3282,7 +3282,6 @@ extern int __get_huge_page_for_hwpoison(
extern void num_poisoned_pages_inc(unsigned long pfn);
extern void memblk_nr_poison_inc(unsigned long pfn);
extern void memblk_nr_poison_sub(unsigned long pfn, long i);
-extern unsigned long memblk_nr_poison(unsigned long pfn);
extern void clear_hwpoisoned_pages(long nr_poison);
#else
static inline int __get_huge_page_for_hwpoison(unsigned long pfn, int flags)
@@ -3298,6 +3297,7 @@ static inline void clear_hwpoisoned_page
{
}
#endif
+extern unsigned long memblk_nr_poison(unsigned long pfn);
#ifndef arch_memory_failure
static inline int arch_memory_failure(unsigned long pfn, int flags)
_
Patches currently in -mm which might be from naoya.horiguchi@linux.dev are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-28 14:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-28 14:42 [to-be-updated] mm-hwpoison-introduce-per-memory_block-hwpoison-counter-fix.patch removed from -mm tree Andrew Morton
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.