diff options
author | Paul Burton <paul.burton@mips.com> | 2017-08-23 23:53:16 +0300 |
---|---|---|
committer | James Hogan <jhogan@kernel.org> | 2018-03-09 14:22:43 +0300 |
commit | 997e93d4df165202f2ee36a48f7aca172ff8b48a (patch) | |
tree | e8b4a559c3db1f3069a16c48bf025e8f41e71eeb /arch/mips/include/asm/isa-rev.h | |
parent | 4d73b73ff7943c92e8bcb65fece8caa70c24db87 (diff) | |
download | linux-997e93d4df165202f2ee36a48f7aca172ff8b48a.tar.xz |
MIPS: Hang more efficiently on halt/powerdown/restart
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@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17178/
Signed-off-by: James Hogan <jhogan@kernel.org>
Diffstat (limited to 'arch/mips/include/asm/isa-rev.h')
0 files changed, 0 insertions, 0 deletions