Displaying 20 results from an estimated 42 matches for "find_first_bit".
2008 Apr 08
1
[PATCH] use NR_IRQS for irq count
...c DECLARE_BITMAP(handled, NINTR);
+static DECLARE_BITMAP(pending, NR_IRQS);
+static DECLARE_BITMAP(handled, NR_IRQS);
#define irqh_on(which, bit) test_bit(bit, which)
#define irqh_set(which, bit) set_bit(bit, which)
#define irqh_clear(which, bit) clear_bit(bit, which)
-#define irqh_ffs(which) find_first_bit(which, NINTR)
+#define irqh_ffs(which) find_first_bit(which, NR_IRQS)
static irqreturn_t
irqh_interrupt(int irq, void *p)
@@ -92,7 +90,7 @@ irqh_dev_write(struct file *fp, const ch
if (pdp) {
if (pci_enable_device(pdp))
ERROR("device not enabled\n");
- if ((unsigned)(n...
2008 Apr 08
1
[PATCH] use NR_IRQS for irq count
...c DECLARE_BITMAP(handled, NINTR);
+static DECLARE_BITMAP(pending, NR_IRQS);
+static DECLARE_BITMAP(handled, NR_IRQS);
#define irqh_on(which, bit) test_bit(bit, which)
#define irqh_set(which, bit) set_bit(bit, which)
#define irqh_clear(which, bit) clear_bit(bit, which)
-#define irqh_ffs(which) find_first_bit(which, NINTR)
+#define irqh_ffs(which) find_first_bit(which, NR_IRQS)
static irqreturn_t
irqh_interrupt(int irq, void *p)
@@ -92,7 +90,7 @@ irqh_dev_write(struct file *fp, const ch
if (pdp) {
if (pci_enable_device(pdp))
ERROR("device not enabled\n");
- if ((unsigned)(n...
2013 Sep 12
3
[PATCH 1/1 V3] x86/AMD-Vi: Add additional check for invalid special->handle
...return;
+ hpet_sbdf.id = id;
hpet_sbdf.bdf = PCI_BDF(bus, dev, func);
hpet_sbdf.seg = seg;
hpet_sbdf.cmdline = 1;
}
custom_param("ivrs_hpet[", parse_ivrs_hpet);
+static bool_t is_ioapic_overidden(u16 seg, u16 bdf, u8 handle)
+{
+ bool_t ret = 0;
+ int apic = find_first_bit(ioapic_cmdline, ARRAY_SIZE(ioapic_sbdf));
+
+ while ( apic < ARRAY_SIZE(ioapic_sbdf) )
+ {
+ if ( ioapic_sbdf[apic].bdf == bdf &&
+ ioapic_sbdf[apic].seg == seg )
+ break;
+ apic = find_next_bit(ioapic_cmdline, ARRAY_SIZE(ioapic_sbdf),
+...
2023 Jun 27
0
[PATCH] fs: ocfs: fix potential deadlock on &qs->qs_lock
...+92,9 @@ static void o2quo_make_decision(struct work_struct *work)
int quorum;
int lowest_hb, lowest_reachable = 0, fence = 0;
struct o2quo_state *qs = &o2quo_state;
+ unsigned long flags;
- spin_lock(&qs->qs_lock);
+ spin_lock_irqsave(&qs->qs_lock, flags);
lowest_hb = find_first_bit(qs->qs_hb_bm, O2NM_MAX_NODES);
if (lowest_hb != O2NM_MAX_NODES)
@@ -146,14 +147,14 @@ static void o2quo_make_decision(struct work_struct *work)
out:
if (fence) {
- spin_unlock(&qs->qs_lock);
+ spin_unlock_irqrestore(&qs->qs_lock, flags);
o2quo_fence_self();
} else {...
2023 Jun 27
0
[PATCH] fs: ocfs: fix potential deadlock on &qs->qs_lock
...+92,9 @@ static void o2quo_make_decision(struct work_struct *work)
int quorum;
int lowest_hb, lowest_reachable = 0, fence = 0;
struct o2quo_state *qs = &o2quo_state;
+ unsigned long flags;
- spin_lock(&qs->qs_lock);
+ spin_lock_irqsave(&qs->qs_lock, flags);
lowest_hb = find_first_bit(qs->qs_hb_bm, O2NM_MAX_NODES);
if (lowest_hb != O2NM_MAX_NODES)
@@ -146,14 +147,14 @@ static void o2quo_make_decision(struct work_struct *work)
out:
if (fence) {
- spin_unlock(&qs->qs_lock);
+ spin_unlock_irqrestore(&qs->qs_lock, flags);
o2quo_fence_self();
} else {...
2009 Jan 27
5
[PATCH 2/2] Add VMDq support to ixgbe
..._type_trans(skb, adapter->netdev);
- skb->protocol = eth_type_trans(skb, adapter->netdev);
#ifndef IXGBE_NO_LRO
if (ixgbe_lro_ring_queue(rx_ring->lrolist,
adapter, skb, staterr, rx_ring, rx_desc) == 0) {
@@ -1475,6 +1531,8 @@ static irqreturn_t ixgbe_msix_clean_rx(i
r_idx = find_first_bit(q_vector->rxr_idx, adapter->num_rx_queues);
for (i = 0; i < q_vector->rxr_count; i++) {
rx_ring = &(adapter->rx_ring[r_idx]);
+ if (!rx_ring->active)
+ continue;
rx_ring->total_bytes = 0;
rx_ring->total_packets = 0;
#ifndef CONFIG_IXGBE_NAPI
@@ -1501,6 +15...
2013 Aug 28
0
[PATCH] percpu ida: Switch to cpumask_t, add some comments
...cpumask_weight(&pool->cpus_have_tags);
cpus_have_tags * IDA_PCPU_SIZE > pool->nr_tags / 2;
cpus_have_tags--) {
- cpu = find_next_bit(pool->cpus_have_tags, nr_cpu_ids, cpu);
+ cpu = cpumask_next(cpu, &pool->cpus_have_tags);
- if (cpu == nr_cpu_ids)
- cpu = find_first_bit(pool->cpus_have_tags, nr_cpu_ids);
+ if (cpu >= nr_cpu_ids)
+ cpu = cpumask_first(&pool->cpus_have_tags);
- if (cpu == nr_cpu_ids)
+ if (cpu >= nr_cpu_ids)
BUG();
pool->cpu_last_stolen = cpu;
remote = per_cpu_ptr(pool->tag_cpu, cpu);
- clear_bit(cpu, pool...
2007 May 02
3
[RELEASE] Lguest for 2.6.21
Hi all,
Lguest is a simple hypervisor which runs Linux under Linux, without
needing VT hardware.
Two people asked if I had a version of lguest which worked on
other-than-bleeding-edge-mm kernels, so I did a backport of the latest
version to 2.6.21.
http://lguest.ozlabs.org/lguest-2.6.21-254.patch.gz
See Documentation/lguest/lguest.txt for how to run,
drivers/lguest/README for the draft code
2007 May 02
3
[RELEASE] Lguest for 2.6.21
Hi all,
Lguest is a simple hypervisor which runs Linux under Linux, without
needing VT hardware.
Two people asked if I had a version of lguest which worked on
other-than-bleeding-edge-mm kernels, so I did a backport of the latest
version to 2.6.21.
http://lguest.ozlabs.org/lguest-2.6.21-254.patch.gz
See Documentation/lguest/lguest.txt for how to run,
drivers/lguest/README for the draft code
2013 Aug 28
12
[PATCH V2] x86/AMD-Vi: Add additional check for invalid special->handle
From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
This patch add an additional logic to check for the often case when the
special->handle is not initialized due to firmware bugs.
but the special->usedid is correct. If users overide this using the
command line option ivrs_ioapic, then it should use the value instead.
---
This patch is supposed to follow the patches:
2008 Mar 31
1
[05/17][PATCH] kvm/ia64 : Add head files for kvm/ia64
Hi Xiantao,
More comments.
Zhang, Xiantao wrote:
>>From 696b9eea9f5001a7b7a07c0e58514aa10306b91a Mon Sep 17 00:00:00 2001
> From: Xiantao Zhang <xiantao.zhang at intel.com>
> Date: Fri, 28 Mar 2008 09:51:36 +0800
> Subject: [PATCH] KVM:IA64 : Add head files for kvm/ia64
>
> ia64_regs: some defintions for special registers
> which aren't defined in
2008 Mar 31
1
[05/17][PATCH] kvm/ia64 : Add head files for kvm/ia64
Hi Xiantao,
More comments.
Zhang, Xiantao wrote:
>>From 696b9eea9f5001a7b7a07c0e58514aa10306b91a Mon Sep 17 00:00:00 2001
> From: Xiantao Zhang <xiantao.zhang at intel.com>
> Date: Fri, 28 Mar 2008 09:51:36 +0800
> Subject: [PATCH] KVM:IA64 : Add head files for kvm/ia64
>
> ia64_regs: some defintions for special registers
> which aren't defined in
2007 May 04
1
[PATCH 1/3] Documentation and example updates
1) Example code: old libc headers don't have SIOCBRADDIF, and old zlibs
don't have gzdirect() -- it's a sanity check anyway.
2) Some people don't build in their source directories, so .config
isn't there (thanks to Tony Breeds <tony@bakeyournoodle.com>).
3) Point out that guest and host kernel are usually the same.
4) Set the "no checksum" option on the
2007 May 04
1
[PATCH 1/3] Documentation and example updates
1) Example code: old libc headers don't have SIOCBRADDIF, and old zlibs
don't have gzdirect() -- it's a sanity check anyway.
2) Some people don't build in their source directories, so .config
isn't there (thanks to Tony Breeds <tony@bakeyournoodle.com>).
3) Point out that guest and host kernel are usually the same.
4) Set the "no checksum" option on the
2008 Mar 31
4
[04/17] [PATCH] Add kvm arch-specific core code for kvm/ia64.-V8
Zhang, Xiantao wrote:
>>From 62895ff991d48398a77afdbf7f2bef127e802230 Mon Sep 17 00:00:00 2001
> From: Xiantao Zhang <xiantao.zhang at intel.com>
> Date: Fri, 28 Mar 2008 09:49:57 +0800
> Subject: [PATCH] KVM: IA64: Add kvm arch-specific core code for
> kvm/ia64.
>
> kvm_ia64.c is created to handle kvm ia64-specific core logic.
> Signed-off-by: Xiantao Zhang
2008 Mar 31
4
[04/17] [PATCH] Add kvm arch-specific core code for kvm/ia64.-V8
Zhang, Xiantao wrote:
>>From 62895ff991d48398a77afdbf7f2bef127e802230 Mon Sep 17 00:00:00 2001
> From: Xiantao Zhang <xiantao.zhang at intel.com>
> Date: Fri, 28 Mar 2008 09:49:57 +0800
> Subject: [PATCH] KVM: IA64: Add kvm arch-specific core code for
> kvm/ia64.
>
> kvm_ia64.c is created to handle kvm ia64-specific core logic.
> Signed-off-by: Xiantao Zhang
2013 Aug 16
0
[PATCH-v3 1/4] idr: Percpu ida
...t percpu_ida_cpu *remote;
+
+ for (cpus_have_tags = bitmap_weight(pool->cpus_have_tags, nr_cpu_ids);
+ cpus_have_tags * IDA_PCPU_SIZE > pool->nr_tags / 2;
+ cpus_have_tags--) {
+ cpu = find_next_bit(pool->cpus_have_tags, nr_cpu_ids, cpu);
+
+ if (cpu == nr_cpu_ids)
+ cpu = find_first_bit(pool->cpus_have_tags, nr_cpu_ids);
+
+ if (cpu == nr_cpu_ids)
+ BUG();
+
+ pool->cpu_last_stolen = cpu;
+ remote = per_cpu_ptr(pool->tag_cpu, cpu);
+
+ clear_bit(cpu, pool->cpus_have_tags);
+
+ if (remote == tags)
+ continue;
+
+ spin_lock(&remote->lock);
+
+ if (remot...
2010 Feb 01
4
[PATCH 1/3] Introduce nouveau_bo_wait for waiting on a BO with a GPU channel
nouveau_bo_wait will make the GPU channel wait for fence if possible,
otherwise falling back to waiting with the CPU using ttm_bo_wait.
The nouveau_fence_sync function currently returns -ENOSYS, and is
the focus of the next patch.
Signed-off-by: Luca Barbieri <luca at luca-barbieri.com>
---
drivers/gpu/drm/nouveau/nouveau_bo.c | 68 ++++++++++++++++++++++++++++++-
2013 Apr 03
0
[PATCH] Btrfs-progs: add a free space cache checker to fsck
...+#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
+#define BITS_TO_U64(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u64))
+#define BITS_TO_U32(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u32))
+
+#define for_each_set_bit(bit, addr, size) \
+ for ((bit) = find_first_bit((addr), (size)); \
+ (bit) < (size); \
+ (bit) = find_next_bit((addr), (size), (bit) + 1))
+
+/* same as for_each_set_bit() but use bit as value to start with */
+#define for_each_set_bit_from(bit, addr, size) \
+ for ((bit) = find_next_bit((addr), (size), (bit)); \
+ (bit) &...
2013 Feb 13
14
[Bridge] [PATCH v10 net-next 00/12] VLAN filtering/VLAN aware bridge
Changes since v9:
* series re-ordering so make functionality more distinct. Basic vlan
filtering is patches 1-4. Support for PVID/untagged vlans is patches
5 and 6. VLAN support for FDB/MDB is patches 7-11. Patch 12 is
still additional egress policy.
* Slight simplification to code that extracts the VID from skb. Since we
now depend on the vlan module, at the time of input skb_tci is