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 Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux