All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollisb@us.ibm.com>
To: avi@redhat.com
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Subject: [PATCH 12 of 14] kvm: ppc: optimize find first bit
Date: Wed, 05 Nov 2008 09:36:22 -0600	[thread overview]
Message-ID: <0f72dc03ee976363ca8d.1225899382@localhost.localdomain> (raw)
In-Reply-To: <patchbomb.1225899370@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)) {

  parent reply	other threads:[~2008-11-05 15:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-05 15:36 [PATCH 00 of 14] Kernel updates for PowerPC KVM Hollis Blanchard
2008-11-05 15:36 ` [PATCH 01 of 14] kvm: ppc: Move 440-specific TLB code into 44x_tlb.c Hollis Blanchard
2008-11-05 15:36 ` [PATCH 02 of 14] kvm: ppc: Rename "struct tlbe" to "struct kvmppc_44x_tlbe" Hollis Blanchard
2008-11-05 15:36 ` [PATCH 03 of 14] KVM: ppc: combine booke_guest.c and booke_host.c Hollis Blanchard
2008-11-05 15:36 ` [PATCH 04 of 14] KVM: ppc: Refactor powerpc.c to relocate 440-specific code Hollis Blanchard
2008-11-05 15:36 ` [PATCH 05 of 14] ppc: Create disassemble.h to extract instruction fields Hollis Blanchard
2008-11-05 15:36 ` [PATCH 06 of 14] KVM: ppc: refactor instruction emulation into generic and core-specific pieces Hollis Blanchard
2008-11-05 15:36 ` [PATCH 07 of 14] kvm: ppc: Move the last bits of 44x code out of booke.c Hollis Blanchard
2008-11-05 15:36 ` [PATCH 08 of 14] kvm: ppc: create struct kvm_vcpu_44x and introduce container_of() accessor Hollis Blanchard
2008-11-05 15:36 ` [PATCH 09 of 14] kvm: ppc: adjust vcpu types to support 64-bit cores Hollis Blanchard
2008-11-05 15:36 ` [PATCH 10 of 14] [PATCH] kvmppc: fix set regs to take care of msr change Hollis Blanchard
2008-11-05 15:36 ` [PATCH 11 of 14] kvm: ppc: optimize kvm stat handling Hollis Blanchard
2008-11-05 15:36 ` Hollis Blanchard [this message]
2008-11-05 15:36 ` [PATCH 13 of 14] kvm: ppc: optimize irq delivery path Hollis Blanchard
2008-11-05 15:36 ` [PATCH 14 of 14] kvm: ppc: improve trap emulation Hollis Blanchard
     [not found] ` <patchbomb.1225899370-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-11-06  9:12   ` [PATCH 00 of 14] Kernel updates for PowerPC KVM Avi Kivity
2008-11-06  9:12     ` 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.1225899382@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.