| diff --git a/lib/psci/psci_common.c b/lib/psci/psci_common.c |
| index 25e30d489..8ff7fee51 100644 |
| --- a/lib/psci/psci_common.c |
| +++ b/lib/psci/psci_common.c |
| @@ -1284,6 +1284,10 @@ void __dead2 psci_pwrdown_cpu_end_terminal(void) |
| panic(); |
| } |
| |
| +#include <travis.h> |
| +#include <cortex_gelas.h> |
| +static bool should_abandon[PLATFORM_CORE_COUNT]; |
| + |
| /******************************************************************************* |
| * Finish a non-terminal power down sequence, ending with a wfi. In case of |
| * wakeup will unwind any CPU specific actions and return. |
| @@ -1294,11 +1298,23 @@ void psci_pwrdown_cpu_end_wakeup(unsigned int power_level) |
| /* ensure write buffer empty */ |
| dsbsy(); |
| |
| + long pos = plat_my_core_pos(); |
| + bool abandon = should_abandon[pos]; |
| + /* abandon every other time */ |
| + should_abandon[pos] = !should_abandon[pos]; |
| + long midr = EXTRACT_PARTNUM(read_midr()); |
| + |
| /* |
| * Turn the core off. Usually, will be terminal. In some circumstances |
| * the powerdown will be denied and we'll need to unwind. |
| */ |
| - wfi(); |
| + /* only abandon for cores that support it */ |
| + if (!(abandon && |
| + (midr == EXTRACT_PARTNUM(CORTEX_GELAS_MIDR) |
| + || midr == EXTRACT_PARTNUM(TRAVIS_MIDR)))) |
| + { |
| + wfi(); |
| + } |
| |
| /* |
| * Waking up does not require hardware-assisted coherency, but that is |