From: Paul Mundt <lethal@linux-sh.org>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: linux-arch@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: Remaining arch problems in cpu_idle
Date: Wed, 29 Jun 2005 11:00:58 +0300 [thread overview]
Message-ID: <20050629080058.GA2694@linux-sh.org> (raw)
In-Reply-To: <42C24874.8030702@yahoo.com.au>
[-- Attachment #1: Type: text/plain, Size: 1865 bytes --]
On Wed, Jun 29, 2005 at 05:06:28PM +1000, Nick Piggin wrote:
> h8300, ia64, and sh64 still have possible outstanding issues,
> which I've put at the end of the Documentation/ file. It
> would be nice to get these looked at.
>
Looking at this, sh64 is pretty much in the same category as h8300. sh
is as well, but we seem to be missing the local_irq_disable/enable around
the need_resched check there completely, which is even more bogus.
> +4. The only time interrupts need to be disabled when checking
> + need_resched is if we are about to sleep the processor until
> + the next interrupt (this doesn't provide any protection of
> + need_resched, it prevents losing an interrupt).
> +
> + 4a. Common problem with this type of sleep appears to be:
> + local_irq_disable();
> + if (!need_resched()) {
> + local_irq_enable();
> + *** resched interrupt arrives here ***
> + __asm__("sleep until next interrupt");
> + }
> +
> +Possible arch/ problems
> +=======================
> +
> +Possible arch problems I found (and either tried to fix or didn't):
> +
> +h8300 - Is such sleeping racy vs interrupts? (See #4a).
> + The H8/300 manual I found indicates yes, however disabling IRQs
> + over the sleep mean only NMIs can wake it up, so can't fix easily
> + without doing spin waiting.
> +
We have the same problem for sh/sh64 (which isn't surprising, considering
they all share ancestry).
There are several different states that can be entered, with different
method for exiting, although at least the sleep and deep sleep states
both require an interrupt, NMI, or a reset request.
I can update sh and sh64 to follow the h8300 change, but that still
doesn't address the race. What sort of spin waiting do you have in mind?
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-06-29 8:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-29 7:06 Remaining arch problems in cpu_idle Nick Piggin
2005-06-29 8:00 ` Paul Mundt [this message]
2005-06-29 9:09 ` Nick Piggin
2005-06-29 10:11 ` Paul Mundt
2005-06-29 10:20 ` Nick Piggin
-- strict thread matches above, loose matches on Subject: below --
2005-06-29 21:51 Luck, Tony
2005-06-29 23:38 ` Nick Piggin
2005-06-29 23:46 Luck, Tony
2005-06-29 23:55 ` Nick Piggin
2005-06-30 0:07 Luck, Tony
2005-06-30 0:17 ` Nick Piggin
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=20050629080058.GA2694@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=akpm@osdl.org \
--cc=linux-arch@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/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