arm-trusted-firmware/lib/psci
Jeenu Viswambharan b0408e87f7 PSCI: Optimize call paths if all participants are cache-coherent
The current PSCI implementation can apply certain optimizations upon the
assumption that all PSCI participants are cache-coherent.

  - Skip performing cache maintenance during power-up.

  - Skip performing cache maintenance during power-down:

    At present, on the power-down path, CPU driver disables caches and
    MMU, and performs cache maintenance in preparation for powering down
    the CPU. This means that PSCI must perform additional cache
    maintenance on the extant stack for correct functioning.

    If all participating CPUs are cache-coherent, CPU driver would
    neither disable MMU nor perform cache maintenance. The CPU being
    powered down, therefore, remain cache-coherent throughout all PSCI
    call paths. This in turn means that PSCI cache maintenance
    operations are not required during power down.

  - Choose spin locks instead of bakery locks:

    The current PSCI implementation must synchronize both cache-coherent
    and non-cache-coherent participants. Mutual exclusion primitives are
    not guaranteed to function on non-coherent memory. For this reason,
    the current PSCI implementation had to resort to bakery locks.

    If all participants are cache-coherent, the implementation can
    enable MMU and data caches early, and substitute bakery locks for
    spin locks. Spin locks make use of architectural mutual exclusion
    primitives, and are lighter and faster.

The optimizations are applied when HW_ASSISTED_COHERENCY build option is
enabled, as it's expected that all PSCI participants are cache-coherent
in those systems.

Change-Id: Iac51c3ed318ea7e2120f6b6a46fd2db2eae46ede
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
2017-03-02 11:00:20 +00:00
..
aarch32 Add provision to extend CPU operations at more levels 2016-12-15 15:41:40 +00:00
aarch64 Add provision to extend CPU operations at more levels 2016-12-15 15:41:40 +00:00
psci_common.c PSCI: Optimize call paths if all participants are cache-coherent 2017-03-02 11:00:20 +00:00
psci_lib.mk Report errata workaround status to console 2017-01-30 14:53:19 +00:00
psci_main.c PSCI: Decouple PSCI stat residency calculation from PMF 2017-02-13 14:33:06 +00:00
psci_off.c PSCI: Optimize call paths if all participants are cache-coherent 2017-03-02 11:00:20 +00:00
psci_on.c PSCI: Optimize call paths if all participants are cache-coherent 2017-03-02 11:00:20 +00:00
psci_private.h PSCI: Optimize call paths if all participants are cache-coherent 2017-03-02 11:00:20 +00:00
psci_setup.c PSCI: Introduce cache and barrier wrappers 2017-03-02 11:00:20 +00:00
psci_stat.c PSCI: Decouple PSCI stat residency calculation from PMF 2017-02-13 14:33:06 +00:00
psci_suspend.c PSCI: Optimize call paths if all participants are cache-coherent 2017-03-02 11:00:20 +00:00
psci_system_off.c Introduce `el3_runtime` and `PSCI` libraries 2016-07-18 17:52:15 +01:00