diff options
Diffstat (limited to 'arch/c6x')
-rw-r--r-- | arch/c6x/Kconfig | 1 | ||||
-rw-r--r-- | arch/c6x/Makefile | 2 | ||||
-rw-r--r-- | arch/c6x/boot/Makefile | 20 | ||||
-rw-r--r-- | arch/c6x/boot/dts/Makefile | 20 | ||||
-rw-r--r-- | arch/c6x/boot/dts/linked_dtb.S | 2 | ||||
-rw-r--r-- | arch/c6x/boot/linked_dtb.S | 2 | ||||
-rw-r--r-- | arch/c6x/include/asm/Kbuild | 2 | ||||
-rw-r--r-- | arch/c6x/include/asm/dma-mapping.h | 1 | ||||
-rw-r--r-- | arch/c6x/include/asm/mmu.h | 22 | ||||
-rw-r--r-- | arch/c6x/include/asm/syscalls.h | 4 | ||||
-rw-r--r-- | arch/c6x/include/uapi/asm/unistd.h | 3 | ||||
-rw-r--r-- | arch/c6x/kernel/entry.S | 24 | ||||
-rw-r--r-- | arch/c6x/kernel/process.c | 25 |
13 files changed, 33 insertions, 95 deletions
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig index aee1b569ee6e..f6a3648f5ec3 100644 --- a/arch/c6x/Kconfig +++ b/arch/c6x/Kconfig @@ -17,7 +17,6 @@ config C6X select OF select OF_EARLY_FLATTREE select GENERIC_CLOCKEVENTS - select GENERIC_KERNEL_THREAD select MODULES_USE_ELF_RELA config MMU diff --git a/arch/c6x/Makefile b/arch/c6x/Makefile index a9eb9597e03c..e72eb3417239 100644 --- a/arch/c6x/Makefile +++ b/arch/c6x/Makefile @@ -41,7 +41,7 @@ DTB:=$(subst dtbImage.,,$(filter dtbImage.%, $(MAKECMDGOALS))) export DTB ifneq ($(DTB),) -core-y += $(boot)/ +core-y += $(boot)/dts/ endif # With make 3.82 we cannot mix normal and wildcard targets diff --git a/arch/c6x/boot/Makefile b/arch/c6x/boot/Makefile index 6891257d514c..8734abee548e 100644 --- a/arch/c6x/boot/Makefile +++ b/arch/c6x/boot/Makefile @@ -6,25 +6,5 @@ OBJCOPYFLAGS_vmlinux.bin := -O binary $(obj)/vmlinux.bin: vmlinux FORCE $(call if_changed,objcopy) -DTC_FLAGS ?= -p 1024 - -ifneq ($(DTB),) -obj-y += linked_dtb.o -endif - -$(obj)/%.dtb: $(src)/dts/%.dts FORCE - $(call if_changed_dep,dtc) - -quiet_cmd_cp = CP $< $@$2 - cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false) - -# Generate builtin.dtb from $(DTB).dtb -$(obj)/builtin.dtb: $(obj)/$(DTB).dtb - $(call if_changed,cp) - -$(obj)/linked_dtb.o: $(obj)/builtin.dtb - $(obj)/dtbImage.%: vmlinux $(call if_changed,objcopy) - -clean-files := $(obj)/*.dtb diff --git a/arch/c6x/boot/dts/Makefile b/arch/c6x/boot/dts/Makefile new file mode 100644 index 000000000000..c7528b02d061 --- /dev/null +++ b/arch/c6x/boot/dts/Makefile @@ -0,0 +1,20 @@ +# +# Makefile for device trees +# + +DTC_FLAGS ?= -p 1024 + +ifneq ($(DTB),) +obj-y += linked_dtb.o +endif + +quiet_cmd_cp = CP $< $@$2 + cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false) + +# Generate builtin.dtb from $(DTB).dtb +$(obj)/builtin.dtb: $(obj)/$(DTB).dtb + $(call if_changed,cp) + +$(obj)/linked_dtb.o: $(obj)/builtin.dtb + +clean-files := *.dtb diff --git a/arch/c6x/boot/dts/linked_dtb.S b/arch/c6x/boot/dts/linked_dtb.S new file mode 100644 index 000000000000..cf347f1d16ce --- /dev/null +++ b/arch/c6x/boot/dts/linked_dtb.S @@ -0,0 +1,2 @@ +.section __fdt_blob,"a" +.incbin "arch/c6x/boot/dts/builtin.dtb" diff --git a/arch/c6x/boot/linked_dtb.S b/arch/c6x/boot/linked_dtb.S deleted file mode 100644 index 57a4454eaec3..000000000000 --- a/arch/c6x/boot/linked_dtb.S +++ /dev/null @@ -1,2 +0,0 @@ -.section __fdt_blob,"a" -.incbin "arch/c6x/boot/builtin.dtb" diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild index 112a496d8355..4258b088aa93 100644 --- a/arch/c6x/include/asm/Kbuild +++ b/arch/c6x/include/asm/Kbuild @@ -25,6 +25,7 @@ generic-y += kdebug.h generic-y += kmap_types.h generic-y += local.h generic-y += mman.h +generic-y += mmu.h generic-y += mmu_context.h generic-y += msgbuf.h generic-y += param.h @@ -49,6 +50,7 @@ generic-y += termbits.h generic-y += termios.h generic-y += tlbflush.h generic-y += topology.h +generic-y += trace_clock.h generic-y += types.h generic-y += ucontext.h generic-y += user.h diff --git a/arch/c6x/include/asm/dma-mapping.h b/arch/c6x/include/asm/dma-mapping.h index 03579fd99dba..3c694065030f 100644 --- a/arch/c6x/include/asm/dma-mapping.h +++ b/arch/c6x/include/asm/dma-mapping.h @@ -32,6 +32,7 @@ static inline int dma_set_mask(struct device *dev, u64 dma_mask) */ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) { + debug_dma_mapping_error(dev, dma_addr); return dma_addr == ~0; } diff --git a/arch/c6x/include/asm/mmu.h b/arch/c6x/include/asm/mmu.h deleted file mode 100644 index 4467e770a1ce..000000000000 --- a/arch/c6x/include/asm/mmu.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Port on Texas Instruments TMS320C6x architecture - * - * Copyright (C) 2004, 2009, 2010 Texas Instruments Incorporated - * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#ifndef _ASM_C6X_MMU_H -#define _ASM_C6X_MMU_H - -typedef struct { - unsigned long end_brk; -#ifdef CONFIG_BINFMT_ELF_FDPIC - unsigned long exec_fdpic_loadmap; - unsigned long interp_fdpic_loadmap; -#endif -} mm_context_t; - -#endif /* _ASM_C6X_MMU_H */ diff --git a/arch/c6x/include/asm/syscalls.h b/arch/c6x/include/asm/syscalls.h index e7b8991dc07c..df3d05feb153 100644 --- a/arch/c6x/include/asm/syscalls.h +++ b/arch/c6x/include/asm/syscalls.h @@ -41,10 +41,6 @@ extern long sys_fallocate_c6x(int fd, int mode, u32 len_lo, u32 len_hi); extern int sys_cache_sync(unsigned long s, unsigned long e); -struct pt_regs; - -extern asmlinkage long sys_c6x_clone(struct pt_regs *regs); - #include <asm-generic/syscalls.h> #endif /* __ASM_C6X_SYSCALLS_H */ diff --git a/arch/c6x/include/uapi/asm/unistd.h b/arch/c6x/include/uapi/asm/unistd.h index 4ff747d12dad..e7d09a614d10 100644 --- a/arch/c6x/include/uapi/asm/unistd.h +++ b/arch/c6x/include/uapi/asm/unistd.h @@ -14,8 +14,7 @@ * more details. */ -#define __ARCH_WANT_KERNEL_EXECVE -#define __ARCH_WANT_SYS_EXECVE +#define __ARCH_WANT_SYS_CLONE /* Use the standard ABI for syscalls. */ #include <asm-generic/unistd.h> diff --git a/arch/c6x/kernel/entry.S b/arch/c6x/kernel/entry.S index 0ed6157dd256..5239057de4c4 100644 --- a/arch/c6x/kernel/entry.S +++ b/arch/c6x/kernel/entry.S @@ -415,19 +415,9 @@ ENTRY(ret_from_kernel_thread) 0: B .S2 B10 /* call fn */ LDW .D2T1 *+SP(REGS_A1+8),A4 /* get arg */ - MVKL .S2 sys_exit,B11 - MVKH .S2 sys_exit,B11 - ADDKPC .S2 0f,B3,1 -0: - BNOP .S2 B11,5 /* jump to sys_exit */ + ADDKPC .S2 ret_from_fork_2,B3,3 ENDPROC(ret_from_kernel_thread) -ENTRY(ret_from_kernel_execve) - GET_THREAD_INFO A12 - BNOP .S2 syscall_exit,4 - ADD .D2X A4,-8,SP -ENDPROC(ret_from_kernel_execve) - ;; ;; These are the interrupt handlers, responsible for calling c6x_do_IRQ() ;; @@ -624,18 +614,6 @@ ENDPROC(sys_sigaltstack) ;; Special system calls ;; return address is in B3 ;; -ENTRY(sys_clone) - ADD .D1X SP,8,A4 -#ifdef CONFIG_C6X_BIG_KERNEL - || MVKL .S1 sys_c6x_clone,A0 - MVKH .S1 sys_c6x_clone,A0 - BNOP .S2X A0,5 -#else - || B .S2 sys_c6x_clone - NOP 5 -#endif -ENDPROC(sys_clone) - ENTRY(sys_rt_sigreturn) ADD .D1X SP,8,A4 #ifdef CONFIG_C6X_BIG_KERNEL diff --git a/arch/c6x/kernel/process.c b/arch/c6x/kernel/process.c index 2770d9a9a84e..6434df476f77 100644 --- a/arch/c6x/kernel/process.c +++ b/arch/c6x/kernel/process.c @@ -112,22 +112,6 @@ void exit_thread(void) { } -SYSCALL_DEFINE1(c6x_clone, struct pt_regs *, regs) -{ - unsigned long clone_flags; - unsigned long newsp; - - /* syscall puts clone_flags in A4 and usp in B4 */ - clone_flags = regs->orig_a4; - if (regs->b4) - newsp = regs->b4; - else - newsp = regs->sp; - - return do_fork(clone_flags, newsp, regs, 0, (int __user *)regs->a6, - (int __user *)regs->b6); -} - /* * Do necessary setup to start up a newly executed thread. */ @@ -155,13 +139,13 @@ void start_thread(struct pt_regs *regs, unsigned int pc, unsigned long usp) */ int copy_thread(unsigned long clone_flags, unsigned long usp, unsigned long ustk_size, - struct task_struct *p, struct pt_regs *regs) + struct task_struct *p) { struct pt_regs *childregs; childregs = task_pt_regs(p); - if (!regs) { + if (unlikely(p->flags & PF_KTHREAD)) { /* case of __kernel_thread: we return to supervisor space */ memset(childregs, 0, sizeof(struct pt_regs)); childregs->sp = (unsigned long)(childregs + 1); @@ -170,8 +154,9 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, childregs->a1 = ustk_size; /* argument */ } else { /* Otherwise use the given stack */ - *childregs = *regs; - childregs->sp = usp; + *childregs = *current_pt_regs(); + if (usp) + childregs->sp = usp; p->thread.pc = (unsigned long) ret_from_fork; } |