Re: [PATCH 1/2] MIPS: Hang more efficiently on halt/powerdown/restart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
> Cc: linux-mips@xxxxxxxxxxxxxx

I've applied this patch (but not patch 2) for 4.17.

Thanks
James

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux