All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: linux-mm@kvack.org
Cc: Randy Dunlap <rdunlap@infradead.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	linux-riscv@lists.infradead.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Nanyong Sun <sunnanyong@huawei.com>
Subject: [PATCH -next] riscv: TRANSPARENT_HUGEPAGE: depends on MMU
Date: Mon, 24 May 2021 17:13:02 -0700	[thread overview]
Message-ID: <20210525001302.27779-1-rdunlap@infradead.org> (raw)

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 <rdunlap@infradead.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: linux-riscv@lists.infradead.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Nanyong Sun <sunnanyong@huawei.com>
---
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

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Randy Dunlap <rdunlap@infradead.org>
To: linux-mm@kvack.org
Cc: Randy Dunlap <rdunlap@infradead.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	linux-riscv@lists.infradead.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Nanyong Sun <sunnanyong@huawei.com>
Subject: [PATCH -next] riscv: TRANSPARENT_HUGEPAGE: depends on MMU
Date: Mon, 24 May 2021 17:13:02 -0700	[thread overview]
Message-ID: <20210525001302.27779-1-rdunlap@infradead.org> (raw)

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 <rdunlap@infradead.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: linux-riscv@lists.infradead.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Nanyong Sun <sunnanyong@huawei.com>
---
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


             reply	other threads:[~2021-05-25  3:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25  0:13 Randy Dunlap [this message]
2021-05-25  0:13 ` [PATCH -next] riscv: TRANSPARENT_HUGEPAGE: depends on MMU Randy Dunlap
2021-05-25 10:33 ` Mike Rapoport
2021-05-25 10:33   ` Mike Rapoport
2021-05-25 15:40   ` Randy Dunlap
2021-05-25 15:40     ` Randy Dunlap
2021-05-29 23:08     ` Palmer Dabbelt
2021-05-29 23:08       ` Palmer Dabbelt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210525001302.27779-1-rdunlap@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-mm@kvack.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=sunnanyong@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.