summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHollis Blanchard <hollisb@us.ibm.com>2008-11-05 09:36:22 -0600
committerAvi Kivity <avi@redhat.com>2008-12-31 16:52:23 +0200
commit9ab80843c01ac25139e635d018467e528729a317 (patch)
tree725d1926e9fc26e8dfe6f51e2f15b2c91c673022 /arch
parent1b6766c7f3533c5d03668e11dd5617ae4a52e5a8 (diff)
downloadop-kernel-dev-9ab80843c01ac25139e635d018467e528729a317.zip
op-kernel-dev-9ab80843c01ac25139e635d018467e528729a317.tar.gz
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')
-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 b285e3d..0f06471 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)
unsigned int exception;
unsigned int priority;
- priority = find_first_bit(pending, BITS_PER_BYTE * sizeof(*pending));
+ priority = __ffs(*pending);
while (priority <= BOOKE_MAX_INTERRUPT) {
exception = priority_exception[priority];
if (kvmppc_can_deliver_interrupt(vcpu, exception)) {
OpenPOWER on IntegriCloud