1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-12 01:20:14 +00:00
Huacai Chen 81f5d15c48 LoongArch: Add adaptive CSR accessors for 32BIT/64BIT
32BIT platforms only have 32bit CSR/IOCSR registers, 64BIT platforms
have both 32bit/64bit CSR/IOCSR registers. Now there are both 32bit and
64bit CSR accessors:

csr_read32()/csr_write32()/csr_xchg32();
csr_read64()/csr_write64()/csr_xchg64();

Some CSR registers (address and timer registers) are 32bit length on
32BIT platform and 64bit length on 64BIT platform. To avoid #ifdefs here
and there, they need adaptive accessors, so we define and use:

csr_read()/csr_write()/csr_xchg();

IOCSR doesn't have a "natural length", which means a 64bit register can
be treated as two 32bit registers, so we just use two 32bit accessors to
emulate a 64bit accessors.

Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2025-12-06 10:40:32 +08:00
..
2025-10-31 12:57:19 -07:00
2025-10-07 08:40:15 -07:00
2025-11-06 15:44:18 -08:00
2025-10-06 10:37:06 -07:00
2025-11-28 12:10:25 +10:00
2025-11-22 09:58:41 -08:00
2025-10-01 00:00:45 +00:00
2025-09-29 00:17:22 +02:00
2025-11-17 23:16:55 -08:00
2025-11-27 17:29:15 -08:00
2025-11-03 10:02:04 +09:00
2025-09-22 09:35:21 -04:00
2025-10-06 11:17:18 -07:00
2025-11-14 15:45:31 -08:00
2025-10-06 10:34:22 -07:00
2025-11-27 08:51:36 -08:00
2025-10-04 15:45:17 -07:00
2025-11-17 16:58:25 -08:00
2025-10-06 10:32:22 -07:00
2025-11-21 21:27:20 +01:00
2025-10-07 08:40:15 -07:00
2025-09-29 18:48:39 -07:00
2025-10-04 08:48:16 -07:00
2025-10-06 11:00:30 -07:00
2025-10-03 17:41:12 -07:00
2025-10-07 08:40:15 -07:00