[PATCH][2.6-mm] cpumask_t/x86_64 __flush_gart fix

From: Zwane Mwaikambo
Date: Wed Aug 13 2003 - 08:17:55 EST


Index: linux-2.6.0-test3-mm2-x86_64/arch/x86_64/kernel/pci-gart.c
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test3/arch/x86_64/kernel/pci-gart.c,v
retrieving revision 1.1.1.2
diff -u -p -B -r1.1.1.2 pci-gart.c
--- linux-2.6.0-test3-mm2-x86_64/arch/x86_64/kernel/pci-gart.c 13 Aug 2003 12:10:24 -0000 1.1.1.2
+++ linux-2.6.0-test3-mm2-x86_64/arch/x86_64/kernel/pci-gart.c 13 Aug 2003 12:50:14 -0000
@@ -141,15 +141,16 @@ static void free_iommu(unsigned long off
static void __flush_gart(struct pci_dev *dev)
{
unsigned long flags;
- int bus = dev ? dev->bus->number : -1;
+ int bus = dev ? dev->bus->number : -1;
+ cpumask_const_t bus_cpumask = pcibus_to_cpumask(bus);
int flushed = 0;
int i;

spin_lock_irqsave(&iommu_bitmap_lock, flags);
/* recheck flush count inside lock */
if (need_flush) {
- for (i = 0; northbridges[i]; i++) {
- if (bus >= 0 && !(pcibus_to_cpumask(bus) & (1UL << i)))
+ for (i = 0; northbridges[i]; i++) {
+ if (bus >= 0 && !(cpu_isset_const(i, bus_cpumask)))
continue;
pci_write_config_dword(northbridges[i], 0x9c,
northbridge_flush_word[i] | 1);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/