binfmt_flat: remove flat_old_ram_flag

Instead add a Kconfig variable that only h8300 selects.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
This commit is contained in:
Christoph Hellwig 2019-06-13 09:08:50 +02:00 committed by Greg Ungerer
parent 02da283302
commit 1d52dca117
10 changed files with 6 additions and 8 deletions

View File

@ -9,7 +9,6 @@
#include <linux/uaccess.h> #include <linux/uaccess.h>
#define flat_argvp_envp_on_stack() 1 #define flat_argvp_envp_on_stack() 1
#define flat_old_ram_flag(flags) (flags)
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags, static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
u32 *addr, u32 *persistent) u32 *addr, u32 *persistent)

View File

@ -5,7 +5,6 @@
#include <asm/unaligned.h> #include <asm/unaligned.h>
#define flat_argvp_envp_on_stack() 0 #define flat_argvp_envp_on_stack() 0
#define flat_old_ram_flag(flags) (flags)
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags, static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
u32 *addr, u32 *persistent) u32 *addr, u32 *persistent)
{ {

View File

@ -2,6 +2,7 @@
config H8300 config H8300
def_bool y def_bool y
select ARCH_32BIT_OFF_T select ARCH_32BIT_OFF_T
select BINFMT_FLAT_OLD_ALWAYS_RAM
select GENERIC_ATOMIC64 select GENERIC_ATOMIC64
select HAVE_UID16 select HAVE_UID16
select VIRT_TO_BUS select VIRT_TO_BUS

View File

@ -9,7 +9,6 @@
#include <asm/unaligned.h> #include <asm/unaligned.h>
#define flat_argvp_envp_on_stack() 1 #define flat_argvp_envp_on_stack() 1
#define flat_old_ram_flag(flags) 1
/* /*
* on the H8 a couple of the relocations have an instruction in the * on the H8 a couple of the relocations have an instruction in the

View File

@ -9,7 +9,6 @@
#include <linux/uaccess.h> #include <linux/uaccess.h>
#define flat_argvp_envp_on_stack() 1 #define flat_argvp_envp_on_stack() 1
#define flat_old_ram_flag(flags) (flags)
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags, static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
u32 *addr, u32 *persistent) u32 *addr, u32 *persistent)
{ {

View File

@ -14,7 +14,6 @@
#include <asm/unaligned.h> #include <asm/unaligned.h>
#define flat_argvp_envp_on_stack() 0 #define flat_argvp_envp_on_stack() 0
#define flat_old_ram_flag(flags) (flags)
/* /*
* Microblaze works a little differently from other arches, because * Microblaze works a little differently from other arches, because

View File

@ -12,7 +12,6 @@
#include <asm/unaligned.h> #include <asm/unaligned.h>
#define flat_argvp_envp_on_stack() 0 #define flat_argvp_envp_on_stack() 0
#define flat_old_ram_flag(flags) (flags)
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags, static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
u32 *addr, u32 *persistent) u32 *addr, u32 *persistent)
{ {

View File

@ -5,7 +5,6 @@
#include <asm/unaligned.h> #include <asm/unaligned.h>
#define flat_argvp_envp_on_stack() 0 #define flat_argvp_envp_on_stack() 0
#define flat_old_ram_flag(flags) (flags)
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags, static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
u32 *addr, u32 *persistent) u32 *addr, u32 *persistent)
{ {

View File

@ -97,6 +97,9 @@ config BINFMT_FLAT
help help
Support uClinux FLAT format binaries. Support uClinux FLAT format binaries.
config BINFMT_FLAT_OLD_ALWAYS_RAM
bool
config BINFMT_ZFLAT config BINFMT_ZFLAT
bool "Enable ZFLAT support" bool "Enable ZFLAT support"
depends on BINFMT_FLAT depends on BINFMT_FLAT

View File

@ -488,7 +488,8 @@ static int load_flat_file(struct linux_binprm *bprm,
* fix up the flags for the older format, there were all kinds * fix up the flags for the older format, there were all kinds
* of endian hacks, this only works for the simple cases * of endian hacks, this only works for the simple cases
*/ */
if (rev == OLD_FLAT_VERSION && flat_old_ram_flag(flags)) if (rev == OLD_FLAT_VERSION &&
(flags || IS_ENABLED(CONFIG_BINFMT_FLAT_OLD_ALWAYS_RAM)))
flags = FLAT_FLAG_RAM; flags = FLAT_FLAG_RAM;
#ifndef CONFIG_BINFMT_ZFLAT #ifndef CONFIG_BINFMT_ZFLAT