lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdZUAMXJ4YM9+xW2Snzt0Dx5mxWjcwHZifsXPJH9ozL5bg@mail.gmail.com>
Date:   Tue, 5 Dec 2023 22:48:41 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Yoshinori Sato <ysato@...rs.sourceforge.jp>,
        linux-sh@...r.kernel.org, Damien Le Moal <dlemoal@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Dave Airlie <airlied@...il.com>,
        Daniel Vetter <daniel@...ll.ch>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Thomas Gleixner <tglx@...utronix.de>,
        Lorenzo Pieralisi <lpieralisi@...nel.org>,
        Krzysztof Wilczyński <kw@...ux.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        Magnus Damm <magnus.damm@...il.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Rich Felker <dalias@...c.org>,
        John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
        Lee Jones <lee@...nel.org>, Helge Deller <deller@....de>,
        Heiko Stübner <heiko@...ech.de>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        Chris Morgan <macromorgan@...mail.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Hyeonggon Yoo <42.hyeyoo@...il.com>,
        David Rientjes <rientjes@...gle.com>,
        Vlastimil Babka <vbabka@...e.cz>, Baoquan He <bhe@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        guoren <guoren@...nel.org>,
        Javier Martinez Canillas <javierm@...hat.com>,
        Azeem Shaikh <azeemshaikh38@...il.com>,
        Palmer Dabbelt <palmer@...osinc.com>,
        Bin Meng <bmeng@...ylab.org>,
        Max Filippov <jcmvbkbc@...il.com>, Tom Rix <trix@...hat.com>,
        Herve Codina <herve.codina@...tlin.com>,
        Jacky Huang <ychuang3@...oton.com>,
        Lukas Bulwahn <lukas.bulwahn@...il.com>,
        Jonathan Corbet <corbet@....net>,
        Biju Das <biju.das.jz@...renesas.com>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>, Sam Ravnborg <sam@...nborg.org>,
        Michael Karcher <kernel@...rcher.dialup.fu-berlin.de>,
        Sergey Shtylyov <s.shtylyov@....ru>,
        Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
        linux-ide@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
        linux-clk@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        linux-pci@...r.kernel.org, linux-serial@...r.kernel.org,
        linux-fbdev@...r.kernel.org
Subject: Re: [DO NOT MERGE v5 11/37] pci: pci-sh7751: Add SH7751 PCI driver

On Tue, Dec 5, 2023 at 2:26 PM Arnd Bergmann <arnd@...db.de> wrote:
> On Tue, Dec 5, 2023, at 10:45, Yoshinori Sato wrote:

> > +     if (of_property_read_u32_array(pdev->dev.of_node,
> > +                                    "renesas,memory", memory, 2) < 0) {
> > +             /*
> > +              * If no memory range is specified,
> > +              *  the entire main memory will be targeted for DMA.
> > +              */
> > +             memory[0] = memory_start;
> > +             memory[1] = memory_end - memory_start;
> > +     }
>
> There is a generic "dma-ranges" proerty for describing
> which memory is visible by a bus.

It's really a headache to use, so I put a bit of documentation here:
https://elinux.org/Device_Tree_Usage#PCI_DMA_Address_Translation

Yoshinoro, you can look at these bindings and drivers that use
dma-ranges for help:
Documentation/devicetree/bindings/pci/intel,ixp4xx-pci.yaml
drivers/pci/controller/pci-ixp4xx.c
Documentation/devicetree/bindings/pci/faraday,ftpci100.yaml
drivers/pci/controller/pci-ftpci100.c

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ