The historical commit d949f36f1865c60239d4 ("x86: Fix hwpoison code related build failure on 32-bit NUMAQ"), disabled x86_32's memory-failure when SPARSEMEM is enabled, because the number of page-flags are insufficient. The commit 09022bc196d23484a7a5 ("mm: remove PG_error") removes a page flag, so memory-failure can now be enable now. Signed-off-by: Xie Yuanbin --- arch/x86/Kconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index d55c01efd7c2..f9ee57a55500 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -750,13 +750,10 @@ config IOSF_MBI_DEBUG config X86_SUPPORTS_MEMORY_FAILURE def_bool y # MCE code calls memory_failure(): depends on X86_MCE - # On 32-bit this adds too big of NODES_SHIFT and we run out of page flags: - # On 32-bit SPARSEMEM adds too big of SECTIONS_WIDTH: - depends on X86_64 || !SPARSEMEM select ARCH_SUPPORTS_MEMORY_FAILURE config X86_32_IRIS tristate "Eurobraille/Iris poweroff module" depends on X86_32 -- 2.51.0 The commit 97f0b13452198290799f ("tracing: add trace event for memory-failure") introduces the selection of RAS in memory-failure. This commit is just a tracing feature; in reality, there is no dependency between memory-failure and RAS. RAS increases the size of the bzImage image by 8k, which is very valuable for embedded devices. Signed-off-by: Xie Yuanbin --- mm/Kconfig | 1 - mm/memory-failure.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/Kconfig b/mm/Kconfig index a5a90b169435..c3a8e0ba1ac1 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -738,11 +738,10 @@ config ARCH_SUPPORTS_MEMORY_FAILURE config MEMORY_FAILURE depends on MMU depends on ARCH_SUPPORTS_MEMORY_FAILURE bool "Enable recovery from hardware memory errors" - select RAS help Enables code to recover from some memory failures on systems with MCA recovery. This allows a system to continue running even when some of its memory has uncorrected errors. This requires special hardware support and typically ECC memory. diff --git a/mm/memory-failure.c b/mm/memory-failure.c index f698df156bf8..baf2bd79b2fb 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1276,11 +1276,13 @@ static void update_per_node_mf_stats(unsigned long pfn, * setting PG_dirty outside page lock. See also comment above set_page_dirty(). */ static int action_result(unsigned long pfn, enum mf_action_page_type type, enum mf_result result) { +#ifdef CONFIG_RAS trace_memory_failure_event(pfn, type, result); +#endif if (type != MF_MSG_ALREADY_POISONED) { num_poisoned_pages_inc(pfn); update_per_node_mf_stats(pfn, result); } -- 2.51.0