From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-172.mta1.migadu.com (out-172.mta1.migadu.com [95.215.58.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C21DD414DDD for ; Mon, 20 Jul 2026 23:12:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784589166; cv=none; b=cBDtKRnya61hca4+yRipAiMdO6ebZGfnwXe4NbtRYPi0op3x57a68sNo4+bCQ7ZavG3GVz3Tt24c9yyXGgKzz6sZCiiHlvw4jddE24FsVcRwEOH8V+14aelVRjqijBMFBX2iBQmW/uHwz+FcA+5QAjlv4iqSJYL5FtybUN7o9lk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784589166; c=relaxed/simple; bh=GIpgVspGffpwkkdjtB6BHOzz1URiFhSrELYesrG5VYQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TUyjFP03uRnZxXaWV9lCKVewiOSyAdo1LXfESK9gJlOUILrtAzEoPvB2qaUDV3AXMS7QIgLshiWCgkMukdRaO6/1ipeI+pGwSnIEyFrxADcICtZh3rAO1mKEmfthrtsLOaqZpLVjeOcBCP7O1QAxTqqd9fgLa0x/hsD/mhFIAHU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=KNu4eXXT; arc=none smtp.client-ip=95.215.58.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="KNu4eXXT" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784589157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=7bJuV0SZ2xoBq4U4y0yPh8DySjTLRw6/qKSlATYB6Ng=; b=KNu4eXXT+lOUb44AngQntfTGwl9okQXIJnGNSioPbYFAt0SFpHIbkiO8nzsB9MprvWM254 6DuoD2Ai76rUw4L80yio8ivxf0zYoDWxDjJfcBjIp2UtnIWx0Fi5qFAN8q45IWvzZCF44p lNreG50Ypz0WpM8qy89CuAxMHI8q+Kg= From: Thorsten Blum To: Geoff Levand , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" Cc: Thorsten Blum , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] powerpc/ps3: Use cpu_relax() in ps3_create_spu() Date: Tue, 21 Jul 2026 01:11:53 +0200 Message-ID: <20260720231153.116827-2-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1127; i=thorsten.blum@linux.dev; h=from:subject; bh=GIpgVspGffpwkkdjtB6BHOzz1URiFhSrELYesrG5VYQ=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFlxqy2nbKs4szxeY0JjW3pK9eL+ldN0mHM/S/p8ed8ur fzA4J1vRykLgxgXg6yYIsuDWT9m+JbWVG4yidgJM4eVCWQIAxenAEzEcjMjw6QJ79iX7uW2uKe8 KeIM8y9JL+HPd7/+6l3uVxWqcGqKUz/D/7xulvip22Z9+qy9jYnVfKmdc/Tx1dOY7blcP6zqSVg awQkA X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Use cpu_relax() to wait for the execution status SPE_EX_STATE_EXECUTED. Drop the comments while at it. Signed-off-by: Thorsten Blum --- arch/powerpc/platforms/ps3/spu.c | 10 ++++------ 1 file 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 #include #include +#include #include #include @@ -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;