From 06aca92424c2a53a9e26cb81c1d6a829af9491b8 Mon Sep 17 00:00:00 2001 From: Rabin Vincent Date: Thu, 19 Feb 2015 18:20:09 +0100 Subject: CRISv32: don't enable irqs in INIT_THREAD INIT_THREAD enables interrupts in the thread_struct's saved flags. This means that interrupts get enabled in the middle of context_switch() while switching to new tasks that get forked off the init task during boot. Don't do this. Fixes the following splat on boot with spinlock debugging on: BUG: spinlock cpu recursion on CPU#0, swapper/2 lock: runqueues+0x0/0x47c, .magic: dead4ead, .owner: swapper/0, .owner_cpu: 0 CPU: 0 PID: 2 Comm: swapper Not tainted 3.19.0-08796-ga747b55 #285 Call Trace: [] spin_bug+0x2a/0x36 [] do_raw_spin_lock+0xa2/0x126 [] _raw_spin_lock+0x20/0x2a [] scheduler_tick+0x22/0x76 [] update_process_times+0x5e/0x72 [] timer_interrupt+0x4e/0x6a [] handle_irq_event_percpu+0x54/0xf2 [] handle_irq_event+0x50/0x74 [] handle_simple_irq+0x6c/0xbe [] generic_handle_irq+0x2a/0x36 [] do_IRQ+0x38/0x84 [] crisv32_do_IRQ+0x54/0x60 [] IRQ0x4b_interrupt+0x34/0x3c [] __schedule+0x24a/0x532 [] ret_from_kernel_thread+0x0/0x14 Signed-off-by: Rabin Vincent Signed-off-by: Jesper Nilsson --- arch/cris/include/arch-v32/arch/processor.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'arch/cris') diff --git a/arch/cris/include/arch-v32/arch/processor.h b/arch/cris/include/arch-v32/arch/processor.h index a024b7d32fed..568759271ab5 100644 --- a/arch/cris/include/arch-v32/arch/processor.h +++ b/arch/cris/include/arch-v32/arch/processor.h @@ -25,8 +25,7 @@ struct thread_struct { */ #define TASK_SIZE (0xB0000000UL) -/* CCS I=1, enable interrupts. */ -#define INIT_THREAD { 0, 0, (1 << I_CCS_BITNR) } +#define INIT_THREAD { } #define KSTK_EIP(tsk) \ ({ \ -- cgit v1.2.3