From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM:CPUIDLE: Fix wrongly used idle control counter
Date: Thu, 27 Sep 2012 09:53:15 +0100 [thread overview]
Message-ID: <20120927085315.GA14358@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1348727761-16485-1-git-send-email-fwu@marvell.com>
On Thu, Sep 27, 2012 at 02:36:01PM +0800, Fan Wu wrote:
> From: fwu <fwu@marvell.com>
>
> 1. On ARM platform, "nohlt" can be used to prevent core from idle
> process, returning immediately.
> 2. There are two interface, exported for other modules, named
> disable_hlt and enable_hlt and used to enable/disable the
> cpuidle mechanism by increasing/decreasing "hlt_counter".
> So, the more "hlt_counter" is, the more user want to disable
> cpuidle. Disable_hlt and enable_hlt are paired operation,
> when you first call disable_hlt and then enable_hlt, the
> semantics are right, but if you call enable_hlt and
> then disable_hlt, it is wrong.
> 3. Change "hlt_counter > 0" can fix the problem.
> The judgement whethere the cpuidle is disabled need to check
> whether the "hlt_counter > 0" rather than "hlt_counter != 0".
NAK. The bug is that you're calling enable_hlt() without first calling
disable_hlt(). That is something you _must_ _not_ do.
If the count starts off zero, and a driver calls disable_hlt(), another
driver _must_ _not_ override that by then calling enable_hlt().
next prev parent reply other threads:[~2012-09-27 8:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-27 6:36 [PATCH] ARM:CPUIDLE: Fix wrongly used idle control counter Fan Wu
2012-09-27 8:53 ` Russell King - ARM Linux [this message]
2012-09-27 9:19 ` Fan Wu
2012-09-27 9:50 ` Russell King - ARM Linux
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=20120927085315.GA14358@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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