From: Christoph Hellwig <hch@lst.de>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
Christian Zigotzky <chzigotzky@xenosoft.de>,
linuxppc-dev@lists.ozlabs.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [BISECTED REGRESSION] b43legacy broken on G4 PowerBook
Date: Thu, 6 Jun 2019 08:40:15 +0200 [thread overview]
Message-ID: <20190606064015.GC27033@lst.de> (raw)
In-Reply-To: <35b3f09b-b371-e2cc-4436-120c67e2f1fb@lwfinger.net>
On Wed, Jun 05, 2019 at 10:06:18PM -0500, Larry Finger wrote:
> First of all, you have my sympathy for the laborious bisection on a
> PowerBook G4. I have done several myself. Thank you.
>
> I confirm your results.
>
> The ppc code has a maximum DMA size of 31 bits, thus a 32-bit request will
> fail. Why the 30-bit fallback fails in b43legacy fails while it works in
> b43 is a mystery.
>
> Although dma_nommu_dma_supported() may be "largely identical" to
> dma_direct_supported(), they obviously differ. Routine
> dma_nommu_dma_supported() returns 1 for 32-bit systems, but I do not know
> what dma_direct_supported() returns.
>
> I am trying to find a patch.
if (IS_ENABLED(CONFIG_ZONE_DMA))
min_mask = DMA_BIT_MASK(ARCH_ZONE_DMA_BITS);
else
min_mask = DMA_BIT_MASK(32);
min_mask = min_t(u64, min_mask, (max_pfn - 1) << PAGE_SHIFT);
return mask >= __phys_to_dma(dev, min_mask);
So the smaller or:
(1) 32-bit
(2) ARCH_ZONE_DMA_BITS
(3) the actual amount of memory in the system
modolo any DMA offsets that come into play.
No offsets should exists on pmac, and ARCH_ZONE_DMA_BITS is 31 on
powerpc. So unless the system has 1GB or less memory it will probably
return false for b43, because it can't actually guarantee reliable
allocation. It will work fine on x86 with the smaller ZONE_DMA.
next prev parent reply other threads:[~2019-06-06 6:42 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 22:50 [BISECTED REGRESSION] b43legacy broken on G4 PowerBook Aaro Koskinen
2019-06-06 0:54 ` Benjamin Herrenschmidt
2019-06-06 9:31 ` Aaro Koskinen
2019-06-06 10:56 ` Benjamin Herrenschmidt
2019-06-06 10:57 ` Benjamin Herrenschmidt
2019-06-06 11:43 ` Christoph Hellwig
2019-06-06 19:26 ` Larry Finger
2019-06-06 20:11 ` Larry Finger
2019-06-06 3:06 ` Larry Finger
2019-06-06 6:40 ` Christoph Hellwig [this message]
2019-06-07 17:25 ` Larry Finger
2019-06-07 17:29 ` Christoph Hellwig
2019-06-07 18:50 ` Larry Finger
2019-06-08 21:52 ` Larry Finger
2019-06-10 8:18 ` Christoph Hellwig
2019-06-10 16:09 ` Larry Finger
2019-06-11 6:05 ` Christoph Hellwig
2019-06-11 22:20 ` Larry Finger
2019-06-11 22:46 ` Aaro Koskinen
2019-06-12 1:57 ` Larry Finger
2019-06-11 22:46 ` Benjamin Herrenschmidt
2019-06-12 1:52 ` Larry Finger
2019-06-12 3:32 ` Benjamin Herrenschmidt
2019-06-12 6:55 ` Christoph Hellwig
2019-06-12 19:41 ` Larry Finger
2019-06-12 21:59 ` Benjamin Herrenschmidt
2019-06-13 7:29 ` Christoph Hellwig
2019-06-11 17:48 ` Andreas Schwab
2019-06-08 4:21 ` Benjamin Herrenschmidt
2019-06-08 7:23 ` Christoph Hellwig
2019-06-10 18:44 ` Larry Finger
2019-06-11 5:56 ` Benjamin Herrenschmidt
2019-06-11 6:08 ` Christoph Hellwig
2019-06-11 6:58 ` Benjamin Herrenschmidt
2019-06-11 6:59 ` Benjamin Herrenschmidt
2019-06-11 7:54 ` Christoph Hellwig
2019-06-11 9:04 ` Benjamin Herrenschmidt
2019-06-11 7:53 ` Christoph Hellwig
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=20190606064015.GC27033@lst.de \
--to=hch@lst.de \
--cc=Larry.Finger@lwfinger.net \
--cc=aaro.koskinen@iki.fi \
--cc=chzigotzky@xenosoft.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).