binfmt_flat: provide a default version of flat_get_relocate_addr

This way only the two architectures that do masking need to provide
the helper.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com>
Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
This commit is contained in:
Christoph Hellwig
2019-06-13 09:08:49 +02:00
committed by Greg Ungerer
parent 2f3196d49b
commit 02da283302
6 changed files with 4 additions and 6 deletions

View File

@@ -30,6 +30,4 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
#endif #endif
} }
#define flat_get_relocate_addr(rel) (rel)
#endif /* __ARM_FLAT_H__ */ #endif /* __ARM_FLAT_H__ */

View File

@@ -17,6 +17,5 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
put_unaligned(addr, (__force u32 *)rp); put_unaligned(addr, (__force u32 *)rp);
return 0; return 0;
} }
#define flat_get_relocate_addr(rel) (rel)
#endif /* __ASM_C6X_FLAT_H */ #endif /* __ASM_C6X_FLAT_H */

View File

@@ -28,7 +28,6 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
return put_user(addr, rp); return put_user(addr, rp);
#endif #endif
} }
#define flat_get_relocate_addr(rel) (rel)
#define FLAT_PLAT_INIT(regs) \ #define FLAT_PLAT_INIT(regs) \
do { \ do { \

View File

@@ -24,7 +24,6 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
put_unaligned(addr, (__force u32 *)rp); put_unaligned(addr, (__force u32 *)rp);
return 0; return 0;
} }
#define flat_get_relocate_addr(rel) (rel)
#define FLAT_PLAT_INIT(_r) \ #define FLAT_PLAT_INIT(_r) \
do { _r->regs[0]=0; _r->regs[1]=0; _r->regs[2]=0; _r->regs[3]=0; \ do { _r->regs[0]=0; _r->regs[1]=0; _r->regs[2]=0; _r->regs[3]=0; \

View File

@@ -17,6 +17,5 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
put_unaligned(addr, (__force u32 *)rp); put_unaligned(addr, (__force u32 *)rp);
return 0; return 0;
} }
#define flat_get_relocate_addr(rel) (rel)
#endif /* __ASM_XTENSA_FLAT_H */ #endif /* __ASM_XTENSA_FLAT_H */

View File

@@ -43,6 +43,10 @@
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/page.h> #include <asm/page.h>
#ifndef flat_get_relocate_addr
#define flat_get_relocate_addr(rel) (rel)
#endif
/****************************************************************************/ /****************************************************************************/
/* /*