linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chen-Yu Tsai <wens@kernel.org>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: Stefan Wahren <wahrenst@gmx.net>, Christoph Hellwig <hch@lst.de>,
	Mark Rutland <mark.rutland@arm.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Scott Branden <sbranden@broadcom.com>,
	Matthias Brugger <mbrugger@suse.com>,
	Stephen Boyd <sboyd@kernel.org>, Ray Jui <rjui@broadcom.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-mmc@vger.kernel.org,
	Adrian Hunter <adrian.hunter@intel.com>,
	Eric Anholt <eric@anholt.net>, Rob Herring <robh+dt@kernel.org>,
	"open list:BROADCOM BCM281XX..." 
	<bcm-kernel-feedback-list@broadcom.com>,
	"moderated list:BROADCOM BCM2835..." 
	<linux-rpi-kernel@lists.infradead.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 00/18] ARM: Add minimal Raspberry Pi 4 support
Date: Wed, 24 Jul 2019 10:53:32 +0800	[thread overview]
Message-ID: <CAGb2v66-o23CW5iH9Bn1aELymPSiKrA43eJd2q6EZ7iubcogaw@mail.gmail.com> (raw)
In-Reply-To: <5f9b11f54c66fd0487837f7e58af3adf7f86635f.camel@suse.de>

On Wed, Jul 24, 2019 at 1:33 AM Nicolas Saenz Julienne
<nsaenzjulienne@suse.de> wrote:
>
> On Tue, 2019-07-23 at 18:26 +0200, Stefan Wahren wrote:
> > Hi Nicolas,
> >
> > thanks for your work, but i'm a little bit sceptical about these
> > changes. So here some thoughts.
> >
> > Am 23.07.19 um 15:32 schrieb Nicolas Saenz Julienne:
> > > On Tue, 2019-07-23 at 11:34 +0200, Christoph Hellwig wrote:
> > > > On Mon, Jul 22, 2019 at 08:10:17PM +0200, Stefan Wahren wrote:
> > > > > i rebased this series also and got this only on the RPi 4.
> > > > >
> > > > > After reverting the following:
> > > > >
> > > > > 79a986721de dma-mapping: remove dma_max_pfn
> > > > > 7559d612dff0 mmc: core: let the dma map ops handle bouncing
> > > > >
> > > > > This crash disappear, but wifi seems to be still broken.
> > > > >
> > > > > Would be nice, if you can investigate further.
> > > > That means dma addressing on this system doesn't just work for some
> > > > memory, and the mmc bounce buffering was papering over that just for
> > > > mmc.  Do you have highmem on this system?
> > > >
> > > > You might want to try this series, which has been submitted upstream:
> > > >
> > > >
> http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/arm-swiotlb
> > > Hi Christoph,
> > > I tried your series on top of Stefan's, it has no effect. I guess it's no
> > > surprise as with mult_v7_defconfig, you get SWIOTLB=n & LPAE=n.
> > >
> > > FYI DMA addressing constraints for RPi4 are the following: devices can only
> > > access the first GB of ram even though the board might have up to 4GB of
> > > ram.
> > > The DMA addresses are aliased with a 0xc0000000 offset. So 0x00000000 phys
> > > is
> > > aliased to 0xc0000000 in DMA. This is the same as for an RFC you commented
> > > last
> > > week trying to fix similar issues for arm64.
> > >
> > > You state in "arm: use swiotlb for bounce buffer on LPAE configs" that "The
> > > DMA
> > > API requires that 32-bit DMA masks are always supported". If I understand it
> > > correctly this device breaks that assumption. Which implies we need a bounce
> > > buffer system in place for any straming DMA user.
> > >
> > > It seems we're unable to use dma-direct/swiotlb, so I enabled arm's
> > > dmabounce
> > > on all devices hooked into RPi's limited interconnect, which fixes this
> > > issue.
> > Does it fix the wifi issue too?
>
> Well it works as long as I revert this: 901bb98918 ("nl80211: require and
> validate vendor command policy"). Which has nothing to do with DMA anyways.
>
> Was this the issue you where seeing?
>
> [    4.969679] WARNING: CPU: 2 PID: 21 at net/wireless/core.c:868 wiphy_register+0x8e8/0xbdc [cfg80211]
> [...]
> [    4.969974] ieee80211 phy0: brcmf_cfg80211_attach: Could not register wiphy device (-22)

We're seeing this on different platforms (allwinner / rockchip / amlogic)
with Broadcom WiFi chips. So it's unlikely to be related with anything in
this series.

I believe a fix for this has already been queued up:

https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git/commit/?id=91046d6364afde646734c7ead1f649d253c386e9

ChenYu

  parent reply	other threads:[~2019-07-24  2:53 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22  5:54 [PATCH 00/18] ARM: Add minimal Raspberry Pi 4 support Stefan Wahren
2019-07-22  5:54 ` [PATCH 01/18] ARM: bcm283x: Reduce register ranges for UART, SPI and I2C Stefan Wahren
2019-07-24 20:01   ` Stefan Wahren
2019-07-22  5:54 ` [PATCH 02/18] ARM: bcm2835: DMA can only address 1GB Stefan Wahren
2019-07-22  5:54 ` [PATCH 03/18] ARM: dts: bcm283x: Move BCM2835/6/7 specific to bcm2835-common.dtsi Stefan Wahren
2019-07-22 17:54   ` Eric Anholt
2019-07-22  5:54 ` [PATCH 04/18] ARM: dts: bcm283x: Define MMC interfaces at board level Stefan Wahren
2019-08-12 21:03   ` Stefan Wahren
2019-07-22  5:54 ` [PATCH 05/18] ARM: dts: bcm283x: Define memory " Stefan Wahren
2019-08-12 21:02   ` Stefan Wahren
2019-07-22  5:54 ` [PATCH 06/18] dt-bindings: bcm2835-cprman: Add bcm2711 support Stefan Wahren
2019-07-22  5:54 ` [PATCH 07/18] clk: bcm2835: Introduce SoC specific clock registration Stefan Wahren
2019-07-22 10:30   ` Matthias Brugger
2019-08-11 20:43   ` Stefan Wahren
2019-07-22  5:54 ` [PATCH 08/18] clk: bcm2835: Add BCM2711_CLOCK_EMMC2 support Stefan Wahren
2019-07-22 10:30   ` Matthias Brugger
2019-07-22  5:54 ` [PATCH 09/18] dt-bindings: sdhci-iproc: Add brcm,bcm2711-emmc2 Stefan Wahren
2019-07-22 10:31   ` Matthias Brugger
2019-07-24 14:08   ` Ulf Hansson
2019-07-22 11:26 ` [PATCH 00/18] ARM: Add minimal Raspberry Pi 4 support Matthias Brugger
2019-07-22 13:18 ` Nicolas Saenz Julienne
2019-07-22 18:10   ` Stefan Wahren
2019-07-23  9:34     ` Christoph Hellwig
2019-07-23 13:32       ` Nicolas Saenz Julienne
2019-07-23 14:33         ` Christoph Hellwig
2019-07-23 16:26         ` Stefan Wahren
2019-07-23 17:33           ` Nicolas Saenz Julienne
2019-07-23 21:30             ` Stefan Wahren
2019-07-24  2:53             ` Chen-Yu Tsai [this message]
2019-07-24  8:37               ` Nicolas Saenz Julienne
2019-07-25  8:22             ` Nicolas Saenz Julienne
2019-07-25 22:09               ` Stefan Wahren
2019-07-22 18:01 ` Eric Anholt
2019-07-28 11:22 ` Stefan Wahren
2019-08-05  9:33   ` Linus Walleij

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=CAGb2v66-o23CW5iH9Bn1aELymPSiKrA43eJd2q6EZ7iubcogaw@mail.gmail.com \
    --to=wens@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=hch@lst.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mbrugger@suse.com \
    --cc=mturquette@baylibre.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=rjui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=sbranden@broadcom.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wahrenst@gmx.net \
    /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).