All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Randy Dunlap <rdunlap@infradead.org>,
	Richard Weinberger <richard@nod.at>,
	Ley Foon Tan <lftan@altera.com>, Michal Simek <monstr@monstr.eu>,
	linux-kbuild@vger.kernel.org, linux-um@lists.infradead.org,
	linux-arch@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH 04/10] kconfig: remove duplicate SWAP symbol defintions
Date: Tue, 24 Jul 2018 19:56:40 +0200	[thread overview]
Message-ID: <20180724175646.3621-5-hch@lst.de> (raw)
In-Reply-To: <20180724175646.3621-1-hch@lst.de>

microblaze and nios2 define their own always n SWAP symbols.  Remove those
and let the generic defintion do the right thing by adding a new symbol
to disable swap entirely.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/microblaze/Kconfig | 4 +---
 arch/nios2/Kconfig      | 4 +---
 init/Kconfig            | 9 ++++++++-
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index d14782100088..cc139d1b1284 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -1,5 +1,6 @@
 config MICROBLAZE
 	def_bool y
+	select ARCH_NO_SWAP
 	select ARCH_HAS_GCOV_PROFILE_ALL
 	select ARCH_MIGHT_HAVE_PC_PARPORT
 	select ARCH_NO_COHERENT_DMA_MMAP if !MMU
@@ -52,9 +53,6 @@ config CPU_LITTLE_ENDIAN
 
 endchoice
 
-config SWAP
-	def_bool n
-
 config RWSEM_GENERIC_SPINLOCK
 	def_bool y
 
diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index 3d4ec88f1db1..3f9d4ef8b20f 100644
--- a/arch/nios2/Kconfig
+++ b/arch/nios2/Kconfig
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 config NIOS2
 	def_bool y
+	select ARCH_NO_SWAP
 	select TIMER_OF
 	select GENERIC_ATOMIC64
 	select GENERIC_CLOCKEVENTS
@@ -38,9 +39,6 @@ config HAS_DMA
 config FPU
 	def_bool n
 
-config SWAP
-	def_bool n
-
 config RWSEM_GENERIC_SPINLOCK
 	def_bool y
 
diff --git a/init/Kconfig b/init/Kconfig
index 041f3a022122..1e69f93b809e 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -218,9 +218,16 @@ config DEFAULT_HOSTNAME
 	  but you may wish to use a different default here to make a minimal
 	  system more usable with less configuration.
 
+#
+# For some reason microblaze and nios2 hard code SWAP=n.  Hopefully we can
+# add proper SWAP support to them, in which case this can be remove.
+#
+config ARCH_NO_SWAP
+	bool
+
 config SWAP
 	bool "Support for paging of anonymous memory (swap)"
-	depends on MMU && BLOCK
+	depends on MMU && BLOCK && !ARCH_NO_SWAP
 	default y
 	help
 	  This option allows you to choose whether you want to have support
-- 
2.18.0


WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Simek <monstr@monstr.eu>,
	linux-kbuild@vger.kernel.org, Richard Weinberger <richard@nod.at>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-um@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arch@lists.infradead.org, Ley Foon Tan <lftan@altera.com>
Subject: [PATCH 04/10] kconfig: remove duplicate SWAP symbol defintions
Date: Tue, 24 Jul 2018 19:56:40 +0200	[thread overview]
Message-ID: <20180724175646.3621-5-hch@lst.de> (raw)
In-Reply-To: <20180724175646.3621-1-hch@lst.de>

microblaze and nios2 define their own always n SWAP symbols.  Remove those
and let the generic defintion do the right thing by adding a new symbol
to disable swap entirely.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/microblaze/Kconfig | 4 +---
 arch/nios2/Kconfig      | 4 +---
 init/Kconfig            | 9 ++++++++-
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index d14782100088..cc139d1b1284 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -1,5 +1,6 @@
 config MICROBLAZE
 	def_bool y
+	select ARCH_NO_SWAP
 	select ARCH_HAS_GCOV_PROFILE_ALL
 	select ARCH_MIGHT_HAVE_PC_PARPORT
 	select ARCH_NO_COHERENT_DMA_MMAP if !MMU
@@ -52,9 +53,6 @@ config CPU_LITTLE_ENDIAN
 
 endchoice
 
-config SWAP
-	def_bool n
-
 config RWSEM_GENERIC_SPINLOCK
 	def_bool y
 
diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index 3d4ec88f1db1..3f9d4ef8b20f 100644
--- a/arch/nios2/Kconfig
+++ b/arch/nios2/Kconfig
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 config NIOS2
 	def_bool y
+	select ARCH_NO_SWAP
 	select TIMER_OF
 	select GENERIC_ATOMIC64
 	select GENERIC_CLOCKEVENTS
@@ -38,9 +39,6 @@ config HAS_DMA
 config FPU
 	def_bool n
 
-config SWAP
-	def_bool n
-
 config RWSEM_GENERIC_SPINLOCK
 	def_bool y
 
diff --git a/init/Kconfig b/init/Kconfig
index 041f3a022122..1e69f93b809e 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -218,9 +218,16 @@ config DEFAULT_HOSTNAME
 	  but you may wish to use a different default here to make a minimal
 	  system more usable with less configuration.
 
+#
+# For some reason microblaze and nios2 hard code SWAP=n.  Hopefully we can
+# add proper SWAP support to them, in which case this can be remove.
+#
+config ARCH_NO_SWAP
+	bool
+
 config SWAP
 	bool "Support for paging of anonymous memory (swap)"
-	depends on MMU && BLOCK
+	depends on MMU && BLOCK && !ARCH_NO_SWAP
 	default y
 	help
 	  This option allows you to choose whether you want to have support
-- 
2.18.0


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


  parent reply	other threads:[~2018-07-24 17:57 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 17:56 include architecture Kconfig files from top-level Kconfig v3 Christoph Hellwig
2018-07-24 17:56 ` Christoph Hellwig
2018-07-24 17:56 ` [PATCH 01/10] um: stop abusing KBUILD_KCONFIG Christoph Hellwig
2018-07-24 17:56   ` Christoph Hellwig
2018-07-24 17:56 ` [PATCH 02/10] um: cleanup Kconfig files Christoph Hellwig
2018-07-24 17:56   ` Christoph Hellwig
2018-07-24 17:56 ` [PATCH 03/10] um: create a proper drivers Kconfig Christoph Hellwig
2018-07-24 17:56   ` Christoph Hellwig
2018-07-24 17:56 ` Christoph Hellwig [this message]
2018-07-24 17:56   ` [PATCH 04/10] kconfig: remove duplicate SWAP symbol defintions Christoph Hellwig
2018-07-24 17:56 ` [PATCH 05/10] kconfig: include common Kconfig files from top-level Kconfig Christoph Hellwig
2018-07-24 17:56   ` Christoph Hellwig
2018-07-24 17:56 ` [PATCH 06/10] Kconfig: consolidate the "Kernel hacking" menu Christoph Hellwig
2018-07-24 17:56   ` Christoph Hellwig
2018-07-24 17:56 ` [PATCH 07/10] kconfig: include kernel/Kconfig.preempt from init/Kconfig Christoph Hellwig
2018-07-24 17:56   ` Christoph Hellwig
2018-07-24 17:56 ` [PATCH 08/10] kconfig: use a menu in arch/Kconfig to reduce clutter Christoph Hellwig
2018-07-24 17:56   ` Christoph Hellwig
2018-07-24 17:56 ` [PATCH 09/10] kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt Christoph Hellwig
2018-07-24 17:56   ` Christoph Hellwig
2018-07-24 17:56 ` [PATCH 10/10] kconfig: add a Memory Management options" menu Christoph Hellwig
2018-07-24 17:56   ` Christoph Hellwig
2018-07-25  4:30 ` include architecture Kconfig files from top-level Kconfig v3 Masahiro Yamada
2018-07-25  4:30   ` Masahiro Yamada
2018-07-26 17:21   ` Christoph Hellwig
2018-07-26 17:21     ` Christoph Hellwig
2018-07-27  1:32     ` Masahiro Yamada
2018-07-27  7:48       ` Christoph Hellwig
2018-07-28  0:50         ` Masahiro Yamada
2018-07-28  0:50           ` Masahiro Yamada
2018-07-31 11:39 include architecture Kconfig files from top-level Kconfig v4 Christoph Hellwig
2018-07-31 11:39 ` [PATCH 04/10] kconfig: remove duplicate SWAP symbol defintions Christoph Hellwig
2018-07-31 11:39   ` Christoph Hellwig

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=20180724175646.3621-5-hch@lst.de \
    --to=hch@lst.de \
    --cc=lftan@altera.com \
    --cc=linux-arch@lists.infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=monstr@monstr.eu \
    --cc=rdunlap@infradead.org \
    --cc=richard@nod.at \
    --cc=yamada.masahiro@socionext.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.