Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Pull m68knommu updates from Greg Ungerer: "This series is all about Nicolas flat format support for MMU systems. Traditional m68k no-MMU flat format binaries can now be run on m68k MMU enabled systems too. The series includes some nice cleanups of the binfmt_flat code and converts it to using proper user space accessor functions. With all this in place you can boot and run a complete no-MMU flat format based user space on an MMU enabled system" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: enable binfmt_flat on systems with an MMU binfmt_flat: allow compressed flat binary format to work on MMU systems binfmt_flat: add MMU-specific support binfmt_flat: update libraries' data segment pointer with userspace accessors binfmt_flat: use clear_user() rather than memset() to clear .bss binfmt_flat: use proper user space accessors with old relocs code binfmt_flat: use proper user space accessors with relocs processing code binfmt_flat: clean up create_flat_tables() and stack accesses binfmt_flat: use generic transfer_args_to_stack() elf_fdpic_transfer_args_to_stack(): make it generic binfmt_flat: prevent kernel dammage from corrupted executable headers binfmt_flat: convert printk invocations to their modern form binfmt_flat: assorted cleanups m68k: use same start_thread() on MMU and no-MMU m68k: fix file path comment m68k: fix bFLT executable running on MMU enabled systems
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* include/asm-m68knommu/flat.h -- uClinux flat-format executables
|
||||
* flat.h -- uClinux flat-format executables
|
||||
*/
|
||||
|
||||
#ifndef __M68KNOMMU_FLAT_H__
|
||||
@@ -8,8 +8,9 @@
|
||||
#define flat_argvp_envp_on_stack() 1
|
||||
#define flat_old_ram_flag(flags) (flags)
|
||||
#define flat_reloc_valid(reloc, size) ((reloc) <= (size))
|
||||
#define flat_get_addr_from_rp(rp, relval, flags, p) get_unaligned(rp)
|
||||
#define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp)
|
||||
#define flat_get_addr_from_rp(rp, relval, flags, p) \
|
||||
({ unsigned long __val; __get_user_unaligned(__val, rp); __val; })
|
||||
#define flat_put_addr_at_rp(rp, val, relval) __put_user_unaligned(val, rp)
|
||||
#define flat_get_relocate_addr(rel) (rel)
|
||||
|
||||
static inline int flat_set_persistent(unsigned long relval,
|
||||
@@ -18,4 +19,10 @@ static inline int flat_set_persistent(unsigned long relval,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define FLAT_PLAT_INIT(regs) \
|
||||
do { \
|
||||
if (current->mm) \
|
||||
(regs)->d5 = current->mm->start_data; \
|
||||
} while (0)
|
||||
|
||||
#endif /* __M68KNOMMU_FLAT_H__ */
|
||||
|
@@ -110,7 +110,6 @@ struct thread_struct {
|
||||
#define setframeformat(_regs) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
/*
|
||||
* Do necessary setup to start up a newly executed thread.
|
||||
*/
|
||||
@@ -123,26 +122,14 @@ static inline void start_thread(struct pt_regs * regs, unsigned long pc,
|
||||
wrusp(usp);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
extern int handle_kernel_fault(struct pt_regs *regs);
|
||||
|
||||
#else
|
||||
|
||||
#define start_thread(_regs, _pc, _usp) \
|
||||
do { \
|
||||
(_regs)->pc = (_pc); \
|
||||
setframeformat(_regs); \
|
||||
if (current->mm) \
|
||||
(_regs)->d5 = current->mm->start_data; \
|
||||
(_regs)->sr &= ~0x2000; \
|
||||
wrusp(_usp); \
|
||||
} while(0)
|
||||
|
||||
static inline int handle_kernel_fault(struct pt_regs *regs)
|
||||
{
|
||||
/* Any fault in kernel is fatal on non-mmu */
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Forward declaration, a strange C thing */
|
||||
|
Reference in New Issue
Block a user