From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org,
John David Anglin <dave.anglin@bell.net>,
linux-kernel <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] parisc: avoid WARNING: at kernel/cpu/idle.c:96
Date: Wed, 08 May 2013 14:05:34 -0700 [thread overview]
Message-ID: <1368047134.8623.5.camel@dabdike> (raw)
In-Reply-To: <20130508204242.GA16254@p100.box>
On Wed, 2013-05-08 at 22:42 +0200, Helge Deller wrote:
> We need to enable local irqs to avoid this runtime warning.
>
> Signed-off-by: Helge Deller <deller@gmx.de>
>
> diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
> index 55f92b6..2840d43 100644
> --- a/arch/parisc/kernel/process.c
> +++ b/arch/parisc/kernel/process.c
> @@ -286,3 +286,8 @@ void *dereference_function_descriptor(void *ptr)
> return ptr;
> }
> #endif
> +
> +void arch_cpu_idle(void)
> +{
> + local_irq_enable();
This is definitely wrong. we'd need at least a cpu_relax() in there.
Without that the cpu will bounce around in the idle loop. I'd advise
that we simply keep the default cpu_idle_poll().
However, this looks like a kernel bug to me in cpu_idle_loop()? not
something we should be working around in the arch code.
Thomas, what's going on here? It looks like you can never avoid the
WARN_ON_ONCE if you don't provide any arch specific idle functions. If
you wish to allow this case then the correct patch (keeping the WARN_ON)
would appear to be this one.
James
----
diff --git a/kernel/cpu/idle.c b/kernel/cpu/idle.c
index 8b86c0c..829e41f 100644
--- a/kernel/cpu/idle.c
+++ b/kernel/cpu/idle.c
@@ -56,6 +56,7 @@ void __weak arch_cpu_idle_dead(void) { }
void __weak arch_cpu_idle(void)
{
cpu_idle_force_poll = 1;
+ local_irq_enable();
}
/*
next prev parent reply other threads:[~2013-05-08 21:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-08 20:42 [PATCH] parisc: avoid WARNING: at kernel/cpu/idle.c:96 Helge Deller
2013-05-08 21:05 ` James Bottomley [this message]
2013-05-17 6:25 ` James Bottomley
2013-05-17 19:25 ` Srivatsa S. Bhat
2013-05-18 19:40 ` Helge Deller
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=1368047134.8623.5.camel@dabdike \
--to=james.bottomley@hansenpartnership.com \
--cc=dave.anglin@bell.net \
--cc=deller@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.