Skip to content

Commit 213ef66

Browse files
lienzechenhuacai
authored andcommitted
LoongArch: Replace hard-coded values in comments with VALEN
According to LoongArch documentation [1], CSR.PGDL and CSR.PGDH are concerned with the VA's MSB which is VALEN-1 instead of always being 47. Fix comments to avoid misleading others. [1] https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#page-global-directory-base-address-for-lower-half-address-space Reviewed-by: WANG Xuerui <[email protected]> Signed-off-by: Enze Li <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent afca6e0 commit 213ef66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/loongarch/include/asm/loongarch.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,9 @@ static __always_inline void iocsr_write64(u64 val, u32 reg)
423423
#define CSR_ASID_ASID_WIDTH 10
424424
#define CSR_ASID_ASID (_ULCAST_(0x3ff) << CSR_ASID_ASID_SHIFT)
425425

426-
#define LOONGARCH_CSR_PGDL 0x19 /* Page table base address when VA[47] = 0 */
426+
#define LOONGARCH_CSR_PGDL 0x19 /* Page table base address when VA[VALEN-1] = 0 */
427427

428-
#define LOONGARCH_CSR_PGDH 0x1a /* Page table base address when VA[47] = 1 */
428+
#define LOONGARCH_CSR_PGDH 0x1a /* Page table base address when VA[VALEN-1] = 1 */
429429

430430
#define LOONGARCH_CSR_PGD 0x1b /* Page table base */
431431

0 commit comments

Comments
 (0)