* Re: Kernel diff_small_2.4.5pre4_2.4.5pre5
[not found] <200105222004.f4MK4dR24584@athlon.random>
@ 2001-05-22 20:14 ` Andrea Arcangeli
0 siblings, 0 replies; only message in thread
From: Andrea Arcangeli @ 2001-05-22 20:14 UTC (permalink / raw)
To: linux-kernel, Linus Torvalds
On Tue, May 22, 2001 at 10:04:39PM +0200, Andrea Arcangeli wrote:
> diff -urN 2.4.5pre4/arch/alpha/kernel/pci_iommu.c 2.4.5pre5/arch/alpha/kernel/pci_iommu.c
> --- 2.4.5pre4/arch/alpha/kernel/pci_iommu.c Sun Apr 1 01:17:07 2001
> +++ 2.4.5pre5/arch/alpha/kernel/pci_iommu.c Tue May 22 22:04:07 2001
> @@ -402,8 +402,20 @@
> paddr &= ~PAGE_MASK;
> npages = calc_npages(paddr + size);
> dma_ofs = iommu_arena_alloc(arena, npages);
> - if (dma_ofs < 0)
> - return -1;
> + if (dma_ofs < 0) {
> + /* If we attempted a direct map above but failed, die. */
> + if (leader->dma_address == 0)
> + return -1;
> +
> + /* Otherwise, break up the remaining virtually contiguous
> + hunks into individual direct maps. */
> + for (sg = leader; sg < end; ++sg)
> + if (sg->dma_address == 2 || sg->dma_address == -2)
> + sg->dma_address = 0;
> +
> + /* Retry. */
> + return sg_fill(leader, end, out, arena, max_dma);
> + }
>
> out->dma_address = arena->dma_base + dma_ofs*PAGE_SIZE + paddr;
> out->dma_length = size;
this is just broken as I said a few hours ago on l-k. please replace ==
2 with == 1 as described in earlier email. However it's not a
showstopper because it will trigger only after running of pci mappings
(and by that time things are going to break pretty soon anyways on the
much bigger than 2G boxes, where the 2G direct window has low probablity
to save you), the fact I found this patch in in I assume is your
agreemnt that the pci mapping bugs are an issue also for 2.4, good.
I couldn't hack all the day long today, I will finish the alpha updates
before tomorrow though.
Andrea
^ permalink raw reply [flat|nested] only message in thread