Skip to contentSkip to conversation

riscv : support update_mmu_tlb() for riscv

PATCH Superseded Jinyu Tang 3 participants 5 messages Sep 6, 2022 – Sep 18, 2022 RISC-V

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Jinyu Tang

author
#0 lore raw

PATCH 1/1 riscv : support update_mmu_tlb() for riscv

Add macro definition to support updata_mmu_tlb() for riscv, this function is from commit:7df676974359 ("mm/memory.c:Update local TLB if PTE entry exists").

---
 arch/riscv/include/asm/pgtable.h | 3 +++
 1 file changed, 3 insertions(+)
arch/riscv/include/asm/pgtable.h +3 -0
index 7ec936910a96..84a791d54f95 100644
@@ -418,6 +418,9 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
 	local_flush_tlb_page(address);
 }
 
+#define	__HAVE_ARCH_UPDATE_MMU_TLB
+#define update_mmu_tlb	update_mmu_cache
+
 static inline void update_mmu_cache_pmd(struct vm_area_struct *vma,
 		unsigned long address, pmd_t *pmdp)
 {
Signature · 7 lines
2.30.2


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Jinyu Tang

Add macro definition to support updata_mmu_tlb() for riscv, this function is from commit:7df676974359 ("mm/memory.c:Update local TLB if PTE entry exists").

---
 arch/riscv/include/asm/pgtable.h | 3 +++
 1 file changed, 3 insertions(+)
arch/riscv/include/asm/pgtable.h +0 -0
index 7ec936910a96..84a791d54f95 100644

arch/riscv/include/asm/pgtable.h static inline void update_mmu_cache(struct vm_area_struct *vma, · line 421

Quoted 4 lines
arch/riscv/include/asm/pgtable.h +1 -0
@@ -418,6 +418,9 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
 	local_flush_tlb_page(address);
 }
 
+#define	__HAVE_ARCH_UPDATE_MMU_TLB

^ just a single space here, please, as all the other
'define __HAVE's in this file

Quoted 7 lines
arch/riscv/include/asm/pgtable.h +2 -0
+#define update_mmu_tlb	update_mmu_cache
+
 static inline void update_mmu_cache_pmd(struct vm_area_struct *vma,
 		unsigned long address, pmd_t *pmdp)
 {
Signature · 1 line
2.30.2

This seems like the right thing to do, so

I'm curious if this patch is the result of debugging something? Or what led you to post it?

Thanks,
drew

#2 lore raw
Quoted 4 lines · Andrew Jones

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

On Tue, Sep 06, 2022 at 08:19:21PM +0800, Jinyu Tang wrote:
[PATCH v1] riscv : support update_mmu_tlb() for riscv

Another nit to fix when you sort out Drew's request below, drop the space between riscv & : please.
Thanks,
Conor.

Quoted 31 lines
Quoted 14 lines

Add macro definition to support updata_mmu_tlb() for riscv, this function is from commit:7df676974359 ("mm/memory.c:Update local TLB if PTE entry exists").

---
 arch/riscv/include/asm/pgtable.h | 3 +++
 1 file changed, 3 insertions(+)
arch/riscv/include/asm/pgtable.h +0 -0
index 7ec936910a96..84a791d54f95 100644

arch/riscv/include/asm/pgtable.h static inline void update_mmu_cache(struct vm_area_struct *vma, · line 421

Quoted 4 lines
arch/riscv/include/asm/pgtable.h +1 -0
@@ -418,6 +418,9 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
      local_flush_tlb_page(address);
 }
 
+#define      __HAVE_ARCH_UPDATE_MMU_TLB

^ just a single space here, please, as all the other
'define __HAVE's in this file

Quoted 7 lines
arch/riscv/include/asm/pgtable.h +2 -1
+#define update_mmu_tlb       update_mmu_cache
+
 static inline void update_mmu_cache_pmd(struct vm_area_struct *vma,
              unsigned long address, pmd_t *pmdp)
 {
--

2.30.2

This seems like the right thing to do, so

Quoted 7 lines

I'm curious if this patch is the result of debugging something? Or what led you to post it?

Thanks,
drew

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv