All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6]
@ 2013-12-02 11:08 Andre Przywara
  2013-12-02 11:08 ` [PATCH v2 1/6] arm: rename xen/arch/arm/psci.c into vpsci.c Andre Przywara
                   ` (6 more replies)
  0 siblings, 7 replies; 35+ messages in thread
From: Andre Przywara @ 2013-12-02 11:08 UTC (permalink / raw)
  To: Ian.Campbell, stefano.stabellini
  Cc: xen-devel, julien.grall, Andre Przywara, patches

This is a major rework of last week's ARM PSCI host support. The code
has been moved into a separate file and the code flow has been
changed substantially (see below for more details).
  ---------

Xen did not make use of the host provided ARM PSCI (Power State
Coordination Interface [1]) functionality so far, but relied on
platform specific SMP bringup functions.
This series adds support for PSCI on the host by reading the required
information from the DTB and invoking the appropriate handler when
bringing up each single CPU.
Since PSCI is defined for both ARM32 and ARM64, I added code for both
architectures, though only ARM32 is tested on Midway and VExpress
(without any PSCI support on the latter, just a regression test).
ARM64 code was compile tested only.

The ARM32 SMP boot flow is now as following:
The DTB is scanned for a node announcing PSCI support. If that is
available, call the PSCI handler via SMC to bringup the secondary
cores. If no PSCI has been found, call the platform specific cpu_up()
function. It is now the responsibility of those functions to do the
GIC SGI call to kick the secondary CPUs. For that a function is now
provided which does this, so three platforms now reference this
generic function instead of coding up an empty one and relying on the
GIC kick in Xen code later.

The ARM64 SMP boot flow is different: PSCI is not only described in a
root DTB node, but also advertised in each core's node as the
preferred SMP bringup method. So the PSCI call wrapper function is
registered as the cpu_up function when the DTB is scanned.

This patch series is split up as follows:
1/6) rename psci.c to vpsci.c to make room for the new, host-related
     code
2/6) move the GIC SGI kick into a separate function and call it now
     directly from the platform code, removing the empty cpu_up()
3/6) parse the DTB for a PSCI node and store the needed function index
4/6) add a function to actually invoke the firmware's PSCI handler
5/6) enable PSCI on ARM32 by adding the call to the PSCI handler
6/6) enable PSCI on ARM64 by registering the PSCI handler function


Changes from v1:
- much rework, PSCI host DTB scanning unchanged (v1: 1/4, v2: 3/6)
- moved host PSCI code to psci.c, renaming the old one to vpsci.c
- have a separate psci_available variable
- removing explicit "host" from function names
- returning standard error codes on DTB scanning
- do the ARM64 PSCI call from a registered function pointer
- move the GIC kick into a separate function
- more change to the code flow in general


Signed-off-by: Andre Przywara <andre.przywara@linaro.org>

[1]: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0022b/index.html

Andre Przywara (6):
  arm: rename xen/arch/arm/psci.c into vpsci.c
  arm: move GIC SGI kicking into separate function
  arm: parse PSCI node from the host device-tree
  arm: add a function to invoke the PSCI handler
  arm32: enable PSCI secondary CPU bringup
  arm64: enable PSCI secondary CPU bringup

 xen/arch/arm/Makefile             |   1 +
 xen/arch/arm/arm32/smpboot.c      |   4 +-
 xen/arch/arm/arm64/smpboot.c      |  23 ++++++-
 xen/arch/arm/platform.c           |   6 +-
 xen/arch/arm/platforms/exynos5.c  |  11 +---
 xen/arch/arm/platforms/omap5.c    |  11 +---
 xen/arch/arm/platforms/vexpress.c |  10 +--
 xen/arch/arm/psci.c               | 127 +++++++++++++++++++-------------------
 xen/arch/arm/smpboot.c            |  22 +++++--
 xen/arch/arm/vpsci.c              |  93 ++++++++++++++++++++++++++++
 xen/include/asm-arm/psci.h        |   7 +++
 xen/include/asm-arm/smp.h         |   2 +
 12 files changed, 215 insertions(+), 102 deletions(-)
 create mode 100644 xen/arch/arm/vpsci.c

-- 
1.7.12.1

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2013-12-04 12:44 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-02 11:08 [PATCH v2 0/6] Andre Przywara
2013-12-02 11:08 ` [PATCH v2 1/6] arm: rename xen/arch/arm/psci.c into vpsci.c Andre Przywara
2013-12-02 13:02   ` Julien Grall
2013-12-02 13:06     ` Ian Campbell
2013-12-02 13:08       ` Julien Grall
2013-12-02 14:53   ` Ian Campbell
2013-12-02 11:08 ` [PATCH v2 2/6] arm: move GIC SGI kicking into separate function Andre Przywara
2013-12-02 13:16   ` Julien Grall
2013-12-02 13:24     ` Andre Przywara
2013-12-02 13:57       ` Julien Grall
2013-12-02 15:01   ` Ian Campbell
2013-12-04 12:15     ` Andre Przywara
2013-12-04 12:28       ` Ian Campbell
2013-12-04 12:33         ` Andre Przywara
2013-12-04 12:35           ` Ian Campbell
2013-12-02 11:08 ` [PATCH v2 3/6] arm: parse PSCI node from the host device-tree Andre Przywara
2013-12-02 13:28   ` Julien Grall
2013-12-02 13:44     ` Andre Przywara
2013-12-02 15:00       ` Julien Grall
2013-12-02 15:14         ` Ian Campbell
2013-12-02 15:05   ` Ian Campbell
2013-12-04 12:37     ` Andre Przywara
2013-12-04 12:41       ` Ian Campbell
2013-12-04 12:44         ` Andre Przywara
2013-12-02 11:08 ` [PATCH v2 4/6] arm: add a function to invoke the PSCI handler Andre Przywara
2013-12-02 15:07   ` Ian Campbell
2013-12-04 12:25     ` Andre Przywara
2013-12-04 12:32       ` Ian Campbell
2013-12-02 11:08 ` [PATCH v2 5/6] arm32: enable PSCI secondary CPU bringup Andre Przywara
2013-12-02 15:09   ` Ian Campbell
2013-12-02 11:08 ` [PATCH v2 6/6] arm64: " Andre Przywara
2013-12-02 15:11   ` Ian Campbell
2013-12-02 14:52 ` [PATCH v2 0/6] Ian Campbell
2013-12-04 12:16   ` Andre Przywara
2013-12-04 12:29     ` Ian Campbell

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.