diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2026-07-21 01:11:53 +0200 |
|---|---|---|
| committer | Madhavan Srinivasan <maddy@linux.ibm.com> | 2026-07-31 17:06:03 +0530 |
| commit | 6050e3196d97c679ea06c035dbb3c64264c01281 (patch) | |
| tree | bba2237eb99a21961a11c0996f0b43a35e1287cc | |
| parent | b6cfbfd6b2992e3f34d255c983dc9f20ef0f5cd8 (diff) | |
| download | linux-next-6050e3196d97c679ea06c035dbb3c64264c01281.tar.gz linux-next-6050e3196d97c679ea06c035dbb3c64264c01281.zip | |
powerpc/ps3: Use cpu_relax() in ps3_create_spu()
Use cpu_relax() to wait for the execution status SPE_EX_STATE_EXECUTED.
Drop the comments while at it.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260720231153.116827-2-thorsten.blum@linux.dev
| -rw-r--r-- | arch/powerpc/platforms/ps3/spu.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c index e4e0b45e1b9d..8545c72385de 100644 --- 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(); return result; |
