From patchwork Sun Nov 8 08:37:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Song Bao Hua (Barry Song)" X-Patchwork-Id: 11889495 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2CDD615E6 for ; Sun, 8 Nov 2020 08:41:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9936D20719 for ; Sun, 8 Nov 2020 08:41:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9936D20719 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=hisilicon.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8A2546B0036; Sun, 8 Nov 2020 03:41:47 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 82B6C6B005D; Sun, 8 Nov 2020 03:41:47 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6CB1F6B0068; Sun, 8 Nov 2020 03:41:47 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0169.hostedemail.com [216.40.44.169]) by kanga.kvack.org (Postfix) with ESMTP id 417436B0036 for ; Sun, 8 Nov 2020 03:41:47 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id CF8901EE6 for ; Sun, 8 Nov 2020 08:41:46 +0000 (UTC) X-FDA: 77460607812.17.bat01_5911c71272e2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id B0663180D0181 for ; Sun, 8 Nov 2020 08:41:46 +0000 (UTC) X-Spam-Summary: 1,0,0,a69ab9b62c77d63b,d41d8cd98f00b204,song.bao.hua@hisilicon.com,,RULES_HIT:41:355:379:541:582:800:960:973:988:989:1152:1260:1261:1277:1311:1313:1314:1345:1437:1515:1516:1518:1534:1541:1711:1730:1747:1777:1792:2393:2559:2562:2908:3138:3139:3140:3141:3142:3352:3865:3867:3868:3870:3871:3874:4321:5007:6261:7903:8784:9040:10004:10400:11026:11473:11658:11914:12043:12296:12297:12438:12555:12895:13069:13311:13357:13894:14096:14097:14181:14394:14721:21080:21627:21966:30012:30054:30056:30064,0,RBL:45.249.212.190:@hisilicon.com:.lbl8.mailshell.net-64.100.201.201 62.2.2.100;04y8886zf45koocghrhgttdbmkokgyc4osuk9gg8bte6s97zz7dawf7is7zfm4r.7o69wjjmqcbbdpcsjpk1kbe3hoa5kcjaazxmowjz5b5dtt9sfmpd8z5np4gzzwm.y-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:69,LUA_SUMMARY:none X-HE-Tag: bat01_5911c71272e2 X-Filterd-Recvd-Size: 2513 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Sun, 8 Nov 2020 08:41:45 +0000 (UTC) Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CTSK65FCqz15QkT; Sun, 8 Nov 2020 16:41:30 +0800 (CST) Received: from SWX921481.china.huawei.com (10.126.203.211) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Sun, 8 Nov 2020 16:41:28 +0800 From: Barry Song To: , , CC: , Barry Song , "John Hubbard" , Ralph Campbell , "Randy Dunlap" , John Garry Subject: [PATCH v2] mm/gup_test: GUP_TEST depends on DEBUG_FS Date: Sun, 8 Nov 2020 21:37:32 +1300 Message-ID: <20201108083732.15336-1-song.bao.hua@hisilicon.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.126.203.211] X-CFilter-Loop: Reflected X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 Cc: Ralph Campbell Cc: Randy Dunlap Suggested-by: John Garry Signed-off-by: Barry Song Reviewed-by: John Hubbard Acked-by: Randy Dunlap --- -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