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-14 08:56:31 -06:00
2025-11-27 17:25:46 -08:00
2025-10-22 08:04:15 +02:00
2025-11-20 13:37:18 +01:00
2025-11-25 12:39:26 +01:00
2025-11-18 15:47:55 +01:00
2025-10-20 13:54:15 +02:00
2025-10-31 12:57:19 -07:00
2025-11-20 17:01:44 -05:00
2025-10-04 16:26:32 -07:00
2025-09-11 19:13:21 +01:00
2025-10-04 16:26:32 -07:00
2025-10-18 14:33:22 +03:00
2025-10-23 02:06:47 +08:00
2025-10-07 08:40:15 -07:00
2025-10-22 08:03:52 +02:00
2025-10-13 14:56:30 +09:00
2025-11-12 17:59:37 +01:00
2025-11-06 15:44:18 -08:00
2025-11-06 14:29:49 +08:00
2025-11-07 09:22:10 -07:00
2025-09-15 16:09:42 +02:00
2025-10-15 10:39:54 -04:00
2025-09-26 15:10:59 -07:00
2025-10-06 10:37:06 -07:00
2025-10-24 16:56:37 +01:00
2025-10-28 18:54:48 -07:00
2025-11-11 14:59:04 +01:00
2025-11-16 21:30:26 +09:00
2025-12-06 10:40:32 +08:00
2025-09-22 10:33:10 -03:00
2025-11-19 12:00:28 +01: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-11-12 11:54:37 -08:00
2025-10-04 16:26:32 -07:00
2025-11-03 18:04:15 +01:00
2025-09-29 00:17:22 +02:00
2025-11-11 20:22:23 +00:00
2025-11-11 15:12:18 +01:00
2025-11-17 23:16:55 -08:00
2025-09-12 13:54:17 +03:00
2025-11-27 17:29:15 -08:00
2025-12-06 10:39:49 +08:00
2025-10-31 17:39:14 -07:00
2025-09-16 16:49:28 +01:00
2025-11-28 09:47:44 -06:00
2025-11-21 12:51:41 +01:00
2025-10-24 11:16:26 +02:00
2025-10-23 15:32:21 +02:00
2025-10-02 18:18:33 -07:00
2025-10-03 10:38:23 -05:00
2025-11-03 10:02:04 +09:00
2025-11-25 13:44:51 +01:00
2025-11-09 11:15:20 +09:00
2025-11-03 11:37:57 +01:00
2025-11-27 11:57:45 +01:00
2025-09-22 09:35:21 -04:00
2025-10-06 11:17:18 -07:00
2025-11-17 09:00:42 -08:00
2025-11-24 18:08:10 +01:00
2025-10-24 07:44:09 -05:00
2025-11-14 15:45:31 -08:00
2025-11-16 10:37:38 -07:00
2025-10-06 10:34:22 -07:00
2025-11-18 23:56:11 +01:00
2025-11-27 08:51:36 -08:00
2025-11-24 11:14:01 +01:00
2025-11-26 12:31:48 -08:00
2025-10-31 16:27:40 -07:00
2025-11-14 11:55:56 +01:00
2025-09-15 16:20:29 +02:00
2025-11-27 11:41:00 +00:00
2025-10-04 15:45:17 -07:00
2025-11-05 16:12:28 +01:00
2025-09-20 21:29:48 -05:00
2025-11-08 20:56:12 +01:00
2025-11-17 16:58:25 -08:00
2025-11-19 22:46:36 -05:00
2025-11-09 11:14:59 +09:00
2025-11-04 19:15:36 -08:00
2025-10-06 10:32:22 -07:00
2025-11-27 11:41:06 +00:00
2025-10-13 10:55:03 +02:00
2025-11-08 12:30:02 -05:00
2025-11-21 21:27:20 +01:00
2025-10-02 10:41:58 +02:00
2025-10-20 08:20:34 +02:00
2025-11-26 13:16:53 +01:00
2025-10-29 23:20:19 -04:00
2025-10-07 08:40:15 -07:00
2025-11-24 18:00:45 +01:00
2025-11-11 15:12:18 +01:00
2025-10-28 15:54:41 -06:00
2025-11-26 14:44:58 -08:00
2025-11-25 09:08:32 +01: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-09-15 14:30:17 +02:00
2025-10-07 08:40:15 -07:00