dmaengine Archive on lore.kernel.org
 help / color / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Vinod Koul <vkoul@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Joerg Roedel <joro@8bytes.org>,
	Sergei Shtylyov <sergei.shtylyov@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	dmaengine <dmaengine@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Linux IOMMU <iommu@lists.linux-foundation.org>,
	netdev <netdev@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/9] iommu/ipmmu-vmsa: Hook up R8A774E1 DT matching code
Date: Tue, 14 Jul 2020 10:41:47 +0200
Message-ID: <CAMuHMdXM3qf266exJtJrN0XAogEsJoM-k3FON9CjX+stLpuMFA@mail.gmail.com> (raw)
In-Reply-To: <CA+V-a8tB0mA17f51GMQQ-Cj_CUXze_JjTahrpoAtmwuOFHQV6g@mail.gmail.com>

Hi Prabhakar,

On Tue, Jul 14, 2020 at 10:30 AM Lad, Prabhakar
<prabhakar.csengg@gmail.com> wrote:
> On Tue, Jul 14, 2020 at 9:09 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Mon, Jul 13, 2020 at 11:35 PM Lad Prabhakar
> > <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> > > From: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> > >
> > > Add support for RZ/G2H (R8A774E1) SoC IPMMUs.
> > >
> > > Signed-off-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >
> > Thanks for your patch!
> >
> > > --- a/drivers/iommu/ipmmu-vmsa.c
> > > +++ b/drivers/iommu/ipmmu-vmsa.c
> > > @@ -751,6 +751,7 @@ static const struct soc_device_attribute soc_rcar_gen3[] = {
> > >  static const struct soc_device_attribute soc_rcar_gen3_whitelist[] = {
> > >         { .soc_id = "r8a774b1", },
> > >         { .soc_id = "r8a774c0", },
> > > +       { .soc_id = "r8a774e1", },
> >
> > Adding an entry to soc_rcar_gen3_whitelist[] doesn't do anything, unless
> > you also add the same entry to soc_rcar_gen3[].
> >
> I think the comment "For R-Car Gen3 use a white list to opt-in slave
> devices." is misleading.  Booting through the kernel I do see iommu
> groups (attached is the logs).

Indeed. Without an entry in soc_rcar_gen3[], the IPMMU is enabled
unconditionally, and soc_rcar_gen3_whitelist[] is ignored.
That's why you want an entry in both, unless you have an R-Car Gen3
SoC where the IPMMU works correctly with all slave devices present.
Perhaps soc_rcar_gen3[] should be renamed to soc_rcar_gen3_greylist[]
(or soc_rcar_gen3_maybelist[]) to make this clear?

> Also the recent patch to add
> "r8a77961" just adds to soc_rcar_gen3_whitelist.

Oops, commit 17fe16181639801b ("iommu/renesas: Add support for r8a77961")
did it wrong, too.

> > >         { .soc_id = "r8a7795", .revision = "ES3.*" },
> > >         { .soc_id = "r8a77961", },
> > >         { .soc_id = "r8a77965", },

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply index

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13 21:35 [PATCH 0/9] R8A774E1 SoC enable support for IPMMU, DMAC, GPIO and AVB Lad Prabhakar
2020-07-13 21:35 ` [PATCH 1/9] dt-bindings: iommu: renesas,ipmmu-vmsa: Add r8a774e1 support Lad Prabhakar
2020-07-14  7:35   ` Geert Uytterhoeven
2020-07-21  2:02   ` Rob Herring
2020-07-13 21:35 ` [PATCH 2/9] iommu/ipmmu-vmsa: Hook up R8A774E1 DT matching code Lad Prabhakar
2020-07-14  8:09   ` Geert Uytterhoeven
2020-07-14  8:30     ` Lad, Prabhakar
2020-07-14  8:41       ` Geert Uytterhoeven [this message]
2020-07-14 11:42         ` Yoshihiro Shimoda
2020-07-14 12:39           ` Geert Uytterhoeven
2020-07-16  4:42             ` Yoshihiro Shimoda
2020-07-13 21:35 ` [PATCH 3/9] arm64: dts: renesas: r8a774e1: Add IPMMU device nodes Lad Prabhakar
2020-07-15 10:18   ` Geert Uytterhoeven
2020-07-21  2:01   ` Rob Herring
2020-07-13 21:35 ` [PATCH 4/9] dt-bindings: dma: renesas,rcar-dmac: Document R8A774E1 bindings Lad Prabhakar
2020-07-14  7:39   ` Geert Uytterhoeven
2020-07-15 10:40   ` Vinod Koul
2020-07-13 21:35 ` [PATCH 5/9] arm64: dts: renesas: r8a774e1: Add SYS-DMAC device nodes Lad Prabhakar
2020-07-15 10:20   ` Geert Uytterhoeven
2020-07-13 21:35 ` [PATCH 6/9] dt-bindings: gpio: renesas,rcar-gpio: Add r8a774e1 support Lad Prabhakar
2020-07-14  8:00   ` Geert Uytterhoeven
2020-07-21  2:02   ` Rob Herring
2020-08-27 16:39   ` Lad, Prabhakar
2020-08-27 19:30     ` Bartosz Golaszewski
2020-07-13 21:35 ` [PATCH 7/9] arm64: dts: renesas: r8a774e1: Add GPIO device nodes Lad Prabhakar
2020-07-15 10:21   ` Geert Uytterhoeven
2020-07-13 21:35 ` [PATCH 8/9] dt-bindings: net: renesas,ravb: Add support for r8a774e1 SoC Lad Prabhakar
2020-07-14  7:34   ` Sergei Shtylyov
2020-07-14  8:01   ` Geert Uytterhoeven
2020-07-21  2:03   ` Rob Herring
2020-08-27 10:28   ` Lad, Prabhakar
2020-09-19 11:10     ` Lad, Prabhakar
2020-07-13 21:35 ` [PATCH 9/9] arm64: dts: renesas: r8a774e1: Add Ethernet AVB node Lad Prabhakar
2020-07-15 10:21   ` Geert Uytterhoeven

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=CAMuHMdXM3qf266exJtJrN0XAogEsJoM-k3FON9CjX+stLpuMFA@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=bgolaszewski@baylibre.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=kuba@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh+dt@kernel.org \
    --cc=sergei.shtylyov@gmail.com \
    --cc=vkoul@kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.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

dmaengine Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dmaengine/0 dmaengine/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dmaengine dmaengine/ https://lore.kernel.org/dmaengine \
		dmaengine@vger.kernel.org
	public-inbox-index dmaengine

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dmaengine


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git