Thread (4 messages) 4 messages, 2 authors, 2021-07-06

Re: [PATCH 04/19] LoongArch: Add common headers

From: Arnd Bergmann <arnd@arndb.de>
Date: 2021-07-06 12:59:44

Possibly related (same subject, not in this thread)

On Tue, Jul 6, 2021 at 1:23 PM Peter Zijlstra [off-list ref] wrote:
On Tue, Jul 06, 2021 at 12:18:05PM +0800, Huacai Chen wrote:
quoted
+
+static inline u32 csr_xchgl(u32 val, u32 mask, u32 reg)
+{
+     return __csrxchg(val, mask, reg);
+}
+
+static inline u64 csr_xchgq(u64 val, u64 mask, u32 reg)
+{
+     return __dcsrxchg(val, mask, reg);
+}
What are these __csrfoo() things, I cannot seem to find a definition of
them anywhere..
It seems that those are provided as compiler intrinsics in <larchintrin.h>,
based on an architecture specific __builtin_loongarch_csrxchg() etc.

The specific registers are documented at
https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN#control-and-status-registers

    Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help