Hi Thorsten,

On Tue, 21 Jul 2026 at 01:12, Thorsten Blum <[email protected]> wrote:
> Use cpu_relax() to wait for the execution status SPE_EX_STATE_EXECUTED.
> Drop the comments while at it.
>
> Signed-off-by: Thorsten Blum <[email protected]>

Thanks for your patch!

> --- a/arch/powerpc/platforms/ps3/spu.c
> +++ b/arch/powerpc/platforms/ps3/spu.c
> @@ -13,6 +13,7 @@
>  #include <linux/export.h>
>  #include <linux/io.h>
>  #include <linux/mm.h>
> +#include <linux/processor.h>
>
>  #include <asm/spu.h>
>  #include <asm/spu_priv1.h>
> @@ -363,12 +364,9 @@ static int __init ps3_create_spu(struct spu *spu, void 
> *data)
>         if (result)
>                 goto fail_enable;
>
> -       /* Make sure the spu is in SPE_EX_STATE_EXECUTED. */
> -
> -       /* need something better here!!! */
> -       while (in_be64(&spu_pdata(spu)->shadow->spe_execution_status)
> -               != SPE_EX_STATE_EXECUTED)
> -               (void)0;
> +       while (in_be64(&spu_pdata(spu)->shadow->spe_execution_status) !=
> +              SPE_EX_STATE_EXECUTED)
> +               cpu_relax();

I think we still need something better here, like proper timeout
handling using read_poll_timeout()?

>
>         return result;

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Reply via email to