diff mbox

[3/5] powerpc/64s: use alternative feature patching

Message ID 20170216183901.28611-4-npiggin@gmail.com (mailing list archive)
State Changes Requested
Headers show

Commit Message

Nicholas Piggin Feb. 16, 2017, 6:38 p.m. UTC
This reduces the number of nops for POWER8

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/kernel/idle_book3s.S | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

Comments

Gautham R Shenoy Feb. 28, 2017, 3:12 p.m. UTC | #1
Hi Nick,

On Fri, Feb 17, 2017 at 12:08 AM, Nicholas Piggin <npiggin@gmail.com> wrote:
> This reduces the number of nops for POWER8
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>

This change looks ok to me.

Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>

> ---
>  arch/powerpc/kernel/idle_book3s.S | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S
> index 1271344e5523..ab15dee371c9 100644
> --- a/arch/powerpc/kernel/idle_book3s.S
> +++ b/arch/powerpc/kernel/idle_book3s.S
> @@ -417,13 +417,8 @@ BEGIN_FTR_SECTION
>         rldicl  r5,r5,4,60
>         cmpd    cr4,r5,r4
>         bge     cr4,pnv_wakeup_tb_loss
> -       /*
> -        * Waking up without hypervisor state loss. Return to
> -        * reset vector
> -        */
> -       blr
>
> -END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
> +FTR_SECTION_ELSE
>
>         /*
>          * POWER ISA 2.07 or less.
> @@ -440,9 +435,13 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
>          * indicates we are waking with hypervisor state loss from nap.
>          */
>         bgt     cr3,.
> +ALT_FTR_SECTION_END_IFSET(CPU_FTR_ARCH_300)
>
> -       blr     /* Return back to System Reset vector from where
> -                  pnv_restore_hyp_resource was invoked */
> +       /*
> +        * Waking up without hypervisor state loss. Return to
> +        * reset vector
> +        */
> +       blr
>
>  /*
>   * Called if waking up from idle state which can cause either partial or
> --
> 2.11.0
>
diff mbox

Patch

diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S
index 1271344e5523..ab15dee371c9 100644
--- a/arch/powerpc/kernel/idle_book3s.S
+++ b/arch/powerpc/kernel/idle_book3s.S
@@ -417,13 +417,8 @@  BEGIN_FTR_SECTION
 	rldicl  r5,r5,4,60
 	cmpd	cr4,r5,r4
 	bge	cr4,pnv_wakeup_tb_loss
-	/*
-	 * Waking up without hypervisor state loss. Return to
-	 * reset vector
-	 */
-	blr
 
-END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
+FTR_SECTION_ELSE
 
 	/*
 	 * POWER ISA 2.07 or less.
@@ -440,9 +435,13 @@  END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
 	 * indicates we are waking with hypervisor state loss from nap.
 	 */
 	bgt	cr3,.
+ALT_FTR_SECTION_END_IFSET(CPU_FTR_ARCH_300)
 
-	blr	/* Return back to System Reset vector from where
-		   pnv_restore_hyp_resource was invoked */
+	/*
+	 * Waking up without hypervisor state loss. Return to
+	 * reset vector
+	 */
+	blr
 
 /*
  * Called if waking up from idle state which can cause either partial or