]>
git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - arch/m68k/include/asm/flat.h
2 * flat.h -- uClinux flat-format executables
5 #ifndef __M68KNOMMU_FLAT_H__
6 #define __M68KNOMMU_FLAT_H__
8 #include <linux/uaccess.h>
10 #define flat_argvp_envp_on_stack() 1
11 #define flat_old_ram_flag(flags) (flags)
12 #define flat_reloc_valid(reloc, size) ((reloc) <= (size))
13 static inline int flat_get_addr_from_rp(u32 __user
*rp
, u32 relval
, u32 flags
,
14 u32
*addr
, u32
*persistent
)
16 #ifdef CONFIG_CPU_HAS_NO_UNALIGNED
17 return copy_from_user(addr
, rp
, 4) ? -EFAULT
: 0;
19 return get_user(*addr
, rp
);
23 static inline int flat_put_addr_at_rp(u32 __user
*rp
, u32 addr
, u32 rel
)
25 #ifdef CONFIG_CPU_HAS_NO_UNALIGNED
26 return copy_to_user(rp
, &addr
, 4) ? -EFAULT
: 0;
28 return put_user(addr
, rp
);
31 #define flat_get_relocate_addr(rel) (rel)
33 static inline int flat_set_persistent(u32 relval
, u32
*persistent
)
38 #define FLAT_PLAT_INIT(regs) \
41 (regs)->d5 = current->mm->start_data; \
44 #endif /* __M68KNOMMU_FLAT_H__ */