From: pjohn@mvista.com (Philby John)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: Fix "BUG: scheduling while atomic: swapper/0/0x00000002
Date: Sat, 17 Apr 2010 15:21:56 +0530 [thread overview]
Message-ID: <4BC984BC.2060800@mvista.com> (raw)
In-Reply-To: <1271492144-26995-1-git-send-email-santosh.shilimkar@ti.com>
Hello Santosh,
On 04/17/2010 01:45 PM, Santosh Shilimkar wrote:
> 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>
>
> Signed-off-by: Santosh Shilimkar<santosh.shilimkar@ti.com>
> Cc: Russell King<rmk+kernel@arm.linux.org.uk>
> Cc: Catalin Marinas<catalin.marinas@arm.com>
> Cc: Sundar R IYER<sundar.iyer@stericsson.com>
> ---
> arch/arm/kernel/smp.c | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
> index 57162af..3e14629 100644
> --- a/arch/arm/kernel/smp.c
> +++ b/arch/arm/kernel/smp.c
> @@ -86,8 +86,14 @@ int __cpuinit __cpu_up(unsigned int cpu)
> return PTR_ERR(idle);
> }
> ci->idle = idle;
> + } else {
> + /*
> + * Since idle thread getting re-used, call
> + * init_idle() to set up the idle thread for given
> + * CPU. Additionally it also resets the preempt count
> + */
> + init_idle(idle, cpu);
Since Sundar was the first to suggest this fix, shouldn't his SOB be
included as well instead of CC ? Or did I miss a mail thread ?
Regards,
Philby
next prev parent reply other threads:[~2010-04-17 9:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-17 8:15 [PATCH v2] ARM: Fix "BUG: scheduling while atomic: swapper/0/0x00000002 Santosh Shilimkar
2010-04-17 9:51 ` Philby John [this message]
2010-04-17 9:59 ` Shilimkar, Santosh
2010-04-17 10:27 ` Philby John
2010-04-18 15:09 ` Russell King - ARM Linux
2010-04-17 18:33 ` Russell King - ARM Linux
2010-04-18 5:01 ` Shilimkar, Santosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BC984BC.2060800@mvista.com \
--to=pjohn@mvista.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox