[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <4f69fcfe-debb-4979-9070-1d58ba35032c@app.fastmail.com>
Date: Wed, 14 Jun 2023 14:35:44 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: Prabhakar <prabhakar.csengg@...il.com>,
"Conor.Dooley" <conor.dooley@...rochip.com>,
"Geert Uytterhoeven" <geert+renesas@...der.be>,
guoren <guoren@...nel.org>,
"Andrew Jones" <ajones@...tanamicro.com>,
"Paul Walmsley" <paul.walmsley@...ive.com>,
"Palmer Dabbelt" <palmer@...belt.com>,
"Albert Ou" <aou@...s.berkeley.edu>,
"Samuel Holland" <samuel@...lland.org>,
linux-riscv@...ts.infradead.org,
"Christoph Hellwig" <hch@...radead.org>
Cc: "Rob Herring" <robh+dt@...nel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@...aro.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
"Biju Das" <biju.das.jz@...renesas.com>,
"Lad, Prabhakar" <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [PATCH v9 3/6] riscv: mm: dma-noncoherent: nonstandard cache operations
support
On Wed, Jun 14, 2023, at 12:47, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
>
> Introduce support for nonstandard noncoherent systems in the RISC-V
> architecture. It enables function pointer support to handle cache
> management in such systems.
>
> This patch adds a new configuration option called
> "RISCV_NONSTANDARD_CACHE_OPS." This option is a boolean flag that
> depends on "RISCV_DMA_NONCOHERENT" and enables the function pointer
> support for cache management in nonstandard noncoherent systems.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
I understand that Christoph will still not like this, but I think this
is as good as it gets, making the standard variant the fast path,
and using the function pointers only for the nonstandard cases.
> #include <asm/cacheflush.h>
> +#include <asm/dma-noncoherent.h>
>
> static bool noncoherent_supported;
>
> +struct riscv_cache_ops noncoherent_cache_ops = {
> + .clean = NULL,
> + .inval = NULL,
> + .flush = NULL,
> +};
This could be marked __read_mostly or __ro_after_init as
a micro-optimization, if anyone cares.
Arnd
Powered by blists - more mailing lists