[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200508144017.3501418-1-arnd@arndb.de>
Date: Fri, 8 May 2020 16:40:08 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Jason Gunthorpe <jgg@...pe.ca>,
Ralph Campbell <rcampbell@...dia.com>,
Jérôme Glisse <jglisse@...hat.com>
Cc: Arnd Bergmann <arnd@...db.de>, Jason Gunthorpe <jgg@...lanox.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Masahiro Yamada <masahiroy@...nel.org>,
Changbin Du <changbin.du@...el.com>,
Randy Dunlap <rdunlap@...radead.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Anshuman Khandual <anshuman.khandual@....com>,
Krzysztof Kozlowski <krzk@...nel.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] HMM: test: fix CONFIG_DEVICE_PRIVATE dependencies
One cannot select DEVICE_PRIVATE when its dependencies are disabled:
WARNING: unmet direct dependencies detected for DEVICE_PRIVATE
Depends on [n]: ZONE_DEVICE [=n]
Selected by [m]:
- TEST_HMM [=m] && RUNTIME_TESTING_MENU [=y] && TRANSPARENT_HUGEPAGE [=y]
lib/test_hmm.c:480:8: error: implicit declaration of function 'memremap_pages' [-Werror,-Wimplicit-function-declaration]
ptr = memremap_pages(&devmem->pagemap, numa_node_id());
^
lib/test_hmm.c:480:8: note: did you mean 'memcmp_pages'?
include/linux/mm.h:3082:12: note: 'memcmp_pages' declared here
extern int memcmp_pages(struct page *page1, struct page *page2);
^
lib/test_hmm.c:480:6: error: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Werror,-Wint-conversion]
ptr = memremap_pages(&devmem->pagemap, numa_node_id());
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/test_hmm.c:1089:4: error: implicit declaration of function 'memunmap_pages' [-Werror,-Wimplicit-function-declaration]
memunmap_pages(&devmem->pagemap);
Add a dependency from CONFIG_TEST_HMM to ZONE_DEVICE, to disallow
those broken configurations.
Fixes: 5d5e54be8a1e ("mm/hmm/test: add selftest driver for HMM")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
lib/Kconfig.debug | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index d9885fa37cc0..63667d62c9d8 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2262,6 +2262,7 @@ config TEST_MEMINIT
config TEST_HMM
tristate "Test HMM (Heterogeneous Memory Management)"
depends on TRANSPARENT_HUGEPAGE
+ depends on ZONE_DEVICE
select DEVICE_PRIVATE
select HMM_MIRROR
select MMU_NOTIFIER
--
2.26.0
Powered by blists - more mailing lists