public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney.cavm@gmail.com>
To: linux-mips@linux-mips.org, ralf@linux-mips.org,
	kvm@vger.kernel.org, Sanjay Lal <sanjayl@kymasys.com>,
	Gleb Natapov <gleb@redhat.com>
Cc: linux-kernel@vger.kernel.org, David Daney <david.daney@cavium.com>
Subject: [PATCH 2/3] mips/kvm: Cleanup .push/.pop directives in kvm_locore.S
Date: Thu,  1 Aug 2013 13:22:34 -0700	[thread overview]
Message-ID: <1375388555-4045-3-git-send-email-ddaney.cavm@gmail.com> (raw)
In-Reply-To: <1375388555-4045-1-git-send-email-ddaney.cavm@gmail.com>

From: David Daney <david.daney@cavium.com>

There are:
	.set	push
	.set	noreorder
	.set	noat
	 .
	 .
	 .
	.set	pop

Sequences all over the place in this file, but in some places the
final ".set pop" is erroneously converted to ".set push", so none of
these really do what they appear to.

Clean up the whole mess by moving ".set noreorder", ".set noat" to the
top, and get rid of everything else.

Generated object code is unchanged.

Signed-off-by: David Daney <david.daney@cavium.com>
---
 arch/mips/kvm/kvm_locore.S | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/arch/mips/kvm/kvm_locore.S b/arch/mips/kvm/kvm_locore.S
index 2b4fdd1..fdc169d 100644
--- a/arch/mips/kvm/kvm_locore.S
+++ b/arch/mips/kvm/kvm_locore.S
@@ -55,12 +55,10 @@
  * a0: run
  * a1: vcpu
  */
-
-FEXPORT(__kvm_mips_vcpu_run)
-	.set	push
 	.set	noreorder
 	.set	noat
 
+FEXPORT(__kvm_mips_vcpu_run)
 	/* k0/k1 not being used in host kernel context */
 	addiu	k1, sp, -PT_SIZE
 	LONG_S	$0, PT_R0(k1)
@@ -229,15 +227,11 @@ FEXPORT(__kvm_mips_load_k0k1)
 
 	/* Jump to guest */
 	eret
-	.set	pop
 
 VECTOR(MIPSX(exception), unknown)
 /*
  * Find out what mode we came from and jump to the proper handler.
  */
-	.set	push
-	.set	noat
-	.set	noreorder
 	mtc0	k0, CP0_ERROREPC	#01: Save guest k0
 	ehb				#02:
 
@@ -248,7 +242,6 @@ VECTOR(MIPSX(exception), unknown)
 	addiu	k0, k0, 0x2000		#06: Exception handler is installed @ offset 0x2000
 	j	k0			#07: jump to the function
 	 nop				#08: branch delay slot
-	.set	push
 VECTOR_END(MIPSX(exceptionEnd))
 .end MIPSX(exception)
 
@@ -258,10 +251,6 @@ VECTOR_END(MIPSX(exceptionEnd))
  *
  */
 NESTED (MIPSX(GuestException), CALLFRAME_SIZ, ra)
-	.set	push
-	.set	noat
-	.set	noreorder
-
 	/* Get the VCPU pointer from DDTATA_LO */
 	mfc0	k1, CP0_DDATA_LO
 	addiu	k1, k1, VCPU_HOST_ARCH
@@ -583,7 +572,6 @@ __kvm_mips_return_to_host:
 	j       ra
 	 nop
 
-	.set    pop
 VECTOR_END(MIPSX(GuestExceptionEnd))
 .end MIPSX(GuestException)
 
-- 
1.7.11.7


  parent reply	other threads:[~2013-08-01 20:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-01 20:22 [PATCH 0/3] mips/kvm: Code cleanups for kvm_locore.S David Daney
2013-08-01 20:22 ` [PATCH 1/3] mips/kvm: Improve code formatting in arch/mips/kvm/kvm_locore.S David Daney
2013-08-05 13:17   ` James Hogan
2013-08-05 13:21     ` Ralf Baechle
2013-08-05 13:43       ` Gleb Natapov
2013-08-05 16:52         ` David Daney
2013-08-05 17:06         ` Ralf Baechle
2013-08-05 17:22           ` Gleb Natapov
2013-08-01 20:22 ` David Daney [this message]
2013-08-01 20:22 ` [PATCH 3/3] mips/kvm: Make kvm_locore.S 64-bit buildable/safe David Daney
2013-08-09 11:50 ` [PATCH 0/3] mips/kvm: Code cleanups for kvm_locore.S Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1375388555-4045-3-git-send-email-ddaney.cavm@gmail.com \
    --to=ddaney.cavm@gmail.com \
    --cc=david.daney@cavium.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=sanjayl@kymasys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox