Skip to contentSkip to conversation

riscv: Fix definition of _PAGE_NOCACHE_THEAD

PATCH In review Fei Wu 2 participants 3 messages Feb 27, 2024 RISC-V

lore
Share & tools
lore

Fei Wu

author
#0 lore raw

PATCH 1/1 riscv: Fix definition of _PAGE_NOCACHE_THEAD

_PAGE_NOCACHE_THEAD is not used but the definition is wrong.

---
 arch/riscv/include/asm/pgtable-64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/include/asm/pgtable-64.h +1 -1
index b42017d76924..b99bd66107a6 100644
@@ -136,7 +136,7 @@ enum napot_cont_order {
  * 10010 - IO   Strongly-ordered, Non-cacheable, Non-bufferable, Shareable, Non-trustable
  */
 #define _PAGE_PMA_THEAD		((1UL << 62) | (1UL << 61) | (1UL << 60))
-#define _PAGE_NOCACHE_THEAD	((1UL < 61) | (1UL << 60))
+#define _PAGE_NOCACHE_THEAD	((1UL << 61) | (1UL << 60))
 #define _PAGE_IO_THEAD		((1UL << 63) | (1UL << 60))
 #define _PAGE_MTMASK_THEAD	(_PAGE_PMA_THEAD | _PAGE_IO_THEAD | (1UL << 59))
 
Signature · 1 line
2.34.1
#1 lore raw

Hi Fei,

Quoted 12 lines · Fei Wu

_PAGE_NOCACHE_THEAD is not used but the definition is wrong.

---
  arch/riscv/include/asm/pgtable-64.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/include/asm/pgtable-64.h +0 -0
index b42017d76924..b99bd66107a6 100644

arch/riscv/include/asm/pgtable-64.h enum napot_cont_order { · line 142

Quoted 8 lines
arch/riscv/include/asm/pgtable-64.h +1 -1
@@ -136,7 +136,7 @@ enum napot_cont_order {
   * 10010 - IO   Strongly-ordered, Non-cacheable, Non-bufferable, Shareable, Non-trustable
   */
  #define _PAGE_PMA_THEAD		((1UL << 62) | (1UL << 61) | (1UL << 60))
-#define _PAGE_NOCACHE_THEAD	((1UL < 61) | (1UL << 60))
+#define _PAGE_NOCACHE_THEAD	((1UL << 61) | (1UL << 60))
  #define _PAGE_IO_THEAD		((1UL << 63) | (1UL << 60))
  #define _PAGE_MTMASK_THEAD	(_PAGE_PMA_THEAD | _PAGE_IO_THEAD | (1UL << 59))
 

This fix is already in -fixes: https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git/commit/?id=c21f014818600ae017f97ee087e7c136b1916aa7

Thanks,

Alex

author
#2 lore raw
Quoted 23 lines · Alexandre Ghiti

Hi Fei,

Quoted 20 lines · Fei Wu

_PAGE_NOCACHE_THEAD is not used but the definition is wrong.

---
  arch/riscv/include/asm/pgtable-64.h | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/include/asm/pgtable-64.h +0 -0
index b42017d76924..b99bd66107a6 100644
@@ -136,7 +136,7 @@ enum napot_cont_order {
    * 10010 - IO   Strongly-ordered, Non-cacheable, Non-bufferable,

Shareable, Non-trustable
   */
  #define _PAGE_PMA_THEAD        ((1UL << 62) | (1UL << 61) | (1UL << 60))

arch/riscv/include/asm/pgtable-64.h +1 -1
-#define _PAGE_NOCACHE_THEAD    ((1UL < 61) | (1UL << 60))
+#define _PAGE_NOCACHE_THEAD    ((1UL << 61) | (1UL << 60))
Quoted 9 lines
Quoted 4 lines

  #define _PAGE_IO_THEAD        ((1UL << 63) | (1UL << 60)) #define _PAGE_MTMASK_THEAD    (_PAGE_PMA_THEAD | _PAGE_IO_THEAD | (1UL << 59))

This fix is already in -fixes:
https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git/commit/?id=c21f014818600ae017f97ee087e7c136b1916aa7

Thank you Alex, got it.

Fei.

Quoted 4 lines

Thanks,

Alex