linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail.com>
Subject: [PATCH 1/9] powerpc/64s: Remove unnecessary relocation branch from idle handler
Date: Wed, 19 Apr 2017 23:05:43 +1000	[thread overview]
Message-ID: <20170419130551.32378-2-npiggin@gmail.com> (raw)
In-Reply-To: <20170419130551.32378-1-npiggin@gmail.com>

The system reset idle handler system_reset_idle_common is relocated, so
relocation is not required to branch to kvm_start_guest. The superfluous
relocation does not result in incorrect code, but it does not compile
outside of exception-64s.S (with fixed section definitions).

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/include/asm/exception-64s.h | 8 --------
 arch/powerpc/kernel/exceptions-64s.S     | 2 +-
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h
index 14752eee3d0c..ee21457e23d4 100644
--- a/arch/powerpc/include/asm/exception-64s.h
+++ b/arch/powerpc/include/asm/exception-64s.h
@@ -256,11 +256,6 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
 	ld	r9,area+EX_R9(r13);					\
 	bctr
 
-#define BRANCH_TO_KVM(reg, label)					\
-	__LOAD_FAR_HANDLER(reg, label);					\
-	mtctr	reg;							\
-	bctr
-
 #else
 #define BRANCH_TO_COMMON(reg, label)					\
 	b	label
@@ -268,9 +263,6 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
 #define BRANCH_LINK_TO_FAR(reg, label)					\
 	bl	label
 
-#define BRANCH_TO_KVM(reg, label)					\
-	b	label
-
 #define __BRANCH_TO_KVM_EXIT(area, label)				\
 	ld	r9,area+EX_R9(r13);					\
 	b	label
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 857bf7c5b946..7d496ee984fe 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -142,7 +142,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_300)
 	lbz	r0,HSTATE_HWTHREAD_REQ(r13)
 	cmpwi	r0,0
 	beq	1f
-	BRANCH_TO_KVM(r10, kvm_start_guest)
+	b	kvm_start_guest
 1:
 #endif
 
-- 
2.11.0

  reply	other threads:[~2017-04-19 13:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 13:05 [PATCH v2 0/9] idle fixes and changes for POWER8 and POWER9 Nicholas Piggin
2017-04-19 13:05 ` Nicholas Piggin [this message]
2017-04-23 11:53   ` [1/9] powerpc/64s: Remove unnecessary relocation branch from idle handler Michael Ellerman
2017-04-19 13:05 ` [PATCH 2/9] powerpc/64s: move remaining system reset idle code into idle_book3s.S Nicholas Piggin
2017-04-19 13:05 ` [PATCH 3/9] powerpc/64s: stop using bit in HSPRG0 to test winkle Nicholas Piggin
2017-04-19 13:05 ` [PATCH 4/9] powerpc/64s: use alternative feature patching Nicholas Piggin
2017-04-19 13:05 ` [PATCH 5/9] powerpc/64s: fix POWER9 machine check handler from stop state Nicholas Piggin
2017-04-19 13:05 ` [PATCH 6/9] powerpc/64s: idle expand core idle state bits Nicholas Piggin
2017-04-19 13:05 ` [PATCH 7/9] powerpc/64s: idle do not hold reservation longer than required Nicholas Piggin
2017-04-19 13:05 ` [PATCH 8/9] powerpc/64s: idle POWER8 avoid full state loss recovery where possible Nicholas Piggin
2017-04-19 13:05 ` [PATCH 9/9] powerpc/64s: Simplify POWER9 DD1 idle workaround code Nicholas Piggin

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=20170419130551.32378-2-npiggin@gmail.com \
    --to=npiggin@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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;
as well as URLs for NNTP newsgroup(s).