Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Oct 2009 04:35:32 +0000 (UTC)
From:      Neel Natu <neel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r198355 - projects/mips/sys/mips/mips
Message-ID:  <200910220435.n9M4ZWKf019152@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910220435.n9M4ZWKf019152>