LoongArch: Use VALEN instead of hard code in comments
PATCH 1/1 LoongArch: Use VALEN instead of hard code in comments
Refer to the online documentation[1] for Loongson, use the accurate VALEN in comments to avoid misleading others.
--- arch/loongarch/include/asm/loongarch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/loongarch/include/asm/loongarch.h +2 -2
@@ -423,9 +423,9 @@ static __always_inline void iocsr_write64(u64 val, u32 reg)#define CSR_ASID_ASID_WIDTH 10#define CSR_ASID_ASID (_ULCAST_(0x3ff) << CSR_ASID_ASID_SHIFT) -#define LOONGARCH_CSR_PGDL 0x19/* Page table base address when VA[47] = 0 */ +#define LOONGARCH_CSR_PGDL 0x19/* Page table base address when VA[VALEN-1] = 0 */ -#define LOONGARCH_CSR_PGDH 0x1a/* Page table base address when VA[47] = 1 */ +#define LOONGARCH_CSR_PGDH 0x1a/* Page table base address when VA[VALEN-1] = 1 */ #define LOONGARCH_CSR_PGD 0x1b/* Page table base */
base-commit: fc89d7fb499b0162e081f434d45e8d1b47e82ece
Signature · 1 line
2.39.2
Quoted 2 lines · Enze Li
Refer to the online documentation[1] for Loongson, use the accurate VALEN in comments to avoid misleading others.
Reworded some Chinglish for you:
Subject: 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.
Quoted 2 lines
Nit: add a colon after [1]. (i.e. "[1]: xxxxx")
Quoted 23 lines
Signed-off-by Enze Li <[email protected]>--- arch/loongarch/include/asm/loongarch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/loongarch/include/asm/loongarch.h +2
-2@@ -423,9 +423,9 @@ static __always_inline void iocsr_write64(u64 val, u32 reg)#define CSR_ASID_ASID_WIDTH 10#define CSR_ASID_ASID (_ULCAST_(0x3ff) << CSR_ASID_ASID_SHIFT) -#define LOONGARCH_CSR_PGDL 0x19/* Page table base address when VA[47] = 0 */ +#define LOONGARCH_CSR_PGDL 0x19/* Page table base address when VA[VALEN-1] = 0 */ -#define LOONGARCH_CSR_PGDH 0x1a/* Page table base address when VA[47] = 1 */ +#define LOONGARCH_CSR_PGDH 0x1a/* Page table base address when VA[VALEN-1] = 1 */ #define LOONGARCH_CSR_PGD 0x1b/* Page table base */
Quoted 1 line
base-commit:
fc89d7fb499b0162e081f434d45e8d1b47e82ece
Change itself is trivial enough, thanks!
With the nits addressed: (Huacai may apply the suggestion while applying to loongarch-next, so you won't have to resend v2)
Signature · 3 lines
WANG "xen0n" Xuerui Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/
Queued, thanks.
Huacai
Quoted 55 lines · WANG Xuerui
Quoted 2 lines · Enze Li
Refer to the online documentation[1] for Loongson, use the accurate VALEN in comments to avoid misleading others.
Reworded some Chinglish for you:
Subject: 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.
Quoted 2 lines
Nit: add a colon after [1]. (i.e. "[1]: xxxxx")
Quoted 23 lines
Signed-off-by Enze Li <[email protected]>--- arch/loongarch/include/asm/loongarch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/loongarch/include/asm/loongarch.h +2
-2@@ -423,9 +423,9 @@ static __always_inline void iocsr_write64(u64 val, u32 reg)#define CSR_ASID_ASID_WIDTH 10#define CSR_ASID_ASID (_ULCAST_(0x3ff) << CSR_ASID_ASID_SHIFT) -#define LOONGARCH_CSR_PGDL 0x19/* Page table base address when VA[47] = 0 */ +#define LOONGARCH_CSR_PGDL 0x19/* Page table base address when VA[VALEN-1] = 0 */ -#define LOONGARCH_CSR_PGDH 0x1a/* Page table base address when VA[47] = 1 */ +#define LOONGARCH_CSR_PGDH 0x1a/* Page table base address when VA[VALEN-1] = 1 */ #define LOONGARCH_CSR_PGD 0x1b/* Page table base */ Quoted 1 line
base-commit:
fc89d7fb499b0162e081f434d45e8d1b47e82eceChange itself is trivial enough, thanks!
With the nits addressed: (Huacai may apply the suggestion while applying to loongarch-next, so you won't have to resend v2)
Reviewed-by WANG Xuerui <[email protected]>--
WANG "xen0n" XueruiLinux/LoongArch mailing list: https://lore.kernel.org/loongarch/
Hi Xuerui,
Thanks for your review.
Quoted 5 lines · WANG Xuerui
Quoted 2 lines · Enze Li
Refer to the online documentation[1] for Loongson, use the accurate VALEN in comments to avoid misleading others.
Reworded some Chinglish for you:
My English sucks :( Please bear with me.
Quoted 39 lines
Subject: 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.Quoted 2 lines
Nit: add a colon after [1]. (i.e. "[1]: xxxxx")
Quoted 26 lines
Signed-off-by Enze Li <[email protected]>--- arch/loongarch/include/asm/loongarch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/loongarch/include/asm/loongarch.h +0
-1@@ -423,9 +423,9 @@ static __always_inline void iocsr_write64(u64 val, u32 reg)#define CSR_ASID_ASID_WIDTH 10#define CSR_ASID_ASID (_ULCAST_(0x3ff) << CSR_ASID_ASID_SHIFT) -#define LOONGARCH_CSR_PGDL 0x19/* Page table base address when VA[47] = 0 */
+#defineLOONGARCH_CSR_PGDL0x19/* Page table base
address when VA[VALEN-1] = 0 */-#define
LOONGARCH_CSR_PGDH0x1a/* Page table base
address when VA[47] = 1 */
+#defineLOONGARCH_CSR_PGDH0x1a/* Page table base
address when VA[VALEN-1] = 1 */
Quoted 7 lines
Quoted 5 lines
#define
LOONGARCH_CSR_PGD0x1b/* Page table base
*/base-commit:
fc89d7fb499b0162e081f434d45e8d1b47e82eceChange itself is trivial enough, thanks!
I was very impressed with your patience and willingness to help.
Best Regards,
Enze
Quoted 7 lines
With the nits addressed: (Huacai may apply the suggestion while applying
to loongarch-next, so you won't have to resend v2)Reviewed-by WANG Xuerui <[email protected]>