From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Jonas Jensen <jonas.jensen@gmail.com>,
linux-arm-kernel@lists.infradead.org,
Daniel Mack <zonque@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: mach-moxart: platform port for MOXA ART SoC
Date: Wed, 15 May 2013 14:32:37 +0100 [thread overview]
Message-ID: <20130515133237.GK18614@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <201305151516.52389.arnd@arndb.de>
On Wed, May 15, 2013 at 03:16:52PM +0200, Arnd Bergmann wrote:
> > +static void moxart_idle(void)
> > +{
> > + /*
> > + * Because of broken hardware we have to enable interrupts or the CPU
> > + * will never wakeup... Acctualy it is not very good to enable
> > + * interrupts first since scheduler can miss a tick, but there is
> > + * no other way around this. Platforms that needs it for power saving
> > + * should call enable_hlt() in init code, since by default it is
> > + * disabled.
> > + */
> > +/* local_irq_enable();
> > + cpu_do_idle();*/
> > +}
> > +
> > +static int __init moxart_idle_init(void)
> > +{
> > + arm_pm_idle = moxart_idle;
> > + return 0;
> > +}
> > +
> > +arch_initcall(moxart_idle_init);
>
> This does not seem to do anything at this point. Does the comment still
> apply?
Actually, that's probably the whole point of this - to do nothing.
This changes the behaviour of the idle loop from using the WFI to
just spinning instead with no wait-for-interrupt or anything else.
We just keep reading the need_resched flag.
That's much better than the commented out code which opens a mighty
big race condition which will then give bad scheduling behaviour,
allowing the idle task to sleep in WFI until the next interrupt while
the need_resched flag may be set.
Sure, there's better ways to do this, via the disable_hlt() stuff,
and whatever its replacement implementation is now called. But
ultimately this workaround really is about "doing nothing" when
idle!
next prev parent reply other threads:[~2013-05-15 13:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CACmBeS1NLFUYHBOVL28aCCzRrgXYGPZF9t3qj6AdcgaMkrPGoQ@mail.gmail.com>
[not found] ` <CACmBeS01vs=fHOXu1Lnq8GX8YAbF6aBKmqopKPVt78mPYm=_9w@mail.gmail.com>
2013-03-13 15:37 ` Jonas Jensen
2013-03-13 18:34 ` Daniel Mack
2013-03-15 11:25 ` Arnd Bergmann
2013-03-17 15:32 ` Jonas Jensen
2013-03-18 15:03 ` Arnd Bergmann
2013-05-15 11:20 ` Jonas Jensen
2013-05-15 13:16 ` Arnd Bergmann
2013-05-15 13:32 ` Russell King - ARM Linux [this message]
2013-05-15 22:54 ` Arnd Bergmann
2013-05-16 8:57 ` Russell King - ARM Linux
2013-05-16 13:35 ` Arnd Bergmann
2013-05-16 13:50 ` Jonas Jensen
2013-05-16 13:37 ` Jonas Jensen
2013-05-16 14:52 ` Arnd Bergmann
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=20130515133237.GK18614@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=arnd@arndb.de \
--cc=jonas.jensen@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zonque@gmail.com \
/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
all inboxes | Powered by JetHome®