diff options
Diffstat (limited to 'arch/c6x')
-rw-r--r-- | arch/c6x/Kconfig | 22 | ||||
-rw-r--r-- | arch/c6x/include/asm/elf.h | 14 | ||||
-rw-r--r-- | arch/c6x/include/asm/kvm_para.h | 1 | ||||
-rw-r--r-- | arch/c6x/include/asm/mmu.h | 4 | ||||
-rw-r--r-- | arch/c6x/include/asm/processor.h | 3 | ||||
-rw-r--r-- | arch/c6x/include/asm/ptrace.h | 5 | ||||
-rw-r--r-- | arch/c6x/include/asm/thread_info.h | 17 | ||||
-rw-r--r-- | arch/c6x/kernel/process.c | 16 | ||||
-rw-r--r-- | arch/c6x/kernel/signal.c | 48 |
9 files changed, 38 insertions, 92 deletions
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig index 1c3ccd416d5..052f81a7623 100644 --- a/arch/c6x/Kconfig +++ b/arch/c6x/Kconfig @@ -3,7 +3,7 @@ # see Documentation/kbuild/kconfig-language.txt. # -config TMS320C6X +config C6X def_bool y select CLKDEV_LOOKUP select GENERIC_IRQ_SHOW @@ -15,40 +15,23 @@ config TMS320C6X select IRQ_DOMAIN select OF select OF_EARLY_FLATTREE + select GENERIC_CLOCKEVENTS config MMU def_bool n -config ZONE_DMA - def_bool y - config FPU def_bool n -config HIGHMEM - def_bool n - -config NUMA - def_bool n - config RWSEM_GENERIC_SPINLOCK def_bool y -config RWSEM_XCHGADD_ALGORITHM - def_bool n - config GENERIC_CALIBRATE_DELAY def_bool y config GENERIC_HWEIGHT def_bool y -config GENERIC_CLOCKEVENTS - def_bool y - -config GENERIC_CLOCKEVENTS_BROADCAST - bool - config GENERIC_BUG def_bool y @@ -137,7 +120,6 @@ source "mm/Kconfig" source "kernel/Kconfig.preempt" source "kernel/Kconfig.hz" -source "kernel/time/Kconfig" endmenu diff --git a/arch/c6x/include/asm/elf.h b/arch/c6x/include/asm/elf.h index d57865ba2c4..f4552db20b4 100644 --- a/arch/c6x/include/asm/elf.h +++ b/arch/c6x/include/asm/elf.h @@ -30,7 +30,19 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; */ #define elf_check_arch(x) ((x)->e_machine == EM_TI_C6000) -#define elf_check_const_displacement(x) (1) +#define elf_check_fdpic(x) (1) +#define elf_check_const_displacement(x) (0) + +#define ELF_FDPIC_PLAT_INIT(_regs, _exec_map, _interp_map, _dynamic_addr) \ +do { \ + _regs->b4 = (_exec_map); \ + _regs->a6 = (_interp_map); \ + _regs->b6 = (_dynamic_addr); \ +} while (0) + +#define ELF_FDPIC_CORE_EFLAGS 0 + +#define ELF_CORE_COPY_FPREGS(...) 0 /* No FPU regs to copy */ /* * These are used to set parameters in the core dumps. diff --git a/arch/c6x/include/asm/kvm_para.h b/arch/c6x/include/asm/kvm_para.h new file mode 100644 index 00000000000..14fab8f0b95 --- /dev/null +++ b/arch/c6x/include/asm/kvm_para.h @@ -0,0 +1 @@ +#include <asm-generic/kvm_para.h> diff --git a/arch/c6x/include/asm/mmu.h b/arch/c6x/include/asm/mmu.h index 41592bf1606..4467e770a1c 100644 --- a/arch/c6x/include/asm/mmu.h +++ b/arch/c6x/include/asm/mmu.h @@ -13,6 +13,10 @@ 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/processor.h b/arch/c6x/include/asm/processor.h index 3ff7fab956b..c50af7ef1c9 100644 --- a/arch/c6x/include/asm/processor.h +++ b/arch/c6x/include/asm/processor.h @@ -92,9 +92,6 @@ static inline void release_thread(struct task_struct *dead_task) { } -/* Prepare to copy thread state - unlazy all lazy status */ -#define prepare_to_copy(tsk) do { } while (0) - extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); #define copy_segments(tsk, mm) do { } while (0) diff --git a/arch/c6x/include/asm/ptrace.h b/arch/c6x/include/asm/ptrace.h index 21e8d7931fe..b04ff596425 100644 --- a/arch/c6x/include/asm/ptrace.h +++ b/arch/c6x/include/asm/ptrace.h @@ -97,6 +97,11 @@ #define PT_DP PT_B14 /* Data Segment Pointer (B14) */ #define PT_SP PT_B15 /* Stack Pointer (B15) */ +#define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */ + +#define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ +#define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ + #ifndef __ASSEMBLY__ #ifdef _BIG_ENDIAN diff --git a/arch/c6x/include/asm/thread_info.h b/arch/c6x/include/asm/thread_info.h index fd99148cda9..1710bcbb8d0 100644 --- a/arch/c6x/include/asm/thread_info.h +++ b/arch/c6x/include/asm/thread_info.h @@ -20,11 +20,11 @@ #ifdef CONFIG_4KSTACKS #define THREAD_SIZE 4096 #define THREAD_SHIFT 12 -#define THREAD_ORDER 0 +#define THREAD_SIZE_ORDER 0 #else #define THREAD_SIZE 8192 #define THREAD_SHIFT 13 -#define THREAD_ORDER 1 +#define THREAD_SIZE_ORDER 1 #endif #define THREAD_START_SP (THREAD_SIZE - 8) @@ -80,19 +80,6 @@ struct thread_info *current_thread_info(void) return ti; } -#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR - -/* thread information allocation */ -#ifdef CONFIG_DEBUG_STACK_USAGE -#define THREAD_FLAGS (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO) -#else -#define THREAD_FLAGS (GFP_KERNEL | __GFP_NOTRACK) -#endif - -#define alloc_thread_info_node(tsk, node) \ - ((struct thread_info *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER)) - -#define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER) #define get_thread_info(ti) get_task_struct((ti)->task) #define put_thread_info(ti) put_task_struct((ti)->task) #endif /* __ASSEMBLY__ */ diff --git a/arch/c6x/kernel/process.c b/arch/c6x/kernel/process.c index 7ca8c41b03c..45e924a636a 100644 --- a/arch/c6x/kernel/process.c +++ b/arch/c6x/kernel/process.c @@ -26,22 +26,6 @@ void (*c6x_halt)(void); extern asmlinkage void ret_from_fork(void); -static struct signal_struct init_signals = INIT_SIGNALS(init_signals); -static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); - -/* - * Initial thread structure. - */ -union thread_union init_thread_union __init_task_data = { - INIT_THREAD_INFO(init_task) -}; - -/* - * Initial task structure. - */ -struct task_struct init_task = INIT_TASK(init_task); -EXPORT_SYMBOL(init_task); - /* * power off function, if any */ diff --git a/arch/c6x/kernel/signal.c b/arch/c6x/kernel/signal.c index 3b5a0509998..3d8f3c22a94 100644 --- a/arch/c6x/kernel/signal.c +++ b/arch/c6x/kernel/signal.c @@ -20,8 +20,6 @@ #include <asm/cacheflush.h> -#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) - /* * Do a signal return, undo the signal stack. */ @@ -69,6 +67,9 @@ asmlinkage int do_rt_sigreturn(struct pt_regs *regs) struct rt_sigframe __user *frame; sigset_t set; + /* Always make any pending restarted system calls return -EINTR */ + current_thread_info()->restart_block.fn = do_no_restart_syscall; + /* * Since we stacked the signal on a dword boundary, * 'sp' should be dword aligned here. If it's @@ -84,7 +85,6 @@ asmlinkage int do_rt_sigreturn(struct pt_regs *regs) if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) goto badframe; - sigdelsetmask(&set, ~_BLOCKABLE); set_current_blocked(&set); if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) @@ -245,10 +245,9 @@ do_restart: /* * handle the actual delivery of a signal to userspace */ -static int handle_signal(int sig, +static void handle_signal(int sig, siginfo_t *info, struct k_sigaction *ka, - sigset_t *oldset, struct pt_regs *regs, - int syscall) + struct pt_regs *regs, int syscall) { int ret; @@ -275,11 +274,9 @@ static int handle_signal(int sig, } /* Set up the stack frame */ - ret = setup_rt_frame(sig, ka, info, oldset, regs); - if (ret == 0) - block_sigmask(ka, sig); - - return ret; + if (setup_rt_frame(sig, ka, info, sigmask_to_save(), regs) < 0) + return; + signal_delivered(sig, info, ka, regs, 0); } /* @@ -289,7 +286,6 @@ static void do_signal(struct pt_regs *regs, int syscall) { struct k_sigaction ka; siginfo_t info; - sigset_t *oldset; int signr; /* we want the common case to go fast, which is why we may in certain @@ -297,25 +293,9 @@ static void do_signal(struct pt_regs *regs, int syscall) if (!user_mode(regs)) return; - if (test_thread_flag(TIF_RESTORE_SIGMASK)) - oldset = ¤t->saved_sigmask; - else - oldset = ¤t->blocked; - signr = get_signal_to_deliver(&info, &ka, regs, NULL); if (signr > 0) { - if (handle_signal(signr, &info, &ka, oldset, - regs, syscall) == 0) { - /* a signal was successfully delivered; the saved - * sigmask will have been stored in the signal frame, - * and will be restored by sigreturn, so we can simply - * clear the TIF_RESTORE_SIGMASK flag */ - if (test_thread_flag(TIF_RESTORE_SIGMASK)) - clear_thread_flag(TIF_RESTORE_SIGMASK); - - tracehook_signal_handler(signr, &info, &ka, regs, 0); - } - + handle_signal(signr, &info, &ka, regs, syscall); return; } @@ -340,10 +320,7 @@ static void do_signal(struct pt_regs *regs, int syscall) /* if there's no signal to deliver, we just put the saved sigmask * back */ - if (test_thread_flag(TIF_RESTORE_SIGMASK)) { - clear_thread_flag(TIF_RESTORE_SIGMASK); - sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); - } + restore_saved_sigmask(); } /* @@ -354,14 +331,11 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags, int syscall) { /* deal with pending signal delivery */ - if (thread_info_flags & ((1 << TIF_SIGPENDING) | - (1 << TIF_RESTORE_SIGMASK))) + if (thread_info_flags & (1 << TIF_SIGPENDING)) do_signal(regs, syscall); if (thread_info_flags & (1 << TIF_NOTIFY_RESUME)) { clear_thread_flag(TIF_NOTIFY_RESUME); tracehook_notify_resume(regs); - if (current->replacement_session_keyring) - key_replace_session_keyring(); } } |