kernel_optimize_test/arch/mips
Paul Burton 997e93d4df
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>
2018-03-09 11:22:43 +00:00
..
alchemy MIPS: Alchemy: Constify gpio_led 2018-02-19 10:55:35 +00:00
ar7 MIPS: AR7: Constify gpio_led 2018-02-19 10:55:36 +00:00
ath25
ath79
bcm47xx MIPS: bcm47xx: enable ZBOOT support 2018-01-24 11:20:29 +00:00
bcm63xx MIPS: BCM63XX: kconfig: Remove blank help text 2018-02-02 23:53:10 +09:00
bmips
boot MIPS: BMIPS: Add Broadcom STB watchdog nodes 2018-03-06 00:25:18 +00:00
cavium-octeon MIPS: Octeon: Fix logging messages with spurious periods after newlines 2018-02-19 10:55:34 +00:00
cobalt
configs MIPS: generic: Enable crc32-mips on r6 configs 2018-02-19 20:50:36 +00:00
crypto MIPS: crypto: Add crc32 and crc32c hw accelerated module 2018-02-19 20:50:36 +00:00
dec
emma
fw
generic MIPS: Generic: Support GIC in EIC mode 2018-02-05 14:36:03 +00:00
include MIPS: Add crc instruction support flag to elf_hwcap 2018-02-19 20:50:35 +00:00
jazz
jz4740 MIPS: ingenic: Initial GCW Zero support 2018-01-18 22:08:10 +00:00
kernel MIPS: Hang more efficiently on halt/powerdown/restart 2018-03-09 11:22:43 +00:00
kvm
lantiq
lasat
lib
loongson32
loongson64 MIPS changes for 4.16 2018-02-07 11:22:44 -08:00
math-emu
mm MIPS: Remove duplicate includes 2018-02-19 10:55:35 +00:00
mti-malta
net bpf, mips64: remove unneeded zero check from div/mod with k 2018-01-26 16:42:06 -08:00
netlogic
oprofile
paravirt
pci
pic32
pistachio
pmcs-msp71xx
pnx833x
power
ralink
rb532
sgi-ip22
sgi-ip27
sgi-ip32
sibyte
sni
tools
txx9 MIPS: TXX9: Constify gpio_led 2018-02-19 10:55:36 +00:00
vdso
vr41xx
Kbuild
Kbuild.platforms
Kconfig MIPS: crypto: Add crc32 and crc32c hw accelerated module 2018-02-19 20:50:36 +00:00
Kconfig.debug
Makefile MIPS: Expand help text to list generic defconfigs 2018-03-05 15:11:42 +00:00
Makefile.postlink