From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from outbound3-wa4-R.bigfish.com (outbound-wa4.frontbridge.com [216.32.181.16]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.bigfish.com", Issuer "*.bigfish.com" (not verified)) by ozlabs.org (Postfix) with ESMTP id 622E2DDEC1 for ; Sat, 9 Feb 2008 09:54:22 +1100 (EST) Message-ID: <47ACDD2E.6010607@am.sony.com> Date: Fri, 08 Feb 2008 14:52:30 -0800 From: Geoff Levand MIME-Version: 1.0 To: paulus@samba.org Subject: [patch 1/6] PS3: Fix lpm set bookmark References: <20080208224723.029462363@am.sony.com> In-Reply-To: <20080208224723.029462363@am.sony.com> Content-Type: text/plain; charset=UTF-8 Cc: linuxppc-dev@ozlabs.org, Takashi Yamamoto List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Takashi Yamamoto Fix the ps3_set_bookmark() routine of the PS3 logical performance monitor driver. To properly set a performance monitor bookmark the Cell processor requires no instruction branches near the setting of the bookmark SPR. Testing showed that the use of the db10cyc instruction did not work correctly. This change replaces the db10cyc instruction with 10 nop instructions. Signed-off-by: Takashi Yamamoto Signed-off-by: Geoff Levand --- drivers/ps3/ps3-lpm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/ps3/ps3-lpm.c +++ b/drivers/ps3/ps3-lpm.c @@ -181,9 +181,9 @@ void ps3_set_bookmark(u64 bookmark) * includes cycles before the call. */ - asm volatile("or 29, 29, 29;"); /* db10cyc */ + asm volatile("nop;nop;nop;nop;nop;nop;nop;nop;nop;"); mtspr(SPRN_BKMK, bookmark); - asm volatile("or 29, 29, 29;"); /* db10cyc */ + asm volatile("nop;nop;nop;nop;nop;nop;nop;nop;nop;"); } EXPORT_SYMBOL_GPL(ps3_set_bookmark); --