From: Conor Dooley <conor.dooley@microchip.com>
To: Conor Dooley <conor@kernel.org>, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Prabhakar <prabhakar.csengg@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Heiko Stuebner <heiko@sntech.de>, Guo Ren <guoren@kernel.org>,
Andrew Jones <ajones@ventanamicro.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Samuel Holland <samuel@sholland.org>,
<linux-riscv@lists.infradead.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-renesas-soc@vger.kernel.org>,
Biju Das <biju.das.jz@bp.renesas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH v8 5/7] cache: Add L2 cache management for Andes AX45MP RISC-V core
Date: Thu, 13 Apr 2023 08:06:23 +0100 [thread overview]
Message-ID: <20230413-aorta-unheated-c9bb35411fb2@wendy> (raw)
In-Reply-To: <20230412-cheddar-prune-5ce03ccf5581@spud>
[-- Attachment #1: Type: text/plain, Size: 6023 bytes --]
On Wed, Apr 12, 2023 at 09:25:34PM +0100, Conor Dooley wrote:
> On Wed, Apr 12, 2023 at 12:08:58PM +0100, Prabhakar wrote:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >
> > I/O Coherence Port (IOCP) provides an AXI interface for connecting
> > external non-caching masters, such as DMA controllers. The accesses
> > from IOCP are coherent with D-Caches and L2 Cache.
> >
> > IOCP is a specification option and is disabled on the Renesas RZ/Five
> > SoC due to this reason IP blocks using DMA will fail.
> >
> > The Andes AX45MP core has a Programmable Physical Memory Attributes (PMA)
> > block that allows dynamic adjustment of memory attributes in the runtime.
> > It contains a configurable amount of PMA entries implemented as CSR
> > registers to control the attributes of memory locations in interest.
> > Below are the memory attributes supported:
> > * Device, Non-bufferable
> > * Device, bufferable
> > * Memory, Non-cacheable, Non-bufferable
> > * Memory, Non-cacheable, Bufferable
> > * Memory, Write-back, No-allocate
> > * Memory, Write-back, Read-allocate
> > * Memory, Write-back, Write-allocate
> > * Memory, Write-back, Read and Write-allocate
> >
> > More info about PMA (section 10.3):
> > Link: http://www.andestech.com/wp-content/uploads/AX45MP-1C-Rev.-5.0.0-Datasheet.pdf
> >
> > As a workaround for SoCs with IOCP disabled CMO needs to be handled by
> > software. Firstly OpenSBI configures the memory region as
> > "Memory, Non-cacheable, Bufferable" and passes this region as a global
> > shared dma pool as a DT node. With DMA_GLOBAL_POOL enabled all DMA
> > allocations happen from this region and synchronization callbacks are
> > implemented to synchronize when doing DMA transactions.
> >
> > Example PMA region passes as a DT node from OpenSBI:
> > reserved-memory {
> > #address-cells = <2>;
> > #size-cells = <2>;
> > ranges;
> >
> > pma_resv0@58000000 {
> > compatible = "shared-dma-pool";
> > reg = <0x0 0x58000000 0x0 0x08000000>;
> > no-map;
> > linux,dma-default;
> > };
> > };
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > ---
> > v7 -> v8
> > * Dropped function pointer usage
> > * Now exporting the functions for clean/inval/flush
> > * Switched to using early_initcall instead of arch_initcall
> > * Dropped entry for "include/cache" from MAINTAINERS
> > * Dropped dependency of RISCV on AX45MP_L2_CACHE
> > * Returning error in case of cache line mismatch
>
> > * Renamed clean/inval/flush functions
>
> I kinda screwed you with that request given Hellwig's NAK on the
> function pointer based stuff. Ah well, I prefer matching the proposed
> naming of the dma core to what RVI chose for the instructions.
>
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>
> I suppose this will need a resubmission once Arnd's stuff gets applied,
> but I would like to see it have a run through the build bots etc.
So apparently my build bot did actually run against this series?
https://patchwork.kernel.org/project/linux-riscv/list/?series=739109
To be quite honest, I am not sure at all how it managed to apply the
series w/ Arnd's pre-reqs. Perhaps it has achieved some from of
sentience. There's a build failure for 32-bit that appeared on the final
patch, but is not really its fault:
../arch/riscv/mm/dma-noncoherent.c: Assembler messages:
../arch/riscv/mm/dma-noncoherent.c:104: Error: unrecognized opcode `sd s0,0(sp)'
../arch/riscv/mm/dma-noncoherent.c:105: Error: unrecognized opcode `sd ra,8(sp)'
../arch/riscv/mm/dma-noncoherent.c:110: Error: unrecognized opcode `ld ra,8(sp)'
../arch/riscv/mm/dma-noncoherent.c:111: Error: unrecognized opcode `ld s0,0(sp)'
../arch/riscv/mm/dma-noncoherent.c:111: Error: unrecognized opcode `sd s0,0(sp)'
../arch/riscv/mm/dma-noncoherent.c:112: Error: unrecognized opcode `sd ra,8(sp)'
../arch/riscv/mm/dma-noncoherent.c:117: Error: unrecognized opcode `ld ra,8(sp)'
../arch/riscv/mm/dma-noncoherent.c:118: Error: unrecognized opcode `ld s0,0(sp)'
../arch/riscv/mm/pmem.c: Assembler messages:
../arch/riscv/mm/pmem.c:98: Error: unrecognized opcode `sd s0,0(sp)'
../arch/riscv/mm/pmem.c:99: Error: unrecognized opcode `sd ra,8(sp)'
../arch/riscv/mm/pmem.c:104: Error: unrecognized opcode `ld ra,8(sp)'
../arch/riscv/mm/pmem.c:105: Error: unrecognized opcode `ld s0,0(sp)'
../arch/riscv/mm/dma-noncoherent.c:138: Error: unrecognized opcode `sd s0,0(sp)'
../arch/riscv/mm/dma-noncoherent.c:139: Error: unrecognized opcode `sd ra,8(sp)'
../arch/riscv/mm/dma-noncoherent.c:144: Error: unrecognized opcode `ld ra,8(sp)'
../arch/riscv/mm/dma-noncoherent.c:145: Error: unrecognized opcode `ld s0,0(sp)'
../arch/riscv/mm/pmem.c:104: Error: unrecognized opcode `sd s0,0(sp)'
../arch/riscv/mm/pmem.c:105: Error: unrecognized opcode `sd ra,8(sp)'
../arch/riscv/mm/pmem.c:110: Error: unrecognized opcode `ld ra,8(sp)'
../arch/riscv/mm/pmem.c:111: Error: unrecognized opcode `ld s0,0(sp)'
../arch/riscv/mm/pmem.c:110: Error: attempt to move .org backwards
../arch/riscv/mm/pmem.c:116: Error: attempt to move .org backwards
../arch/riscv/mm/dma-noncoherent.c:116: Error: attempt to move .org backwards
../arch/riscv/mm/dma-noncoherent.c:123: Error: attempt to move .org backwards
../arch/riscv/mm/dma-noncoherent.c:150: Error: attempt to move .org backwards
make[4]: *** [../scripts/Makefile.build:252: arch/riscv/mm/pmem.o] Error 1
make[4]: *** [../scripts/Makefile.build:252: arch/riscv/mm/dma-noncoherent.o] Error 1
make[4]: Target 'arch/riscv/mm/' not remade because of errors.
make[3]: *** [../scripts/Makefile.build:494: arch/riscv/mm] Error 2
make[3]: Target 'arch/riscv/' not remade because of errors.
make[2]: *** [../scripts/Makefile.build:494: arch/riscv] Error 2
The simplest solution may to just be making the erratum depend on 64BIT?
Cheers,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-04-13 7:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 11:08 [PATCH v8 0/7] Add non-coherent DMA support for AX45MP Prabhakar
2023-04-12 11:08 ` [PATCH v8 1/7] riscv: asm: alternative-macros: Introduce ALTERNATIVE_3() macro Prabhakar
2023-04-12 11:08 ` [PATCH v8 2/7] riscv: asm: vendorid_list: Add Andes Technology to the vendors list Prabhakar
2023-04-17 8:52 ` Geert Uytterhoeven
2023-04-12 11:08 ` [PATCH v8 3/7] riscv: errata: Add Andes alternative ports Prabhakar
2023-04-12 11:08 ` [PATCH v8 4/7] dt-bindings: cache: andestech,ax45mp-cache: Add DT binding documentation for L2 cache controller Prabhakar
2023-04-12 11:08 ` [PATCH v8 5/7] cache: Add L2 cache management for Andes AX45MP RISC-V core Prabhakar
2023-04-12 20:25 ` Conor Dooley
2023-04-13 7:06 ` Conor Dooley [this message]
2023-04-13 18:26 ` Lad, Prabhakar
2023-04-13 18:46 ` Conor Dooley
2023-04-13 21:06 ` Lad, Prabhakar
2023-04-14 18:59 ` Lad, Prabhakar
2023-04-12 11:08 ` [PATCH v8 6/7] riscv: errata: Hookup the Andes AX45MP non-coherent handling Prabhakar
2023-04-12 20:29 ` Conor Dooley
2023-04-12 11:09 ` [PATCH v8 7/7] soc: renesas: Kconfig: Select the required configs for RZ/Five SoC Prabhakar
2023-04-12 20:32 ` [PATCH v8 0/7] Add non-coherent DMA support for AX45MP Conor Dooley
2023-04-17 6:53 ` Christoph Hellwig
2023-04-19 15:59 ` Palmer Dabbelt
2023-04-20 6:09 ` 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=20230413-aorta-unheated-c9bb35411fb2@wendy \
--to=conor.dooley@microchip.com \
--cc=ajones@ventanamicro.com \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=biju.das.jz@bp.renesas.com \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=guoren@kernel.org \
--cc=heiko@sntech.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=prabhakar.csengg@gmail.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=robh+dt@kernel.org \
--cc=samuel@sholland.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