Skip to content

Commit 02da283

Browse files
Christoph HellwigGreg Ungerer
authored andcommitted
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>
1 parent 2f3196d commit 02da283

File tree

6 files changed

+4
-6
lines changed

6 files changed

+4
-6
lines changed

arch/arm/include/asm/flat.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,4 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
3030
#endif
3131
}
3232

33-
#define flat_get_relocate_addr(rel) (rel)
34-
3533
#endif /* __ARM_FLAT_H__ */

arch/c6x/include/asm/flat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,5 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
1717
put_unaligned(addr, (__force u32 *)rp);
1818
return 0;
1919
}
20-
#define flat_get_relocate_addr(rel) (rel)
2120

2221
#endif /* __ASM_C6X_FLAT_H */

arch/m68k/include/asm/flat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
2828
return put_user(addr, rp);
2929
#endif
3030
}
31-
#define flat_get_relocate_addr(rel) (rel)
3231

3332
#define FLAT_PLAT_INIT(regs) \
3433
do { \

arch/sh/include/asm/flat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
2424
put_unaligned(addr, (__force u32 *)rp);
2525
return 0;
2626
}
27-
#define flat_get_relocate_addr(rel) (rel)
2827

2928
#define FLAT_PLAT_INIT(_r) \
3029
do { _r->regs[0]=0; _r->regs[1]=0; _r->regs[2]=0; _r->regs[3]=0; \

arch/xtensa/include/asm/flat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,5 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
1717
put_unaligned(addr, (__force u32 *)rp);
1818
return 0;
1919
}
20-
#define flat_get_relocate_addr(rel) (rel)
2120

2221
#endif /* __ASM_XTENSA_FLAT_H */

fs/binfmt_flat.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
#include <asm/cacheflush.h>
4444
#include <asm/page.h>
4545

46+
#ifndef flat_get_relocate_addr
47+
#define flat_get_relocate_addr(rel) (rel)
48+
#endif
49+
4650
/****************************************************************************/
4751

4852
/*

0 commit comments

Comments
 (0)