Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2450223pxb; Sun, 8 Nov 2020 00:45:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAf0Iq3P8RNNdiXdTAcurgM51BvGhW3UHSFmSuxT3HjqMIVrtX14kWX5Dzzvgpu+fqdy4p X-Received: by 2002:a17:906:c41:: with SMTP id t1mr10067821ejf.19.1604825153293; Sun, 08 Nov 2020 00:45:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604825153; cv=none; d=google.com; s=arc-20160816; b=j3psqWv+qomxUQIY07jVYB6Df+Zg9aqJLjxgTZGhNgt1Im5bkgqGgJeCr4tliA5Dq+ LlFDfDGKudJooWfvV0NKdlXn+shUKqoYSHm1rhcRooc3UPBXR+DVAofWDsw1U/xnxFQZ DtXnM5d9rbOjYVwX+3hIIg+2ErdVivjclB5fR463GiNPveOvfqfTLbYiFh5fwY9WX2Wt FssfkSMkmQAiCgVrXVx4oG31VIb8SMQkTDmskMsgQJWuz1pTlD9duTBZRC83ZK+MoFLi y03NrEzZ9qYppWPueW8JmBg2w4m0hazkf2pUYu2TeEUttkLCOTAFM4dPeA9k9a5coZUh O7mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=aS/pd9BILIkAnci8lh0kBv4oAsJ1kFpzxqtWso8Wd/k=; b=nDqFb/y/ce2NxENyXAhX/+bB3csJ5s+h+zK2pArgW68Ep6rmnahtBCvDeObq1V+QlL TDqPUrNwXHZk0Y1mqZFkgVWziuIEoisnplV+fkMiUCHLRKWvW+NyglCeUVHIKXXgCDZP xdsYmF5axKB1ckfS1LxoYvB4cwsv25v1SqVlyx/xM7HUXc+D0lOrfATqh9eGksccThAq ELHc5tC2O5wwzln7WPtO+7BBzGvmKhxeEQwas97by1OnLij1WB+KW0a2nBMJ+PaSDwWp pFBCTxSvjR2vn7jSLxAlhRQOdfT2J//a6NojicKaI90yPaqu0LaZZZY08WflKnQf+YMW wSuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si4656677edr.531.2020.11.08.00.45.30; Sun, 08 Nov 2020 00:45:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727881AbgKHIlv (ORCPT + 99 others); Sun, 8 Nov 2020 03:41:51 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:7155 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726115AbgKHIlu (ORCPT ); Sun, 8 Nov 2020 03:41:50 -0500 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 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.126.203.211] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- -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