aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm
diff options
context:
space:
mode:
authorHollis Blanchard <hollisb@us.ibm.com>2008-11-05 10:36:22 -0500
committerAvi Kivity <avi@redhat.com>2008-12-31 09:52:23 -0500
commit9ab80843c01ac25139e635d018467e528729a317 (patch)
tree725d1926e9fc26e8dfe6f51e2f15b2c91c673022 /arch/powerpc/kvm
parent1b6766c7f3533c5d03668e11dd5617ae4a52e5a8 (diff)
KVM: ppc: optimize find first bit
Since we use a unsigned long here anyway we can use the optimized __ffs. Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com> Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r--arch/powerpc/kvm/booke.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index b285e3d32466..0f064719162c 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -222,7 +222,7 @@ void kvmppc_core_deliver_interrupts(struct kvm_vcpu *vcpu)
222 unsigned int exception; 222 unsigned int exception;
223 unsigned int priority; 223 unsigned int priority;
224 224
225 priority = find_first_bit(pending, BITS_PER_BYTE * sizeof(*pending)); 225 priority = __ffs(*pending);
226 while (priority <= BOOKE_MAX_INTERRUPT) { 226 while (priority <= BOOKE_MAX_INTERRUPT) {
227 exception = priority_exception[priority]; 227 exception = priority_exception[priority];
228 if (kvmppc_can_deliver_interrupt(vcpu, exception)) { 228 if (kvmppc_can_deliver_interrupt(vcpu, exception)) {