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>
This commit is contained in:
Родитель
1b6766c7f3
Коммит
9ab80843c0
|
@ -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)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче