Re: [PATCH v8 05/22] RISC-V: Define indirect CSR access helpers
Atish Patra <[email protected]>
| Newsgroups | org.infradead.lists.linux-riscv,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-perf-users |
|---|---|
| Message-ID | <[email protected]> |
On 8/7/26 6:04 PM, Paul Walmsley wrote: > On Wed, 5 Aug 2026, Atish Patra wrote: > >> On 8/4/26 5:39 PM, Paul Walmsley wrote: >>> On Wed, 1 Jul 2026, Atish Patra wrote: >>> >>>> From: Atish Patra <[email protected]> >>>> >>>> The indirect CSR requires multiple instructions to read/write CSR. >>>> Add a few helper functions for ease of usage. >>>> >>>> Signed-off-by: Atish Patra <[email protected]> >>> Thanks. These macros seem better implemented as static inline functions. >>> That also nicely aligns the code with what you write in the patch >>> description. >> I don't think inlining these macros in the following way will work because of >> the following reason. It won't build once anything calls it. >> >> csr_read()/csr_write() stringify the CSR argument straight into the inline asm >> template: > Yes, you're right; I should have caught that. Too bad, there are multiple > keyhole CSR index registers in use, otherwise it would have been a > reasonable thing to do. > > What's up with the subsequent followup message? Looks like a > cut-and-paste from an LLM. Oops. Ha ha. LLM agent was parsing the lore and preparing a draft response. It produced so much garbage that I replied manually. I have no idea what prompted it to send it after I sent the response! Sorry for the spam. > > - Paul _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv