From patchwork Tue May 25 00:13:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 12277391 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5321DC2B9F7 for ; Tue, 25 May 2021 00:13:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F1929613F5 for ; Tue, 25 May 2021 00:13:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1929613F5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8C3B46B0072; Mon, 24 May 2021 20:13:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 873196B0073; Mon, 24 May 2021 20:13:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 73B6B6B0074; Mon, 24 May 2021 20:13:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0203.hostedemail.com [216.40.44.203]) by kanga.kvack.org (Postfix) with ESMTP id 428CB6B0072 for ; Mon, 24 May 2021 20:13:07 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id DCE7A999F for ; Tue, 25 May 2021 00:13:06 +0000 (UTC) X-FDA: 78177828372.26.3479429 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf29.hostedemail.com (Postfix) with ESMTP id 96BA9130 for ; Tue, 25 May 2021 00:12:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=239GNiHQsCPu4pq+8O4i3Wg4ILeoB0m3IGYnSRUFyCg=; b=0/Ti++aewhBAe/xY6PfIqqskWF VLMHlDVSPXf54TQACGJmg6+RwtvN8PCUlkgW1LhKWWXkbqlVyy29bugUcxkBS0HIqolC3vvVV/tIv BJOKted6cGT6Gw1oCpoIG9Axcd0Isobp3a5XZ7o8iTMwnY3CYHhpRR6SZvFxTcKEZ2Sni6gT8VvWV 0jZpBwUUwJbxX6J0vkjtHGJq7FujM+wMprEY2gl7gF8Us6dkA8mqNdBg25ijjsje+Ujpw55CG9APa Rn82cew/+dAccMO1gINcdRswimcV5BR8T3yt4jk42HLarzdsnuxzNSBOW3sDtalRa/t51xnkThKlv 653Q4p8g==; Received: from [2601:1c0:6280:3f0::7376] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1llKgx-002UXF-4Y; Tue, 25 May 2021 00:13:03 +0000 From: Randy Dunlap To: linux-mm@kvack.org Cc: Randy Dunlap , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, Andrew Morton , Nanyong Sun Subject: [PATCH -next] riscv: TRANSPARENT_HUGEPAGE: depends on MMU Date: Mon, 24 May 2021 17:13:02 -0700 Message-Id: <20210525001302.27779-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b="0/Ti++ae"; dmarc=none; spf=none (imf29.hostedemail.com: domain of rdunlap@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=rdunlap@infradead.org X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 96BA9130 X-Stat-Signature: 18w9azect5yrzn5o69iju1e6wrgesbmq X-HE-Tag: 1621901578-359470 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: Fix a Kconfig warning and many build errors: WARNING: unmet direct dependencies detected for COMPACTION Depends on [n]: MMU [=n] Selected by [y]: - TRANSPARENT_HUGEPAGE [=y] && HAVE_ARCH_TRANSPARENT_HUGEPAGE [=y] and the subseqent thousands of build errors and warnings. Fixes: e88b333142e4 ("riscv: mm: add THP support on 64-bit") Signed-off-by: Randy Dunlap Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org Cc: Andrew Morton Cc: Nanyong Sun Acked-by: Mike Rapoport --- I really think that mm/Kconfig should have "depends on MMU" for TRANSPARENT_HUGEPAGE, but commit 15626062f4a9 from 2012 ("thp, x86: introduce HAVE_ARCH_TRANSPARENT_HUGEPAGE") thought differently. I.e., mm/Kconfig should be protecting all arches against this Kconfig problem. arch/riscv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20210524.orig/arch/riscv/Kconfig +++ linux-next-20210524/arch/riscv/Kconfig @@ -106,7 +106,7 @@ config RISCV select SYSCTL_EXCEPTION_TRACE select THREAD_INFO_IN_TASK select UACCESS_MEMCPY if !MMU - select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT + select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT && MMU config ARCH_MMAP_RND_BITS_MIN default 18 if 64BIT