From: James Hogan <jhogan@kernel.org>
To: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH 1/2] MIPS: Hang more efficiently on halt/powerdown/restart
Date: Fri, 9 Mar 2018 00:20:33 +0000 [thread overview]
Message-ID: <20180309002032.GD24558@saruman> (raw)
In-Reply-To: <20170823205317.4828-2-paul.burton@imgtec.com>
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]
On Wed, Aug 23, 2017 at 01:53:16PM -0700, Paul Burton wrote:
> The generic MIPS implementations of halting, powering down or restarting
> the system all hang using a busy loop as a last resort. We have many
> platforms which avoid this loop by implementing their own, many using
> some variation upon executing a wait instruction to lower CPU power
> usage if we reach this point.
>
> In order to prepare for cleaning up these various custom implementations
> of the same thing, this patch makes the generic machine_halt(),
> machine_power_off() & machine_restart() functions each make use of the
> wait instruction to lower CPU power usage in cases where we know that
> the wait instruction is available. If wait isn't known to be supported
> then we fall back to calling cpu_wait(), and if we don't have a
> cpu_wait() callback then we effectively continue using a busy loop.
>
> In effect the new machine_hang() function provides a superset of the
> functionality that the various platforms currently provide differing
> subsets of.
>
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: linux-mips@linux-mips.org
I've applied this patch (but not patch 2) for 4.17.
Thanks
James
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-03-09 0:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 20:53 [PATCH 0/2] MIPS: Clean up halt/restart/power off code Paul Burton
2017-08-23 20:53 ` Paul Burton
2017-08-23 20:53 ` [PATCH 1/2] MIPS: Hang more efficiently on halt/powerdown/restart Paul Burton
2017-08-23 20:53 ` Paul Burton
2018-03-09 0:20 ` James Hogan [this message]
2017-08-23 20:53 ` [PATCH 2/2] MIPS: Remove custom implementations CPU hang implementations Paul Burton
2017-08-23 20:53 ` Paul Burton
2018-03-09 0:13 ` James Hogan
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=20180309002032.GD24558@saruman \
--to=jhogan@kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=paul.burton@mips.com \
--cc=ralf@linux-mips.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 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.