patch-2.4.9 linux/arch/alpha/kernel/pci_iommu.c
Next file: linux/arch/alpha/kernel/setup.c
Previous file: linux/arch/alpha/kernel/osf_sys.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Sun Aug 12 10:51:41 2001
- Orig file:
v2.4.8/linux/arch/alpha/kernel/pci_iommu.c
- Orig date:
Fri May 25 09:54:50 2001
diff -u --recursive --new-file v2.4.8/linux/arch/alpha/kernel/pci_iommu.c linux/arch/alpha/kernel/pci_iommu.c
@@ -55,9 +55,9 @@
base = arena->dma_base;
size = arena->size;
if (base + size > 0xfff00000) {
- int i = (0xfff00000 - base) >> PAGE_SHIFT;
- for (; i < (0x100000 >> PAGE_SHIFT); i++)
- arena->ptes[i] = IOMMU_INVALID_PTE;
+ int i, fixup_start = (0xfff00000 - base) >> PAGE_SHIFT;
+ for (i= 0; i < (0x100000 >> PAGE_SHIFT); i++)
+ arena->ptes[fixup_start+i] = IOMMU_INVALID_PTE;
}
}
@@ -354,7 +354,7 @@
Write dma_length of each leader with the combined lengths of
the mergable followers. */
-static inline void
+static void
sg_classify(struct scatterlist *sg, struct scatterlist *end, int virt_ok)
{
unsigned long next_vaddr;
@@ -436,10 +436,7 @@
/* Otherwise, break up the remaining virtually contiguous
hunks into individual direct maps. */
- for (sg = leader; sg < end; ++sg)
- if (sg->dma_address == 1 || sg->dma_address == -2)
- sg->dma_address = 0;
-
+ sg_classify(leader, end, 0);
/* Retry. */
return sg_fill(leader, end, out, arena, max_dma);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)