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>
#include <linux/uaccess.h>
#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,
u32 *addr, u32 *persistent)
#include <asm/unaligned.h>
#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,
u32 *addr, u32 *persistent)
{
config H8300
def_bool y
select ARCH_32BIT_OFF_T
+ select BINFMT_FLAT_OLD_ALWAYS_RAM
select GENERIC_ATOMIC64
select HAVE_UID16
select VIRT_TO_BUS
#include <asm/unaligned.h>
#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
#include <linux/uaccess.h>
#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,
u32 *addr, u32 *persistent)
{
#include <asm/unaligned.h>
#define flat_argvp_envp_on_stack() 0
-#define flat_old_ram_flag(flags) (flags)
/*
* Microblaze works a little differently from other arches, because
#include <asm/unaligned.h>
#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,
u32 *addr, u32 *persistent)
{
#include <asm/unaligned.h>
#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,
u32 *addr, u32 *persistent)
{
help
Support uClinux FLAT format binaries.
+config BINFMT_FLAT_OLD_ALWAYS_RAM
+ bool
+
config BINFMT_ZFLAT
bool "Enable ZFLAT support"
depends on BINFMT_FLAT
* fix up the flags for the older format, there were all kinds
* 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;
#ifndef CONFIG_BINFMT_ZFLAT