提交 bb48c2fc 编写于 作者: D David Daney 提交者: Gleb Natapov

mips/kvm: Cleanup .push/.pop directives in kvm_locore.S

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: NDavid Daney <david.daney@cavium.com>
Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NGleb Natapov <gleb@redhat.com>
上级 2c07ebbd
...@@ -55,12 +55,10 @@ ...@@ -55,12 +55,10 @@
* a0: run * a0: run
* a1: vcpu * a1: vcpu
*/ */
FEXPORT(__kvm_mips_vcpu_run)
.set push
.set noreorder .set noreorder
.set noat .set noat
FEXPORT(__kvm_mips_vcpu_run)
/* k0/k1 not being used in host kernel context */ /* k0/k1 not being used in host kernel context */
addiu k1, sp, -PT_SIZE addiu k1, sp, -PT_SIZE
LONG_S $0, PT_R0(k1) LONG_S $0, PT_R0(k1)
...@@ -229,15 +227,11 @@ FEXPORT(__kvm_mips_load_k0k1) ...@@ -229,15 +227,11 @@ FEXPORT(__kvm_mips_load_k0k1)
/* Jump to guest */ /* Jump to guest */
eret eret
.set pop
VECTOR(MIPSX(exception), unknown) VECTOR(MIPSX(exception), unknown)
/* /*
* Find out what mode we came from and jump to the proper handler. * 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 mtc0 k0, CP0_ERROREPC #01: Save guest k0
ehb #02: ehb #02:
...@@ -248,7 +242,6 @@ VECTOR(MIPSX(exception), unknown) ...@@ -248,7 +242,6 @@ VECTOR(MIPSX(exception), unknown)
addiu k0, k0, 0x2000 #06: Exception handler is installed @ offset 0x2000 addiu k0, k0, 0x2000 #06: Exception handler is installed @ offset 0x2000
j k0 #07: jump to the function j k0 #07: jump to the function
nop #08: branch delay slot nop #08: branch delay slot
.set push
VECTOR_END(MIPSX(exceptionEnd)) VECTOR_END(MIPSX(exceptionEnd))
.end MIPSX(exception) .end MIPSX(exception)
...@@ -258,10 +251,6 @@ VECTOR_END(MIPSX(exceptionEnd)) ...@@ -258,10 +251,6 @@ VECTOR_END(MIPSX(exceptionEnd))
* *
*/ */
NESTED (MIPSX(GuestException), CALLFRAME_SIZ, ra) NESTED (MIPSX(GuestException), CALLFRAME_SIZ, ra)
.set push
.set noat
.set noreorder
/* Get the VCPU pointer from DDTATA_LO */ /* Get the VCPU pointer from DDTATA_LO */
mfc0 k1, CP0_DDATA_LO mfc0 k1, CP0_DDATA_LO
addiu k1, k1, VCPU_HOST_ARCH addiu k1, k1, VCPU_HOST_ARCH
...@@ -583,7 +572,6 @@ __kvm_mips_return_to_host: ...@@ -583,7 +572,6 @@ __kvm_mips_return_to_host:
j ra j ra
nop nop
.set pop
VECTOR_END(MIPSX(GuestExceptionEnd)) VECTOR_END(MIPSX(GuestExceptionEnd))
.end MIPSX(GuestException) .end MIPSX(GuestException)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册