diff options
author | Hollis Blanchard <hollisb@us.ibm.com> | 2008-11-05 16:36:22 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 15:52:23 +0100 |
commit | 9ab80843c01ac25139e635d018467e528729a317 (patch) | |
tree | 725d1926e9fc26e8dfe6f51e2f15b2c91c673022 /arch/powerpc/kvm/booke.c | |
parent | KVM: ppc: optimize kvm stat handling (diff) | |
download | linux-9ab80843c01ac25139e635d018467e528729a317.tar.xz linux-9ab80843c01ac25139e635d018467e528729a317.zip |
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/booke.c')
-rw-r--r-- | arch/powerpc/kvm/booke.c | 2 |
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) 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)) { |