Patchwork [25/37] KVM: PPC: booke: BOOKE_IRQPRIO_MAX is n+1

login
register
mail settings
Submitter Alexander Graf
Date Feb. 24, 2012, 2:26 p.m.
Message ID <1330093591-19523-26-git-send-email-agraf@suse.de>
Download mbox | patch
Permalink /patch/142915/
State Not Applicable
Headers show

Comments

Alexander Graf - Feb. 24, 2012, 2:26 p.m.
The semantics of BOOKE_IRQPRIO_MAX changed to denote the highest available
irqprio + 1, so let's reflect that in the code too.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 arch/powerpc/kvm/booke.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 3fcec2c..288bc05 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -425,7 +425,7 @@  static void kvmppc_core_check_exceptions(struct kvm_vcpu *vcpu)
 	}
 
 	priority = __ffs(*pending);
-	while (priority <= BOOKE_IRQPRIO_MAX) {
+	while (priority < BOOKE_IRQPRIO_MAX) {
 		if (kvmppc_booke_irqprio_deliver(vcpu, priority))
 			break;