All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Buesch <mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
To: Benjamin Herrenschmidt
	<benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org,
	Benoit Boissinot
	<benoit.boissinot-vYW+cPY1g1pg9hUCZPvPmw@public.gmane.org>
Subject: Re: [RFC/PATCH] remove unneeded check in bcm43xx
Date: Tue, 11 Apr 2006 03:53:51 +0200	[thread overview]
Message-ID: <200604110353.52067.mb@bu3sch.de> (raw)
In-Reply-To: <1144719972.19353.24.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>

On Tuesday 11 April 2006 03:46, you wrote:
> 
> > Yes, I know they hit the message, that's from a message in some forum
> > that i got interested in the issue. It probably comes from an allocation
> > from:
> > http://www.linux-m32r.org/lxr/http/source/arch/powerpc/kernel/pci_direct_iommu.c#L32
> > 
> > Either the ppc code is wrong (it doesn't enforce dma_mask) either the
> > driver still works without the check.
> > 
> > Maybe ppc should do the same thing as i386:
> > 
> > 47         if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
> > 48                 gfp |= GFP_DMA;
> 
> PPC doesn't have a ZONE_DMA... PPC assumes that the whole memory is
> DMA'able... What happens here is that it works by "chance" on x86 ;)
> ZONE_DMA is a thing of the past that represents ISA DMA (below 16M iirc
> or something like that). Thus x86 historically maintained a separate
> allocation zone down there for ISA devices. What happens here is that
> the x86 code sort-of detects that the DMA mask isn't the full 32 bits
> and kicks everything down into ZONE_DMA. Makes things work, though the
> pressure on ZONE_DMA can often be high enough that you'll have a lot of
> failed allocations ...
> 
> PPC doesn't have ZONE_DMA, thus can't provide memory guaranteed to be
> below that limit.
> 
> Now, for ppc32, it should still sort-of work because all of lowmem is
> below 1Gb and people generally don't hack their lowmem size (well, I do
> but heh, that doesn't count :) and I don't think you'll get skb's in
> highmem. But ppc64 hits the problem and at this point, there is nothing
> I can do other than either implementing a split zone allocation mecanism
> in the ppc64 architecture

> for the sole sake of bcm43xx (ick !)

Nope. For every broadcom device, which has this stupid DMA engine.
That is b44 and bcm43xx, as far as I can tell. But likely there are more.

> or doing some trick with the iommu...

-- 
Greetings Michael.

  parent reply	other threads:[~2006-04-11  1:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-10  4:01 [RFC/PATCH] remove unneeded check in bcm43xx Benoit Boissinot
     [not found] ` <20060410040120.GA4860-vYW+cPY1g1pWj0EZb7rXcA@public.gmane.org>
2006-04-10  4:07   ` Michael Buesch
2006-04-10  4:22     ` Benoit Boissinot
     [not found]       ` <20060410042228.GN27596-vYW+cPY1g1pWj0EZb7rXcA@public.gmane.org>
2006-04-10  4:28         ` Michael Buesch
2006-04-10  4:38           ` Benoit Boissinot
2006-04-10 13:46           ` John W. Linville
2006-04-10 16:18             ` Arjan van de Ven
2006-04-10 22:13             ` Benoit Boissinot
2006-04-10 22:28               ` David S. Miller
2006-04-11  1:47               ` Benjamin Herrenschmidt
2006-04-11  1:46       ` Benjamin Herrenschmidt
     [not found]         ` <1144719972.19353.24.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2006-04-11  1:53           ` Michael Buesch [this message]
2006-04-11  2:23             ` Benoit Boissinot
2006-04-11  5:49         ` David S. Miller
     [not found]           ` <20060410.224933.39567033.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2006-04-11 16:05             ` Michael Buesch
2006-04-11 20:49           ` Benjamin Herrenschmidt
2006-04-11 21:34             ` David S. Miller
2006-04-11 22:20               ` Benjamin Herrenschmidt
2006-04-11 22:21               ` Benjamin Herrenschmidt
2006-04-11 22:30                 ` Benoit Boissinot
2006-04-11 22:35                   ` Benjamin Herrenschmidt
2006-04-11 22:35                     ` Benjamin Herrenschmidt
     [not found]                 ` <1144794077.19353.53.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2006-04-11 23:04                   ` Michael Buesch

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=200604110353.52067.mb@bu3sch.de \
    --to=mb-fseuscv1ubazqb+pc5nmwq@public.gmane.org \
    --cc=bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org \
    --cc=benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org \
    --cc=benoit.boissinot-vYW+cPY1g1pg9hUCZPvPmw@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.