Thread (7 messages) flat view 7 messages, 3 authors, 2012-07-11

Re: [PATCH] powerpc/booke: Eliminate rfi from exception entry path.

From: Alexander Graf <hidden>
Date: 2012-07-11 00:45:00

On 11.07.2012, at 02:34, Scott Wood wrote:
Unlike classic, we don't really need the MSR change to be atomic with =
the
branch.  This eliminates a trap as a KVM guest (in the absence of
hardware hypervisor extensions), where mtmsr is paravirtualized but =
rfi
quoted hunk ↗ jump to hunk
is not.  For a virtualized guest without any paravirtualization, this
eliminates an additional two traps (SRR0/1).
=20
Signed-off-by: Scott Wood <redacted>
---
arch/powerpc/kernel/entry_32.S |   16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
=20
diff --git a/arch/powerpc/kernel/entry_32.S =
b/arch/powerpc/kernel/entry_32.S
quoted hunk ↗ jump to hunk
index ba3aeb4..6bb637c 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -193,6 +193,9 @@ transfer_to_handler_cont:
	lwz	r11,0(r9)		/* virtual address of handler */
	lwz	r9,4(r9)		/* where to go when done */
#ifdef CONFIG_TRACE_IRQFLAGS
+#ifdef CONFIG_BOOKE
+	mtmsr	r10
+#else
	lis	r12,reenable_mmu@h
	ori	r12,r12,reenable_mmu@l
	mtspr	SPRN_SRR0,r12
@@ -201,6 +204,7 @@ transfer_to_handler_cont:
	RFI
reenable_mmu:				/* re-enable mmu so we can */
	mfmsr	r10
+#endif /* !CONFIG_BOOKE */
	lwz	r12,_MSR(r1)
	xor	r10,r10,r12
	andi.	r10,r10,MSR_EE		/* Did EE change? */
@@ -247,11 +251,23 @@ reenable_mmu:				/* =
re-enable mmu so we can */
	mtlr	r9
	bctr				/* jump to handler */
#else /* CONFIG_TRACE_IRQFLAGS */
+#ifdef CONFIG_BOOKE
+	/*
+	 * We're not changing address space on Book E, and the extra rfi
+	 * can hurt when virtualized without hardware support -- whereas
+	 * mtmsr can be paravirtualized.
We can always paravirtualize RFI as well if it makes sense.


Alex
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help