Re: [PATCH] mm: memtest: convert to memtest_report_meminfo()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2023/8/8 9:11, Matthew Wilcox wrote:
On Tue, Aug 08, 2023 at 09:21:56AM +0800, Kefeng Wang wrote:
@@ -117,3 +118,17 @@ void __init early_memtest(phys_addr_t start, phys_addr_t end)
  		do_one_pass(patterns[idx], start, end);
  	}
  }
+
+void memtest_report_meminfo(struct seq_file *m)
+{
+	unsigned long early_memtest_bad_size_kb;

  if (!IS_ENABLED(CONFIG_PROC_FS))
          return;

+
+	if (!early_memtest_done)
+		return;
+
+	early_memtest_bad_size_kb = early_memtest_bad_size >> 10;
+	if (early_memtest_bad_size && !early_memtest_bad_size_kb)
+		early_memtest_bad_size_kb = 1;
+	/* When 0 is reported, it means there actually was a successful test */
+	seq_printf(m, "EarlyMemtestBad:   %5lu kB\n", early_memtest_bad_size_kb);
+}

Doesn't this function need to be under CONFIG_PROC_FS ?

Thanks for reminder, will add above check to eliminate code by compiler





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux