linux/arch/arm/kernel
Santosh Shilimkar 13ea9cc821 ARM: 6066/1: Fix "BUG: scheduling while atomic: swapper/0/0x00000002
This patch fixes the preempt leak in the cpuidle path invoked from
cpu-hotplug. The fix is suggested by Russell King and is based
on x86 idea of calling init_idle() on the idle task when it's
re-used which also resets the preempt count amongst other things

dump:
BUG: scheduling while atomic: swapper/0/0x00000002
Modules linked in:
Backtrace:
[<c0024f90>] (dump_backtrace+0x0/0x110) from [<c0173bc4>] (dump_stack+0x18/0x1c)
 r7:c02149e4 r6:c033df00 r5:c7836000 r4:00000000
[<c0173bac>] (dump_stack+0x0/0x1c) from [<c003b4f0>] (__schedule_bug+0x60/0x70)
[<c003b490>] (__schedule_bug+0x0/0x70) from [<c0174214>] (schedule+0x98/0x7b8)
 r5:c7836000 r4:c7836000
[<c017417c>] (schedule+0x0/0x7b8) from [<c00228c4>] (cpu_idle+0xb4/0xd4)
# [<c0022810>] (cpu_idle+0x0/0xd4) from [<c0171dd8>] (secondary_start_kernel+0xe0/0xf0)
 r5:c7836000 r4:c0205f40
[<c0171cf8>] (secondary_start_kernel+0x0/0xf0) from [<c002d57c>] (prm_rmw_mod_reg_bits+0x88/0xa4)
 r7:c02149e4 r6:00000001 r5:00000001 r4:c7836000
Backtrace aborted due to bad frame pointer <c7837fbc>

Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-05-01 11:32:57 +01:00
..
.gitignore
armksyms.c
arthur.c
asm-offsets.c ARM: dma-mapping: provide per-cpu type map/unmap functions 2010-02-15 15:22:20 +00:00
atags.c
atags.h
bios32.c resource/PCI: mark struct resource as const 2010-02-22 16:16:57 -08:00
calls.S Add generic sys_old_mmap() 2010-03-12 15:52:32 -08:00
compat.c
compat.h
crunch-bits.S
crunch.c
debug.S ARM: 5910/1: ARM: Add tmp register for addruart and loadsp 2010-02-12 17:27:52 +00:00
dma-isa.c
dma.c
early_printk.c
ecard.c
ecard.h
elf.c
entry-armv.S ARM: 6068/1: Fix build break with KPROBES enabled 2010-05-01 11:32:53 +01:00
entry-common.S
entry-header.S ARM: 5991/1: Fix regression in restore_user_regs macro 2010-03-15 17:20:08 +00:00
etm.c
fiq.c
ftrace.c ARM: fix build error in arch/arm/kernel/process.c 2010-04-21 08:45:21 +01:00
head-common.S
head-nommu.S
head.S
init_task.c
io.c
irq.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
isa.c
iwmmxt.S
kgdb.c ARM: 5989/1: ARM: KGDB: add support for SMP platforms 2010-03-15 14:33:04 +00:00
kprobes-decode.c
kprobes.c Merge branch 'master' into export-slabh 2010-04-05 11:37:28 +09:00
leds.c ARM: move LED support code out of arch/arm/kernel/time.c 2010-02-15 21:39:12 +00:00
machine_kexec.c
Makefile Merge branch 'misc2' into devel 2010-02-25 22:09:41 +00:00
module.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
perf_event.c Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/genesis-2.6 2010-03-15 14:27:06 +00:00
pmu.c
process.c ARM: fix build error in arch/arm/kernel/process.c 2010-04-21 08:45:21 +01:00
ptrace.c arm: use generic ptrace_resume code 2010-03-12 15:52:38 -08:00
ptrace.h arm: use generic ptrace_resume code 2010-03-12 15:52:38 -08:00
relocate_kernel.S
return_address.c
setup.c Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-03-01 09:15:15 -08:00
signal.c ARM: 6051/1: VFP: preserve the HW context when calling signal handlers 2010-04-14 11:11:30 +01:00
signal.h
smp_scu.c
smp_twd.c
smp.c ARM: 6066/1: Fix "BUG: scheduling while atomic: swapper/0/0x00000002 2010-05-01 11:32:57 +01:00
stacktrace.c
sys_arm.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sys_oabi-compat.c Add generic sys_ipc wrapper 2010-03-12 15:52:32 -08:00
tcm.c
tcm.h
thumbee.c
time.c ARM: move LED support code out of arch/arm/kernel/time.c 2010-02-15 21:39:12 +00:00
traps.c ARM: add notify_die() support 2010-02-15 21:39:14 +00:00
unwind.c ARM: 5977/1: arm: Enable backtrace printing on oops when PC is corrupted 2010-03-07 10:22:00 +00:00
vmlinux.lds.S ARM: 5880/1: arm: use generic infrastructure for early params 2010-02-15 21:39:13 +00:00
xscale-cp0.c