Skip to content

Commit

Permalink
kconfig: remove duplicate SWAP symbol defintions
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
Christoph Hellwig authored and masahir0y committed Aug 1, 2018
1 parent 9bea180 commit 17c46a6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 1 addition & 3 deletions arch/microblaze/Kconfig
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -52,9 +53,6 @@ config CPU_LITTLE_ENDIAN

endchoice

config SWAP
def_bool n

config RWSEM_GENERIC_SPINLOCK
def_bool y

Expand Down
4 changes: 1 addition & 3 deletions arch/nios2/Kconfig
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -38,9 +39,6 @@ config HAS_DMA
config FPU
def_bool n

config SWAP
def_bool n

config RWSEM_GENERIC_SPINLOCK
def_bool y

Expand Down
9 changes: 8 additions & 1 deletion init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 17c46a6

Please sign in to comment.