From owner-svn-src-projects@FreeBSD.ORG Thu Oct 22 04:35:33 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1921A106566C; Thu, 22 Oct 2009 04:35:33 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0860E8FC0A; Thu, 22 Oct 2009 04:35:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9M4ZW87019154; Thu, 22 Oct 2009 04:35:32 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9M4ZWKf019152; Thu, 22 Oct 2009 04:35:32 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <200910220435.n9M4ZWKf019152@svn.freebsd.org> From: Neel Natu Date: Thu, 22 Oct 2009 04:35:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198355 - projects/mips/sys/mips/mips X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2009 04:35:33 -0000 Author: neel Date: Thu Oct 22 04:35:32 2009 New Revision: 198355 URL: http://svn.freebsd.org/changeset/base/198355 Log: Remove redundant instructions from tlb.S The "_MTC0 v0, COP_0_TLB_HI" is actually incorrect because v0 has not been initialized at that point. It worked correctly because we subsequently did the right thing and initialized TLB_HI correctly. The "li v0, MIPS_KSEG0_START" is redundant because we do exactly the same thing 2 instructions down. Approved by: imp (mentor) Modified: projects/mips/sys/mips/mips/tlb.S Modified: projects/mips/sys/mips/mips/tlb.S ============================================================================== --- projects/mips/sys/mips/mips/tlb.S Thu Oct 22 02:51:31 2009 (r198354) +++ projects/mips/sys/mips/mips/tlb.S Thu Oct 22 04:35:32 2009 (r198355) @@ -231,7 +231,6 @@ LEAF(Mips_TLBFlush) ITLBNOPFIX mfc0 t1, COP_0_TLB_WIRED _MFC0 t0, COP_0_TLB_HI # Save the PID - _MTC0 v0, COP_0_TLB_HI # Mark entry high as invalid _MTC0 zero, COP_0_TLB_LO0 # Zero out low entry0. _MTC0 zero, COP_0_TLB_LO1 # Zero out low entry1. mtc0 zero, COP_0_TLB_PG_MASK # Zero out mask entry. @@ -250,12 +249,8 @@ LEAF(Mips_TLBFlush) 1: mtc0 t1, COP_0_TLB_INDEX # Set the index register. ITLBNOPFIX -#xxx imp -# _MTC0 t0, COP_0_TLB_HI # Restore the PID _MTC0 v0, COP_0_TLB_HI # Mark entry high as invalid addu t1, t1, 1 # Increment index. -#xxx imp -# addu t0, t0, 8 * 1024 addu v0, v0, 8 * 1024 MIPS_CPU_NOP_DELAY tlbwi # Write the TLB entry. @@ -481,7 +476,6 @@ LEAF(mips_TBIAP) _MFC0 ta0, COP_0_TLB_HI # Get current PID move t2, a0 mfc0 t1, COP_0_TLB_WIRED - li v0, MIPS_KSEG0_START # invalid address # # Load invalid entry, each TLB entry should have it's own bogus # address calculated by following expression: