From owner-svn-src-user@FreeBSD.ORG Thu Feb 23 05:19:35 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41D91106566B; Thu, 23 Feb 2012 05:19:35 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C97F8FC16; Thu, 23 Feb 2012 05:19:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N5JZ4O085319; Thu, 23 Feb 2012 05:19:35 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N5JYse085317; Thu, 23 Feb 2012 05:19:34 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201202230519.q1N5JYse085317@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 23 Feb 2012 05:19:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232024 - user/jchandra/xlp-merge/sys/mips/nlm X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 05:19:35 -0000 Author: jchandra Date: Thu Feb 23 05:19:34 2012 New Revision: 232024 URL: http://svn.freebsd.org/changeset/base/232024 Log: Update the L1D cache flush sequence when enabling threads Added more comments. This code is still experimental. Modified: user/jchandra/xlp-merge/sys/mips/nlm/mpreset.S Modified: user/jchandra/xlp-merge/sys/mips/nlm/mpreset.S ============================================================================== --- user/jchandra/xlp-merge/sys/mips/nlm/mpreset.S Thu Feb 23 05:18:05 2012 (r232023) +++ user/jchandra/xlp-merge/sys/mips/nlm/mpreset.S Thu Feb 23 05:19:34 2012 (r232024) @@ -55,24 +55,24 @@ .set noreorder li $8, LSU_DEBUG_DATA0 /* use register number to handle */ li $9, LSU_DEBUG_ADDR /* different ABIs */ - li t2, 0 - li t3, 0x200 + li t2, 0 /* index */ + li t3, 0x1000 /* loop count, 512 sets * 8 whatever? */ 1: sll v0, t2, 5 MTCR(0, 8) - ori v1, v0, 0x3 + ori v1, v0, 0x3 /* way0 | write_enable | write_active */ MTCR(3, 9) 2: MFCR(3, 9) - andi v1, 0x1 + andi v1, 0x1 /* wait for write_active == 0 */ bnez v1, 2b nop MTCR(0, 8) - ori v1, v0, 0x7 + ori v1, v0, 0x7 /* way1 | write_enable | write_active */ MTCR(3, 9) 3: MFCR(3, 9) - andi v1, 0x1 + andi v1, 0x1 /* wait for write_active == 0 */ bnez v1, 3b nop addi t2, 1 @@ -195,7 +195,7 @@ LEAF(xlp_enable_threads) mfc0 t1, MIPS_COP_0_STATUS move sp, t0 /* Restore the real SP */ - jr ra + jr.hb ra nop END(xlp_enable_threads) #endif