diff options
Diffstat (limited to 'arch/score')
-rw-r--r-- | arch/score/Kconfig | 5 | ||||
-rw-r--r-- | arch/score/include/asm/processor.h | 1 | ||||
-rw-r--r-- | arch/score/include/asm/thread_info.h | 10 | ||||
-rw-r--r-- | arch/score/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/score/kernel/init_task.c | 46 | ||||
-rw-r--r-- | arch/score/kernel/signal.c | 29 |
6 files changed, 20 insertions, 73 deletions
diff --git a/arch/score/Kconfig b/arch/score/Kconfig index 4b285779ac05..ba0f412920be 100644 --- a/arch/score/Kconfig +++ b/arch/score/Kconfig @@ -9,6 +9,7 @@ config SCORE select HAVE_MEMBLOCK_NODE_MAP select ARCH_DISCARD_MEMBLOCK select GENERIC_CPU_DEVICES + select GENERIC_CLOCKEVENTS choice prompt "System type" @@ -51,9 +52,6 @@ config GENERIC_HWEIGHT config GENERIC_CALIBRATE_DELAY def_bool y -config GENERIC_CLOCKEVENTS - def_bool y - menu "Kernel type" config 32BIT @@ -68,7 +66,6 @@ config MEMORY_START hex default 0xa0000000 -source "kernel/time/Kconfig" source "kernel/Kconfig.hz" source "kernel/Kconfig.preempt" diff --git a/arch/score/include/asm/processor.h b/arch/score/include/asm/processor.h index 7e22f216d771..ab3aceb54209 100644 --- a/arch/score/include/asm/processor.h +++ b/arch/score/include/asm/processor.h @@ -26,7 +26,6 @@ extern unsigned long get_wchan(struct task_struct *p); #define cpu_relax() barrier() #define release_thread(thread) do {} while (0) -#define prepare_to_copy(tsk) do {} while (0) /* * User space process size: 2GB. This is hardcoded into a few places, diff --git a/arch/score/include/asm/thread_info.h b/arch/score/include/asm/thread_info.h index 2205c62284db..a18006e97f1c 100644 --- a/arch/score/include/asm/thread_info.h +++ b/arch/score/include/asm/thread_info.h @@ -11,10 +11,9 @@ #include <linux/const.h> /* thread information allocation */ -#define THREAD_SIZE_ORDER (1) -#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) -#define THREAD_MASK (THREAD_SIZE - _AC(1,UL)) -#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR +#define THREAD_SIZE_ORDER (1) +#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) +#define THREAD_MASK (THREAD_SIZE - _AC(1,UL)) #ifndef __ASSEMBLY__ @@ -71,9 +70,6 @@ struct thread_info { register struct thread_info *__current_thread_info __asm__("r28"); #define current_thread_info() __current_thread_info -#define alloc_thread_info_node(tsk, node) kmalloc_node(THREAD_SIZE, GFP_KERNEL, node) -#define free_thread_info(info) kfree(info) - #endif /* !__ASSEMBLY__ */ #define PREEMPT_ACTIVE 0x10000000 diff --git a/arch/score/kernel/Makefile b/arch/score/kernel/Makefile index f218673b5d3d..fb1802b3f542 100644 --- a/arch/score/kernel/Makefile +++ b/arch/score/kernel/Makefile @@ -4,7 +4,7 @@ extra-y := head.o vmlinux.lds -obj-y += entry.o init_task.o irq.o process.o ptrace.o \ +obj-y += entry.o irq.o process.o ptrace.o \ setup.o signal.o sys_score.o time.o traps.o \ sys_call_table.o diff --git a/arch/score/kernel/init_task.c b/arch/score/kernel/init_task.c deleted file mode 100644 index baa03ee217d1..000000000000 --- a/arch/score/kernel/init_task.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * arch/score/kernel/init_task.c - * - * Score Processor version. - * - * Copyright (C) 2009 Sunplus Core Technology Co., Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see the file COPYING, or write - * to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include <linux/init_task.h> -#include <linux/mqueue.h> - -static struct signal_struct init_signals = INIT_SIGNALS(init_signals); -static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); - -/* - * Initial thread structure. - * - * We need to make sure that this is THREAD_SIZE aligned due to the - * way process stacks are handled. This is done by having a special - * "init_task" linker map entry.. - */ -union thread_union init_thread_union __init_task_data = - { INIT_THREAD_INFO(init_task) }; - -/* - * Initial task structure. - * - * All other task structs will be allocated on slabs in fork.c - */ -struct task_struct init_task = INIT_TASK(init_task); -EXPORT_SYMBOL(init_task); diff --git a/arch/score/kernel/signal.c b/arch/score/kernel/signal.c index aa57440e4973..d4a49011c48a 100644 --- a/arch/score/kernel/signal.c +++ b/arch/score/kernel/signal.c @@ -28,6 +28,7 @@ #include <linux/ptrace.h> #include <linux/unistd.h> #include <linux/uaccess.h> +#include <linux/tracehook.h> #include <asm/cacheflush.h> #include <asm/syscalls.h> @@ -152,6 +153,9 @@ score_rt_sigreturn(struct pt_regs *regs) stack_t st; int sig; + /* Always make any pending restarted system calls return -EINTR */ + current_thread_info()->restart_block.fn = do_no_restart_syscall; + frame = (struct rt_sigframe __user *) regs->regs[0]; if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) goto badframe; @@ -159,10 +163,7 @@ score_rt_sigreturn(struct pt_regs *regs) goto badframe; sigdelsetmask(&set, ~_BLOCKABLE); - spin_lock_irq(¤t->sighand->siglock); - current->blocked = set; - recalc_sigpending(); - spin_unlock_irq(¤t->sighand->siglock); + set_current_blocked(&set); sig = restore_sigcontext(regs, &frame->rs_uc.uc_mcontext); if (sig < 0) @@ -236,9 +237,7 @@ static int setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs, return 0; give_sigsegv: - if (signr == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(signr, current); return -EFAULT; } @@ -272,12 +271,8 @@ static int handle_signal(unsigned long sig, siginfo_t *info, */ ret = setup_rt_frame(ka, regs, sig, oldset, info); - spin_lock_irq(¤t->sighand->siglock); - sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); - if (!(ka->sa.sa_flags & SA_NODEFER)) - sigaddset(¤t->blocked, sig); - recalc_sigpending(); - spin_unlock_irq(¤t->sighand->siglock); + if (ret == 0) + block_sigmask(ka, sig); return ret; } @@ -356,6 +351,12 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) { /* deal with pending signal delivery */ - if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) + if (thread_info_flags & _TIF_SIGPENDING) do_signal(regs); + if (thread_info_flags & _TIF_NOTIFY_RESUME) { + clear_thread_flag(TIF_NOTIFY_RESUME); + tracehook_notify_resume(regs); + if (current->replacement_session_keyring) + key_replace_session_keyring(); + } } |