public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@transmeta.com>
Subject: Re: Kernel diff_small_2.4.5pre4_2.4.5pre5
Date: Tue, 22 May 2001 22:14:18 +0200	[thread overview]
Message-ID: <20010522221418.J15155@athlon.random> (raw)
In-Reply-To: <200105222004.f4MK4dR24584@athlon.random>
In-Reply-To: <200105222004.f4MK4dR24584@athlon.random>; from andrea@athlon.random on Tue, May 22, 2001 at 10:04:39PM +0200

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

           reply	other threads:[~2001-05-22 20:14 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200105222004.f4MK4dR24584@athlon.random>]

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=20010522221418.J15155@athlon.random \
    --to=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox