diff options
Diffstat (limited to 'arch/sh/kernel')
| -rw-r--r-- | arch/sh/kernel/Makefile | 2 | ||||
| -rw-r--r-- | arch/sh/kernel/idle.c | 20 | ||||
| -rw-r--r-- | arch/sh/kernel/init_task.c | 30 | ||||
| -rw-r--r-- | arch/sh/kernel/process.c | 46 | ||||
| -rw-r--r-- | arch/sh/kernel/ptrace_32.c | 2 | ||||
| -rw-r--r-- | arch/sh/kernel/ptrace_64.c | 2 | ||||
| -rw-r--r-- | arch/sh/kernel/smp.c | 14 | 
7 files changed, 6 insertions, 110 deletions
diff --git a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile index 77f7ae1d464..88571ff8eee 100644 --- a/arch/sh/kernel/Makefile +++ b/arch/sh/kernel/Makefile @@ -2,7 +2,7 @@  # Makefile for the Linux/SuperH kernel.  # -extra-y	:= head_$(BITS).o init_task.o vmlinux.lds +extra-y	:= head_$(BITS).o vmlinux.lds  ifdef CONFIG_FUNCTION_TRACER  # Do not profile debug and lowlevel utilities diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c index ee226e20c20..0c910163caa 100644 --- a/arch/sh/kernel/idle.c +++ b/arch/sh/kernel/idle.c @@ -132,10 +132,6 @@ void __init select_idle_routine(void)  		pm_idle = poll_idle;  } -static void do_nothing(void *unused) -{ -} -  void stop_this_cpu(void *unused)  {  	local_irq_disable(); @@ -144,19 +140,3 @@ void stop_this_cpu(void *unused)  	for (;;)  		cpu_sleep();  } - -/* - * cpu_idle_wait - Used to ensure that all the CPUs discard old value of - * pm_idle and update to new pm_idle value. Required while changing pm_idle - * handler on SMP systems. - * - * Caller must have changed pm_idle to the new value before the call. Old - * pm_idle value will not be used by any CPU after the return of this function. - */ -void cpu_idle_wait(void) -{ -	smp_mb(); -	/* kick all the CPUs so that they exit out of pm_idle */ -	smp_call_function(do_nothing, NULL, 1); -} -EXPORT_SYMBOL_GPL(cpu_idle_wait); diff --git a/arch/sh/kernel/init_task.c b/arch/sh/kernel/init_task.c deleted file mode 100644 index 11f2ea556a6..00000000000 --- a/arch/sh/kernel/init_task.c +++ /dev/null @@ -1,30 +0,0 @@ -#include <linux/mm.h> -#include <linux/module.h> -#include <linux/sched.h> -#include <linux/init_task.h> -#include <linux/mqueue.h> -#include <linux/fs.h> -#include <asm/uaccess.h> -#include <asm/pgtable.h> - -static struct signal_struct init_signals = INIT_SIGNALS(init_signals); -static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); -struct pt_regs fake_swapper_regs; -/* - * Initial thread structure. - * - * We need to make sure that this is 8192-byte 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/sh/kernel/process.c b/arch/sh/kernel/process.c index 325f98b1736..f2621abdf01 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c @@ -29,52 +29,10 @@ void free_thread_xstate(struct task_struct *tsk)  	}  } -#if THREAD_SHIFT < PAGE_SHIFT -static struct kmem_cache *thread_info_cache; - -struct thread_info *alloc_thread_info_node(struct task_struct *tsk, int node) -{ -	struct thread_info *ti; -#ifdef CONFIG_DEBUG_STACK_USAGE -	gfp_t mask = GFP_KERNEL | __GFP_ZERO; -#else -	gfp_t mask = GFP_KERNEL; -#endif - -	ti = kmem_cache_alloc_node(thread_info_cache, mask, node); -	return ti; -} - -void free_thread_info(struct thread_info *ti) -{ -	free_thread_xstate(ti->task); -	kmem_cache_free(thread_info_cache, ti); -} - -void thread_info_cache_init(void) -{ -	thread_info_cache = kmem_cache_create("thread_info", THREAD_SIZE, -					      THREAD_SIZE, SLAB_PANIC, NULL); -} -#else -struct thread_info *alloc_thread_info_node(struct task_struct *tsk, int node) -{ -#ifdef CONFIG_DEBUG_STACK_USAGE -	gfp_t mask = GFP_KERNEL | __GFP_ZERO; -#else -	gfp_t mask = GFP_KERNEL; -#endif -	struct page *page = alloc_pages_node(node, mask, THREAD_SIZE_ORDER); - -	return page ? page_address(page) : NULL; -} - -void free_thread_info(struct thread_info *ti) +void arch_release_task_struct(struct task_struct *tsk)  { -	free_thread_xstate(ti->task); -	free_pages((unsigned long)ti, THREAD_SIZE_ORDER); +	free_thread_xstate(tsk);  } -#endif /* THREAD_SHIFT < PAGE_SHIFT */  void arch_task_cache_init(void)  { diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c index 9698671444e..81f999a672f 100644 --- a/arch/sh/kernel/ptrace_32.c +++ b/arch/sh/kernel/ptrace_32.c @@ -503,7 +503,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)  {  	long ret = 0; -	secure_computing(regs->regs[0]); +	secure_computing_strict(regs->regs[0]);  	if (test_thread_flag(TIF_SYSCALL_TRACE) &&  	    tracehook_report_syscall_entry(regs)) diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c index bc81e07dc09..af90339dadc 100644 --- a/arch/sh/kernel/ptrace_64.c +++ b/arch/sh/kernel/ptrace_64.c @@ -522,7 +522,7 @@ asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs)  {  	long long ret = 0; -	secure_computing(regs->regs[9]); +	secure_computing_strict(regs->regs[9]);  	if (test_thread_flag(TIF_SYSCALL_TRACE) &&  	    tracehook_report_syscall_entry(regs)) diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index eaebdf6a5c7..b86e9ca7945 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c @@ -220,22 +220,10 @@ extern struct {  	void *thread_info;  } stack_start; -int __cpuinit __cpu_up(unsigned int cpu) +int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tsk)  { -	struct task_struct *tsk;  	unsigned long timeout; -	tsk = cpu_data[cpu].idle; -	if (!tsk) { -		tsk = fork_idle(cpu); -		if (IS_ERR(tsk)) { -			pr_err("Failed forking idle task for cpu %d\n", cpu); -			return PTR_ERR(tsk); -		} - -		cpu_data[cpu].idle = tsk; -	} -  	per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;  	/* Fill in data in head.S for secondary cpus */  |