binfmt_flat: add a ARCH_HAS_BINFMT_FLAT option
authorChristoph Hellwig <hch@lst.de>
Thu, 13 Jun 2019 07:08:57 +0000 (09:08 +0200)
committerGreg Ungerer <gerg@kernel.org>
Sun, 23 Jun 2019 23:16:47 +0000 (09:16 +1000)
Allow architectures to opt into ARCH_HAS_BINFMT_FLAT support instead of
assuming that all nommu ports support the format.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
arch/arm/Kconfig
arch/c6x/Kconfig
arch/h8300/Kconfig
arch/m68k/Kconfig
arch/microblaze/Kconfig
arch/sh/Kconfig
arch/xtensa/Kconfig
fs/Kconfig.binfmt

index b1b48c0bde7651358e9aeb6ced583c5f48edfc40..695a26c68064ddd166ce3e02e885ac804c95e198 100644 (file)
@@ -4,6 +4,7 @@ config ARM
        default y
        select ARCH_32BIT_OFF_T
        select ARCH_CLOCKSOURCE_DATA
+       select ARCH_HAS_BINFMT_FLAT
        select ARCH_HAS_DEBUG_VIRTUAL if MMU
        select ARCH_HAS_DEVMEM_IS_ALLOWED
        select ARCH_HAS_ELF_RANDOMIZE
index eeb0471268a079994b843310de718f745624acb2..78dfe186d708b03047afd1745c2d8106faa1b623 100644 (file)
@@ -7,6 +7,7 @@
 config C6X
        def_bool y
        select ARCH_32BIT_OFF_T
+       select ARCH_HAS_BINFMT_FLAT
        select ARCH_HAS_SYNC_DMA_FOR_CPU
        select ARCH_HAS_SYNC_DMA_FOR_DEVICE
        select CLKDEV_LOOKUP
index 7457f190caaab8656d8cafe5df5c02842a1c9805..ec800e9d5aadf6cb646900395f34e6b7bf5b3053 100644 (file)
@@ -2,6 +2,7 @@
 config H8300
         def_bool y
        select ARCH_32BIT_OFF_T
+       select ARCH_HAS_BINFMT_FLAT
        select BINFMT_FLAT_ARGVP_ENVP_ON_STACK
        select BINFMT_FLAT_OLD_ALWAYS_RAM
        select GENERIC_ATOMIC64
index fd69ee5ad6ab073246e1d9456d8098cc7b4da05c..c0c43c624afa09c27eab4e2fe29f1a2487ad7069 100644 (file)
@@ -3,6 +3,7 @@ config M68K
        bool
        default y
        select ARCH_32BIT_OFF_T
+       select ARCH_HAS_BINFMT_FLAT
        select ARCH_HAS_SYNC_DMA_FOR_DEVICE if HAS_DMA
        select ARCH_MIGHT_HAVE_PC_PARPORT if ISA
        select ARCH_NO_COHERENT_DMA_MMAP if !MMU
index f11433daab4ae37d1e685b07706f2dd6cdfb946c..d411de05b6282ddddfc7b31d4eb0739fe947e0a4 100644 (file)
@@ -3,6 +3,7 @@ config MICROBLAZE
        def_bool y
        select ARCH_32BIT_OFF_T
        select ARCH_NO_SWAP
+       select ARCH_HAS_BINFMT_FLAT if !MMU
        select ARCH_HAS_DMA_COHERENT_TO_PFN if MMU
        select ARCH_HAS_GCOV_PROFILE_ALL
        select ARCH_HAS_SYNC_DMA_FOR_CPU
index b77f512bb1766ebb22711a7e676063c7134d2f7e..df3e6215b78cf8fcf1bd8659436fa42b1b8c1075 100644 (file)
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 config SUPERH
        def_bool y
+       select ARCH_HAS_BINFMT_FLAT if !MMU
        select ARCH_HAS_PTE_SPECIAL
        select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
        select ARCH_MIGHT_HAVE_PC_PARPORT
index 6ec1b75eabc5eece0e7c7155e78be8a99ce301da..ebc135bda92119f38abfc5cb2eb8c2d91f760d41 100644 (file)
@@ -2,6 +2,7 @@
 config XTENSA
        def_bool y
        select ARCH_32BIT_OFF_T
+       select ARCH_HAS_BINFMT_FLAT if !MMU
        select ARCH_HAS_SYNC_DMA_FOR_CPU
        select ARCH_HAS_SYNC_DMA_FOR_DEVICE
        select ARCH_NO_COHERENT_DMA_MMAP if !MMU
index 82f7d7f234f3eab159cb47d20479e130f2b70f7b..286b425b30b93b1b4801dea35034c1d8931a8ab7 100644 (file)
@@ -91,9 +91,12 @@ config BINFMT_SCRIPT
 
          Most systems will not boot if you say M or N here.  If unsure, say Y.
 
+config ARCH_HAS_BINFMT_FLAT
+       bool
+
 config BINFMT_FLAT
        bool "Kernel support for flat binaries"
-       depends on !MMU || ARM || M68K
+       depends on ARCH_HAS_BINFMT_FLAT
        help
          Support uClinux FLAT format binaries.