From: Hollis Blanchard <hollisb@us.ibm.com>
To: avi@redhat.com
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Subject: [PATCH 7 of 9] kvm: ppc: optimize find first bit
Date: Tue, 04 Nov 2008 15:00:13 -0600 [thread overview]
Message-ID: <0f72dc03ee976363ca8d.1225832413@localhost.localdomain> (raw)
In-Reply-To: <patchbomb.1225832406@localhost.localdomain>
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>
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -222,7 +222,7 @@ void kvmppc_core_deliver_interrupts(stru
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)) {
next prev parent reply other threads:[~2008-11-04 21:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-04 21:00 [PATCH 0 of 9] Kernel updates for PowerPC KVM Hollis Blanchard
2008-11-04 21:00 ` [PATCH 1 of 9] KVM: ppc: refactor instruction emulation into generic and core-specific pieces Hollis Blanchard
2008-11-04 21:00 ` [PATCH 2 of 9] kvm: ppc: Move the last bits of 44x code out of booke.c Hollis Blanchard
2008-11-04 21:00 ` [PATCH 3 of 9] kvm: ppc: create struct kvm_vcpu_44x and introduce container_of() accessor Hollis Blanchard
2008-11-04 21:00 ` [PATCH 4 of 9] kvm: ppc: adjust vcpu types to support 64-bit cores Hollis Blanchard
2008-11-04 21:00 ` [PATCH 5 of 9] [PATCH] kvmppc: fix set regs to take care of msr change Hollis Blanchard
2008-11-04 21:00 ` [PATCH 6 of 9] kvm: ppc: optimize kvm stat handling Hollis Blanchard
2008-11-04 21:00 ` Hollis Blanchard [this message]
2008-11-04 21:00 ` [PATCH 8 of 9] kvm: ppc: optimize irq delivery path Hollis Blanchard
2008-11-04 21:00 ` [PATCH 9 of 9] kvm: ppc: improve trap emulation Hollis Blanchard
2008-11-05 10:40 ` [PATCH 0 of 9] Kernel updates for PowerPC KVM Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0f72dc03ee976363ca8d.1225832413@localhost.localdomain \
--to=hollisb@us.ibm.com \
--cc=avi@redhat.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox