linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Larry Finger <Larry.Finger@lwfinger.net>,
	Aaro Koskinen <aaro.koskinen@iki.fi>,
	Christoph Hellwig <hch@lst.de>,
	Christian Zigotzky <chzigotzky@xenosoft.de>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-wireless@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [BISECTED REGRESSION] b43legacy broken on G4 PowerBook
Date: Tue, 11 Jun 2019 15:56:33 +1000	[thread overview]
Message-ID: <c91ccbddd6a58dbee5705f10ed1d98fb44bd8f8d.camel@kernel.crashing.org> (raw)
In-Reply-To: <3ed1ccfe-d7ca-11b9-17b3-303d1ae1bb0f@lwfinger.net>

On Mon, 2019-06-10 at 13:44 -0500, Larry Finger wrote:
> On 6/7/19 11:21 PM, Benjamin Herrenschmidt wrote:
> > 
> > > Please try the attached patch. I'm not really pleased with it and I will
> > > continue to determine why the fallback to a 30-bit mask fails, but at least this
> > > one works for me.
> > 
> > Your patch only makes sense if the device is indeed capable of
> > addressing 31-bits.
> > 
> > So either the driver is buggy and asks for a too small mask in which
> > case your patch is ok, or it's not and you're just going to cause all
> > sort of interesting random problems including possible memory
> > corruption.
> 
> Of course the driver may be buggy, but it asks for the correct mask.
> 
> This particular device is not capable of handling 32-bit DMA. The driver detects 
> the 32-bit failure and falls back to 30 bits. It works on x86, and did on PPC32 
> until 5.1. As Christoph said, it should always be possible to use fewer bits 
> than the maximum.

No, I don't think it *worked* on ppc32 before Christoph patch. I think
it "mostly sort-of worked" :-)

The reason I'm saying that is if your system has more than 1GB of RAM,
then you'll have chunks of memory that the device simply cannot
address.

Before Christoph patches, we had no ZONE_DMA or ZONE_DMA32 covering the
30-bit limited space, so any memory allocation could in theory land
above 30-bits, causing all sort of horrible things to happen with that
driver.

The reason I think it sort-of-mostly-worked is that to get more than
1GB of RAM, those machines use CONFIG_HIGHMEM. And *most* network
buffers aren't allocated in Highmem.... so you got lucky.

That said, there is such as thing as no-copy send on network, so I
wouldn't be surprised if some things would still have failed, just not
frequent enough for you to notice.

> Similar devices that are new enough to use b43 rather than b43legacy work with 
> new kernels; however, they have and use 32-bit DMA.

Cheres,
Ben.



  reply	other threads:[~2019-06-11  5:58 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
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 [this message]
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=c91ccbddd6a58dbee5705f10ed1d98fb44bd8f8d.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=Larry.Finger@lwfinger.net \
    --cc=aaro.koskinen@iki.fi \
    --cc=chzigotzky@xenosoft.de \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /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).