[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201108083732.15336-1-song.bao.hua@hisilicon.com>
Date: Sun, 8 Nov 2020 21:37:32 +1300
From: Barry Song <song.bao.hua@...ilicon.com>
To: <akpm@...ux-foundation.org>, <linux-mm@...ck.org>,
<linux-kernel@...r.kernel.org>
CC: <linuxarm@...wei.com>, Barry Song <song.bao.hua@...ilicon.com>,
"John Hubbard" <jhubbard@...dia.com>,
Ralph Campbell <rcampbell@...dia.com>,
"Randy Dunlap" <rdunlap@...radead.org>,
John Garry <john.garry@...wei.com>
Subject: [PATCH v2] mm/gup_test: GUP_TEST depends on DEBUG_FS
Without DEBUG_FS, all the code in gup_test becomes meaningless. For sure
kernel provides debugfs stub while DEBUG_FS is disabled, but the point
here is that GUP_TEST can do nothing without DEBUG_FS.
Cc: John Hubbard <jhubbard@...dia.com>
Cc: Ralph Campbell <rcampbell@...dia.com>
Cc: Randy Dunlap <rdunlap@...radead.org>
Suggested-by: John Garry <john.garry@...wei.com>
Signed-off-by: Barry Song <song.bao.hua@...ilicon.com>
---
-v2:
add comment as a prompt to users as commented by John and Randy, thanks!
mm/Kconfig | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mm/Kconfig b/mm/Kconfig
index 01b0ae0cd9d3..a7ff0d31afd5 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -836,6 +836,7 @@ config PERCPU_STATS
config GUP_TEST
bool "Enable infrastructure for get_user_pages()-related unit tests"
+ depends on DEBUG_FS
help
Provides /sys/kernel/debug/gup_test, which in turn provides a way
to make ioctl calls that can launch kernel-based unit tests for
@@ -853,6 +854,9 @@ config GUP_TEST
See tools/testing/selftests/vm/gup_test.c
+comment "GUP_TEST needs to have DEBUG_FS enabled"
+ depends on !GUP_TEST && !DEBUG_FS
+
config GUP_GET_PTE_LOW_HIGH
bool
--
2.25.1
Powered by blists - more mailing lists