devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Oreoluwa Babatunde <quic_obabatun@quicinc.com>
Cc: robh@kernel.org, aisheng.dong@nxp.com, andy@black.fi.intel.com,
	 catalin.marinas@arm.com, devicetree@vger.kernel.org, hch@lst.de,
	 iommu@lists.linux.dev, kernel@quicinc.com,
	klarasmodin@gmail.com,  linux-kernel@vger.kernel.org,
	m.szyprowski@samsung.com,  quic_ninanaik@quicinc.com,
	robin.murphy@arm.com, saravanak@google.com,  will@kernel.org,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH v10 1/2] of: reserved_mem: Restruture how the reserved memory regions are processed
Date: Tue, 12 Nov 2024 19:41:38 +0100	[thread overview]
Message-ID: <CAMuHMdUjpyZEvwKpY1oQtqiqbXYcbZBh4-7pa3jacrFaCfKF=Q@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdW050DuwkLuosiiz2Yt7d0Lq+C8jFO0+O0qbwsjmyf3hA@mail.gmail.com>

Hi Oreoluwa,

On Fri, Nov 1, 2024 at 1:45 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Thu, Oct 31, 2024 at 10:06 PM Oreoluwa Babatunde
> <quic_obabatun@quicinc.com> wrote:
> > On 10/29/2024 5:41 AM, Geert Uytterhoeven wrote:
> > > On Wed, Oct 9, 2024 at 12:08 AM Oreoluwa Babatunde
> > > <quic_obabatun@quicinc.com> wrote:
> > >> Reserved memory regions defined in the devicetree can be broken up into
> > >> two groups:
> > >> i) Statically-placed reserved memory regions
> > >> i.e. regions defined with a static start address and size using the
> > >>      "reg" property.
> > >> ii) Dynamically-placed reserved memory regions.
> > >> i.e. regions defined by specifying an address range where they can be
> > >>      placed in memory using the "alloc_ranges" and "size" properties.

[...]

> > >> Signed-off-by: Oreoluwa Babatunde <quic_obabatun@quicinc.com>
> > > Thanks for your patch, which is now commit 8a6e02d0c00e7b62
> > > ("of: reserved_mem: Restructure how the reserved memory regions
> > > are processed") in dt-rh/for-next.
> > >
> > > I have bisected a boot issue on RZ/Five to this commit.
> > > With "earlycon keep_bootcon" (else there is no output):
> > >
> > >     Oops - store (or AMO) access fault [#1]
> > >     CPU: 0 UID: 0 PID: 1 Comm: swapper Not tainted
> > > 6.12.0-rc1-00015-g8a6e02d0c00e #201
> > >     Hardware name: Renesas SMARC EVK based on r9a07g043f01 (DT)
> > >     epc : __memset+0x60/0x100
> > >      ra : __dma_alloc_from_coherent+0x150/0x17a
> > >     epc : ffffffff8062d2bc ra : ffffffff80053a94 sp : ffffffc60000ba20
> > >      gp : ffffffff812e9938 tp : ffffffd601920000 t0 : ffffffc6000d0000
> > >      t1 : 0000000000000000 t2 : ffffffffe9600000 s0 : ffffffc60000baa0
> > >      s1 : ffffffc6000d0000 a0 : ffffffc6000d0000 a1 : 0000000000000000
> > >      a2 : 0000000000001000 a3 : ffffffc6000d1000 a4 : 0000000000000000
> > >      a5 : 0000000000000000 a6 : ffffffd601adacc0 a7 : ffffffd601a841a8
> > >      s2 : ffffffd6018573c0 s3 : 0000000000001000 s4 : ffffffd6019541e0
> > >      s5 : 0000000200000022 s6 : ffffffd6018f8410 s7 : ffffffd6018573e8
> > >      s8 : 0000000000000001 s9 : 0000000000000001 s10: 0000000000000010
> > >      s11: 0000000000000000 t3 : 0000000000000000 t4 : ffffffffdefe62d1
> > >      t5 : 000000001cd6a3a9 t6 : ffffffd601b2aad6
> > >     status: 0000000200000120 badaddr: ffffffc6000d0000 cause: 0000000000000007
> > >     [<ffffffff8062d2bc>] __memset+0x60/0x100
> > >     [<ffffffff80053e1a>] dma_alloc_from_global_coherent+0x1c/0x28
> > >     [<ffffffff80053056>] dma_direct_alloc+0x98/0x112
> > >     [<ffffffff8005238c>] dma_alloc_attrs+0x78/0x86
> > >     [<ffffffff8035fdb4>] rz_dmac_probe+0x3f6/0x50a

> > Please can you provide reproduction steps? I tried booting up
> > risc-v arch with qemu but did not run into the issue you are
> > seeing.
>
> It indeed doesn't happen on other RISC-V platforms (tried MPFS/Icicle).
> RZ/Five is special in that it is DMA non-coherent, and the crash
> happens in dma_alloc_from_global_coherent().
> According to the logs, the DMA pool at 0x58000000 is still being created.
> I'll try to debug this further next week...

I found the issue, and have sent a fix
https://lore.kernel.org/r/f8cef6845a6141f0277e31a71fe153612daae776.1731436631.git.geert+renesas@glider.be

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	other threads:[~2024-11-12 18:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-08 22:06 [PATCH v10 0/2] Dynamic Allocation of the reserved_mem array Oreoluwa Babatunde
2024-10-08 22:06 ` [PATCH v10 1/2] of: reserved_mem: Restruture how the reserved memory regions are processed Oreoluwa Babatunde
2024-10-29 12:41   ` Geert Uytterhoeven
2024-10-29 12:43     ` Geert Uytterhoeven
2024-10-31 21:05     ` Oreoluwa Babatunde
2024-11-01 12:45       ` Geert Uytterhoeven
2024-11-12 18:41         ` Geert Uytterhoeven [this message]
2025-02-26 11:50   ` Marco Felsch
2025-02-26 12:12     ` Marco Felsch
2025-02-28 14:33     ` Rob Herring
2025-02-28 16:12       ` Marco Felsch
2025-06-17 17:15   ` William Zhang
2025-06-23  1:24     ` William Zhang
2025-06-27 18:01       ` Oreoluwa Babatunde
2025-06-28 21:04         ` William Zhang
2025-07-03 17:27           ` Oreoluwa Babatunde
2025-07-08 10:47             ` Marek Szyprowski
2025-07-08 17:04               ` Oreoluwa Babatunde
2024-10-08 22:06 ` [PATCH v10 2/2] of: reserved_mem: Add code to dynamically allocate reserved_mem array Oreoluwa Babatunde
2024-10-15 15:34 ` [PATCH v10 0/2] Dynamic Allocation of the " Rob Herring

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='CAMuHMdUjpyZEvwKpY1oQtqiqbXYcbZBh4-7pa3jacrFaCfKF=Q@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=aisheng.dong@nxp.com \
    --cc=andy@black.fi.intel.com \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux.dev \
    --cc=kernel@quicinc.com \
    --cc=klarasmodin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=quic_ninanaik@quicinc.com \
    --cc=quic_obabatun@quicinc.com \
    --cc=robh@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=saravanak@google.com \
    --cc=will@kernel.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).