From patchwork Fri Jun 24 08:52:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 12894303 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CC310C433EF for ; Fri, 24 Jun 2022 09:46:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=SMelvvM+bB2vUTeACVJKuhST4LDwZ6nd7RWnPHVCTCg=; b=h62JGaF1xtcxt3 vNwZWtxSkMfcTMT4bvAdqaYoROqVeFlgfFAkqcWW1PdBvDM2N81hU37jfOQkefmKHQmSHdeAs7Scg wM2gf6v4X88Nk3MLIS+WrRJSj2/6ySkCFJ/86dN//6qNjm2QbE+8Xk8621PNMLMMH5/x/dSLLqRL3 Psmx0efkMEwDtxIFFQSTcomNnxkLUtLRIwqdMlZfr7mT2BHsM9S9tvt/n0Wr/UtESNKbSuv6JYZ5q h6olAzBc0A1oJJq09proTj2khiN7fUIKqIeP+fu42ILVs3n6khzZ+4sKii6Fchx8D442Gmi9OpPnq oGp0wyUasJXJ2lLVvK4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4fte-001WyL-Ol; Fri, 24 Jun 2022 09:46:38 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4fta-001Wri-LT for linux-riscv@lists.infradead.org; Fri, 24 Jun 2022 09:46:36 +0000 Received: from canpemm500007.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LTscF0KCKzSh2t; Fri, 24 Jun 2022 17:42:53 +0800 (CST) Received: from localhost (10.174.179.215) by canpemm500007.china.huawei.com (7.192.104.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 24 Jun 2022 17:46:18 +0800 From: YueHaibing To: , , , , , CC: , , YueHaibing Subject: [PATCH -next] riscv/mm: Fix build error while PAGE_TABLE_CHECK enabled without MMU Date: Fri, 24 Jun 2022 16:52:36 +0800 Message-ID: <20220624085236.18544-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.179.215] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500007.china.huawei.com (7.192.104.62) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220624_024634_894606_62F6EFEE X-CRM114-Status: UNSURE ( 6.48 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org mm/page_table_check.c: In function ‘__page_table_check_pte_clear’: mm/page_table_check.c:148:6: error: implicit declaration of function ‘pte_user_accessible_page’; did you mean ‘user_access_save’? [-Werror=implicit-function-declaration] if (pte_user_accessible_page(pte)) { ^~~~~~~~~~~~~~~~~~~~~~~~ user_access_save ARCH_SUPPORTS_PAGE_TABLE_CHECK should only enabled with MMU. Fixes: 3fee229a8eb9 ("riscv/mm: enable ARCH_SUPPORTS_PAGE_TABLE_CHECK") Signed-off-by: YueHaibing --- arch/riscv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 850f6fbb0b5f..d6a07b9add05 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -38,7 +38,7 @@ config RISCV select ARCH_SUPPORTS_ATOMIC_RMW select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU select ARCH_SUPPORTS_HUGETLBFS if MMU - select ARCH_SUPPORTS_PAGE_TABLE_CHECK + select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU select ARCH_USE_MEMTEST select ARCH_USE_QUEUED_RWLOCKS select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU