Skip to content

psci cleanups + simple v0.2 implementation

Mark Rutland linux-arm-kernel 1 version New

Get series with b4
b4 am 20150114115349.GE12069@leverpostej

Versions newest first

  1. v1 Latest2 of 4 patches 0 repliesNew

2 of 4 patches are in this archive. The cover letter announces 4.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4psci: use MPIDR_INVALID instead of -1+0 -01 reply
2/4psci: remove sentinel from id_table+0 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH boot-wrapper-aarch64 0/4] psci cleanups + simple v0.2 implementation
Quoted 1 line · Zi Shen Lim

Hi Mark,

Hi,

Quoted 9 lines

The first couple patches are cleanups.

The third patch switches to using v0.2 function ID values for the existing cpu_{on,off} implementations. This intermediate step is arguably unnecessary given the next patch...

The fourth patch provides a simple implementation of PSCI v0.2. The deviations from spec (primarily cpu_suspend not supported) is noted in code comment as well as in commit log.

While I'm not opposed to implementing PSCI 0.2, the two major reasons for not having implemented it so far were simplicity and spec-compliance. Unless implementing PSCI 0.2 gains us something, I don't see the point in moving from PSCI 0.1.

I think not having any supported CPU_SUSPEND states is fine. For spec compliance I'm more worried by the behaviour of AFFINITY_INFO (as this implementation seems to ignore the lowest_affinity_level parameter), and the behaviour of SYSTEM_{OFF,RESET} -- I wonder if these could be implemented via semihosting.

Given that SYSTEM_OFF and SYSTEM_RESET are effectively not implemented, the only thing that I see we gain from this PSCI 0.2 implementation is AFFINITY_INFO to close a race with CPU_OFF. Is PSCI 0.2 just a nice-to-have feature, or is there something it provides that you particularly want?

I occasionally need to use a new boot-wrapper with old kernels which only handle PSCI 0.1, so we also need to maintain compatiblity in the way the DT binding doc describes:

psci {
	compatible = "arm,psci-0.2", "arm,psci";
	method = "smc";
	cpu_on = < ... >;
	cpu_off = < ... >;
};

Thanks,
Mark.

Quoted 16 lines

Please consider merging.

Thanks, z

Zi Shen Lim (4): psci: use MPIDR_INVALID instead of -1 psci: remove sentinel from id_table psci: use PSCI v0.2 function IDs psci:
implement PSCI v0.2

 Makefile.am |   4 +- psci.S      | 170

++++++++++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 143 insertions(+), 31 deletions(-)

-- 2.1.0