All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: PPC: Book3S HV P9: Remove unused ri_set local variable
@ 2021-12-01  5:21 Nicholas Piggin
  2021-12-15  0:40 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Nicholas Piggin @ 2021-12-01  5:21 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Nicholas Piggin

ri_set is set and never used.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
This patch is against powerpc next. It's causing warnings with new
gcc now.

Thanks,
Nick

 arch/powerpc/kvm/book3s_hv_p9_entry.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/arch/powerpc/kvm/book3s_hv_p9_entry.c b/arch/powerpc/kvm/book3s_hv_p9_entry.c
index ebb4781859e2..a28e5b3daabd 100644
--- a/arch/powerpc/kvm/book3s_hv_p9_entry.c
+++ b/arch/powerpc/kvm/book3s_hv_p9_entry.c
@@ -768,7 +768,6 @@ int kvmhv_vcpu_entry_p9(struct kvm_vcpu *vcpu, u64 time_limit, unsigned long lpc
 	s64 hdec, dec;
 	u64 purr, spurr;
 	u64 *exsave;
-	bool ri_set;
 	int trap;
 	unsigned long msr;
 	unsigned long host_hfscr;
@@ -968,18 +967,12 @@ int kvmhv_vcpu_entry_p9(struct kvm_vcpu *vcpu, u64 time_limit, unsigned long lpc
 	/* 0x2 bit for HSRR is only used by PR and P7/8 HV paths, clear it */
 	trap = local_paca->kvm_hstate.scratch0 & ~0x2;
 
-	/* HSRR interrupts leave MSR[RI] unchanged, SRR interrupts clear it. */
-	ri_set = false;
-	if (likely(trap > BOOK3S_INTERRUPT_MACHINE_CHECK)) {
-		if (trap != BOOK3S_INTERRUPT_SYSCALL &&
-				(vcpu->arch.shregs.msr & MSR_RI))
-			ri_set = true;
+	if (likely(trap > BOOK3S_INTERRUPT_MACHINE_CHECK))
 		exsave = local_paca->exgen;
-	} else if (trap == BOOK3S_INTERRUPT_SYSTEM_RESET) {
+	else if (trap == BOOK3S_INTERRUPT_SYSTEM_RESET)
 		exsave = local_paca->exnmi;
-	} else { /* trap == 0x200 */
+	else /* trap == 0x200 */
 		exsave = local_paca->exmc;
-	}
 
 	vcpu->arch.regs.gpr[1] = local_paca->kvm_hstate.scratch1;
 	vcpu->arch.regs.gpr[3] = local_paca->kvm_hstate.scratch2;
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] KVM: PPC: Book3S HV P9: Remove unused ri_set local variable
  2021-12-01  5:21 [PATCH] KVM: PPC: Book3S HV P9: Remove unused ri_set local variable Nicholas Piggin
@ 2021-12-15  0:40 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2021-12-15  0:40 UTC (permalink / raw)
  To: Nicholas Piggin, linuxppc-dev

On Wed, 1 Dec 2021 15:21:12 +1000, Nicholas Piggin wrote:
> ri_set is set and never used.
> 
> 

Applied to powerpc/next.

[1/1] KVM: PPC: Book3S HV P9: Remove unused ri_set local variable
      https://git.kernel.org/powerpc/c/f6a1987773a5908bae7bcadbeec0bcab25df7b20

cheers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-15  0:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01  5:21 [PATCH] KVM: PPC: Book3S HV P9: Remove unused ri_set local variable Nicholas Piggin
2021-12-15  0:40 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.