diff mbox series

[v2] mm/gup_test: GUP_TEST depends on DEBUG_FS

Message ID 20201108083732.15336-1-song.bao.hua@hisilicon.com (mailing list archive)
State New, archived
Headers show
Series [v2] mm/gup_test: GUP_TEST depends on DEBUG_FS | expand

Commit Message

Song Bao Hua (Barry Song) Nov. 8, 2020, 8:37 a.m. UTC
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@nvidia.com>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Suggested-by: John Garry <john.garry@huawei.com>
Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
---
 -v2:
 add comment as a prompt to users as commented by John and Randy, thanks!

 mm/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

Comments

John Hubbard Nov. 9, 2020, 7:45 a.m. UTC | #1
On 11/8/20 12:37 AM, Barry Song wrote:
> 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@nvidia.com>
> Cc: Ralph Campbell <rcampbell@nvidia.com>
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Suggested-by: John Garry <john.garry@huawei.com>
> Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
> ---
>   -v2:
>   add comment as a prompt to users as commented by John and Randy, thanks!
> 
>   mm/Kconfig | 4 ++++
>   1 file changed, 4 insertions(+)

Thanks for suffering through a lot of discussion about this!

Reviewed-by: John Hubbard <jhubbard@nvidia.com>


thanks,
Randy Dunlap Nov. 9, 2020, 7:52 a.m. UTC | #2
On 11/8/20 11:45 PM, John Hubbard wrote:
> On 11/8/20 12:37 AM, Barry Song wrote:
>> 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@nvidia.com>
>> Cc: Ralph Campbell <rcampbell@nvidia.com>
>> Cc: Randy Dunlap <rdunlap@infradead.org>
>> Suggested-by: John Garry <john.garry@huawei.com>
>> Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
>> ---
>>   -v2:
>>   add comment as a prompt to users as commented by John and Randy, thanks!
>>
>>   mm/Kconfig | 4 ++++
>>   1 file changed, 4 insertions(+)
> 
> Thanks for suffering through a lot of discussion about this!
> 
> Reviewed-by: John Hubbard <jhubbard@nvidia.com>
> 
> 
> thanks,

Acked-by: Randy Dunlap <rdunlap@infradead.org>

thanks.
diff mbox series

Patch

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