[Skiboot] [PATCH] core/direct-controls: increase special wakeup timeout on POWER9
Vaidyanathan Srinivasan
svaidy at linux.vnet.ibm.com
Tue Oct 17 17:00:40 AEDT 2017
* Nicholas Piggin <npiggin at gmail.com> [2017-10-17 15:23:39]:
> Some instances have been observed where the special wakeup assert
> times out. The current timeout is too short for deeper sleep states.
> Hostboot uses 100ms, so match that.
Good to match hostboot's values since there are many corner cases with
a lower timeout.
> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
Acked-by: Vaidyanathan Srinivasan <svaidy at linux.vnet.ibm.com>
> ---
> core/direct-controls.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/core/direct-controls.c b/core/direct-controls.c
> index 9acdab5e..c6834d77 100644
> --- a/core/direct-controls.c
> +++ b/core/direct-controls.c
> @@ -36,7 +36,10 @@
>
> #define P9_EC_PPM_SSHHYP 0x0114
> #define P9_SPECIAL_WKUP_DONE PPC_BIT(1)
> -#define P9_SPWKUP_TIMEOUT 10
> +
> +/* Waking may take up to 5ms for deepest sleep states. Set timeout to 100ms */
> +#define P9_SPWKUP_POLL_INTERVAL 100
> +#define P9_SPWKUP_TIMEOUT 100000
>
> /*
> * This implements direct control facilities of processor cores and threads
> @@ -62,7 +65,7 @@ static int p9_core_set_special_wakeup(struct cpu_thread *cpu)
> return OPAL_HARDWARE;
> }
>
> - for (i = 0; i < P9_SPWKUP_TIMEOUT; i++) {
> + for (i = 0; i < P9_SPWKUP_TIMEOUT/P9_SPWKUP_POLL_INTERVAL; i++) {
> if (xscom_read(chip_id, sshhyp_addr, &val)) {
> prlog(PR_ERR, "Could not set special wakeup on %u:%u:"
> " Unable to read PPM_SSHHYP.\n",
> @@ -72,7 +75,7 @@ static int p9_core_set_special_wakeup(struct cpu_thread *cpu)
> if (val & P9_SPECIAL_WKUP_DONE)
> return 0;
>
> - time_wait_us(1);
> + time_wait_us(P9_SPWKUP_POLL_INTERVAL);
> }
>
> prlog(PR_ERR, "Could not set special wakeup on %u:%u:"
> --
> 2.13.3
>
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot
More information about the Skiboot
mailing list