diff options
Diffstat (limited to 'arch/arm/kernel/process.c')
| -rw-r--r-- | arch/arm/kernel/process.c | 35 | 
1 files changed, 19 insertions, 16 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 94f6b05f9e2..81ef686a91c 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -30,7 +30,6 @@  #include <linux/uaccess.h>  #include <linux/random.h>  #include <linux/hw_breakpoint.h> -#include <linux/cpuidle.h>  #include <linux/leds.h>  #include <linux/reboot.h> @@ -39,6 +38,7 @@  #include <asm/processor.h>  #include <asm/thread_notify.h>  #include <asm/stacktrace.h> +#include <asm/system_misc.h>  #include <asm/mach/time.h>  #include <asm/tls.h> @@ -48,14 +48,14 @@ unsigned long __stack_chk_guard __read_mostly;  EXPORT_SYMBOL(__stack_chk_guard);  #endif -static const char *processor_modes[] = { +static const char *processor_modes[] __maybe_unused = {    "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" ,    "UK8_26" , "UK9_26" , "UK10_26", "UK11_26", "UK12_26", "UK13_26", "UK14_26", "UK15_26",    "USER_32", "FIQ_32" , "IRQ_32" , "SVC_32" , "UK4_32" , "UK5_32" , "UK6_32" , "ABT_32" ,    "UK8_32" , "UK9_32" , "UK10_32", "UND_32" , "UK12_32", "UK13_32", "UK14_32", "SYS_32"  }; -static const char *isa_modes[] = { +static const char *isa_modes[] __maybe_unused = {    "ARM" , "Thumb" , "Jazelle", "ThumbEE"  }; @@ -100,7 +100,7 @@ void soft_restart(unsigned long addr)  	u64 *stack = soft_restart_stack + ARRAY_SIZE(soft_restart_stack);  	/* Disable interrupts first */ -	local_irq_disable(); +	raw_local_irq_disable();  	local_fiq_disable();  	/* Disable the L2 if we're the last man standing. */ @@ -133,7 +133,11 @@ EXPORT_SYMBOL_GPL(arm_pm_restart);  void (*arm_pm_idle)(void); -static void default_idle(void) +/* + * Called from the core idle loop. + */ + +void arch_cpu_idle(void)  {  	if (arm_pm_idle)  		arm_pm_idle(); @@ -168,15 +172,6 @@ void arch_cpu_idle_dead(void)  #endif  /* - * Called from the core idle loop. - */ -void arch_cpu_idle(void) -{ -	if (cpuidle_idle_call()) -		default_idle(); -} - -/*   * Called by kexec, immediately prior to machine_kexec().   *   * This must completely disable all secondary CPUs; simply causing those CPUs @@ -276,12 +271,17 @@ void __show_regs(struct pt_regs *regs)  	buf[3] = flags & PSR_V_BIT ? 'V' : 'v';  	buf[4] = '\0'; +#ifndef CONFIG_CPU_V7M  	printk("Flags: %s  IRQs o%s  FIQs o%s  Mode %s  ISA %s  Segment %s\n",  		buf, interrupts_enabled(regs) ? "n" : "ff",  		fast_interrupts_enabled(regs) ? "n" : "ff",  		processor_modes[processor_mode(regs)],  		isa_modes[isa_mode(regs)],  		get_fs() == get_ds() ? "kernel" : "user"); +#else +	printk("xPSR: %08lx\n", regs->ARM_cpsr); +#endif +  #ifdef CONFIG_CPU_CP15  	{  		unsigned int ctrl; @@ -404,6 +404,7 @@ EXPORT_SYMBOL(dump_fpu);  unsigned long get_wchan(struct task_struct *p)  {  	struct stackframe frame; +	unsigned long stack_page;  	int count = 0;  	if (!p || p == current || p->state == TASK_RUNNING)  		return 0; @@ -412,9 +413,11 @@ unsigned long get_wchan(struct task_struct *p)  	frame.sp = thread_saved_sp(p);  	frame.lr = 0;			/* recovered from the stack */  	frame.pc = thread_saved_pc(p); +	stack_page = (unsigned long)task_stack_page(p);  	do { -		int ret = unwind_frame(&frame); -		if (ret < 0) +		if (frame.sp < stack_page || +		    frame.sp >= stack_page + THREAD_SIZE || +		    unwind_frame(&frame) < 0)  			return 0;  		if (!in_sched_functions(frame.pc))  			return frame.pc;  | 
