All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next v3] riscv: fix build error when CONFIG_SMP is disabled
@ 2021-05-29  8:06 ` Bixuan Cui
  0 siblings, 0 replies; 4+ messages in thread
From: Bixuan Cui @ 2021-05-29  8:06 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou
  Cc: vincent.chen, sunnanyong, linux-riscv, linux-kernel, Bixuan Cui

Fix build error when disable CONFIG_SMP:
mm/pgtable-generic.o: In function `.L19':
pgtable-generic.c:(.text+0x42): undefined reference to `flush_pmd_tlb_range'
mm/pgtable-generic.o: In function `pmdp_huge_clear_flush':
pgtable-generic.c:(.text+0x6c): undefined reference to `flush_pmd_tlb_range'
mm/pgtable-generic.o: In function `pmdp_invalidate':
pgtable-generic.c:(.text+0x162): undefined reference to `flush_pmd_tlb_range'

Fixes: e88b333142e4 ("riscv: mm: add THP support on 64-bit")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
Acked-by: Nanyong Sun <sunnanyong@huawei.com>
---
Changes in v3:
Deleted the declaration of the flush_pmd_tlb_range() in the patch

Changes in v2:
Move the declaration of flush_pmd_tlb_rang to tlbflush.h

 arch/riscv/include/asm/pgtable.h  | 5 -----
 arch/riscv/include/asm/tlbflush.h | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index 29e2c836848d..eda31002c4b1 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -622,11 +622,6 @@ static inline pmd_t pmdp_establish(struct vm_area_struct *vma,
 {
 	return __pmd(atomic_long_xchg((atomic_long_t *)pmdp, pmd_val(pmd)));
 }
-
-#define __HAVE_ARCH_FLUSH_PMD_TLB_RANGE
-void flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start,
-			unsigned long end);
-
 #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
 
 /*
diff --git a/arch/riscv/include/asm/tlbflush.h b/arch/riscv/include/asm/tlbflush.h
index c84218ad7afc..801019381dea 100644
--- a/arch/riscv/include/asm/tlbflush.h
+++ b/arch/riscv/include/asm/tlbflush.h
@@ -33,6 +33,11 @@ void flush_tlb_mm(struct mm_struct *mm);
 void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
 void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
 		     unsigned long end);
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+#define __HAVE_ARCH_FLUSH_PMD_TLB_RANGE
+void flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start,
+			unsigned long end);
+#endif
 #else /* CONFIG_SMP && CONFIG_MMU */
 
 #define flush_tlb_all() local_flush_tlb_all()
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH -next v3] riscv: fix build error when CONFIG_SMP is disabled
@ 2021-05-29  8:06 ` Bixuan Cui
  0 siblings, 0 replies; 4+ messages in thread
From: Bixuan Cui @ 2021-05-29  8:06 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou
  Cc: vincent.chen, sunnanyong, linux-riscv, linux-kernel, Bixuan Cui

Fix build error when disable CONFIG_SMP:
mm/pgtable-generic.o: In function `.L19':
pgtable-generic.c:(.text+0x42): undefined reference to `flush_pmd_tlb_range'
mm/pgtable-generic.o: In function `pmdp_huge_clear_flush':
pgtable-generic.c:(.text+0x6c): undefined reference to `flush_pmd_tlb_range'
mm/pgtable-generic.o: In function `pmdp_invalidate':
pgtable-generic.c:(.text+0x162): undefined reference to `flush_pmd_tlb_range'

Fixes: e88b333142e4 ("riscv: mm: add THP support on 64-bit")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
Acked-by: Nanyong Sun <sunnanyong@huawei.com>
---
Changes in v3:
Deleted the declaration of the flush_pmd_tlb_range() in the patch

Changes in v2:
Move the declaration of flush_pmd_tlb_rang to tlbflush.h

 arch/riscv/include/asm/pgtable.h  | 5 -----
 arch/riscv/include/asm/tlbflush.h | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index 29e2c836848d..eda31002c4b1 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -622,11 +622,6 @@ static inline pmd_t pmdp_establish(struct vm_area_struct *vma,
 {
 	return __pmd(atomic_long_xchg((atomic_long_t *)pmdp, pmd_val(pmd)));
 }
-
-#define __HAVE_ARCH_FLUSH_PMD_TLB_RANGE
-void flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start,
-			unsigned long end);
-
 #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
 
 /*
diff --git a/arch/riscv/include/asm/tlbflush.h b/arch/riscv/include/asm/tlbflush.h
index c84218ad7afc..801019381dea 100644
--- a/arch/riscv/include/asm/tlbflush.h
+++ b/arch/riscv/include/asm/tlbflush.h
@@ -33,6 +33,11 @@ void flush_tlb_mm(struct mm_struct *mm);
 void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
 void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
 		     unsigned long end);
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+#define __HAVE_ARCH_FLUSH_PMD_TLB_RANGE
+void flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start,
+			unsigned long end);
+#endif
 #else /* CONFIG_SMP && CONFIG_MMU */
 
 #define flush_tlb_all() local_flush_tlb_all()
-- 
2.17.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH -next v3] riscv: fix build error when CONFIG_SMP is disabled
  2021-05-29  8:06 ` Bixuan Cui
@ 2021-06-09  0:05   ` Palmer Dabbelt
  -1 siblings, 0 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2021-06-09  0:05 UTC (permalink / raw)
  To: cuibixuan
  Cc: Paul Walmsley, aou, vincent.chen, sunnanyong, linux-riscv,
	linux-kernel, cuibixuan

On Sat, 29 May 2021 01:06:57 PDT (-0700), cuibixuan@huawei.com wrote:
> Fix build error when disable CONFIG_SMP:
> mm/pgtable-generic.o: In function `.L19':
> pgtable-generic.c:(.text+0x42): undefined reference to `flush_pmd_tlb_range'
> mm/pgtable-generic.o: In function `pmdp_huge_clear_flush':
> pgtable-generic.c:(.text+0x6c): undefined reference to `flush_pmd_tlb_range'
> mm/pgtable-generic.o: In function `pmdp_invalidate':
> pgtable-generic.c:(.text+0x162): undefined reference to `flush_pmd_tlb_range'
>
> Fixes: e88b333142e4 ("riscv: mm: add THP support on 64-bit")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
> Acked-by: Nanyong Sun <sunnanyong@huawei.com>
> ---
> Changes in v3:
> Deleted the declaration of the flush_pmd_tlb_range() in the patch
>
> Changes in v2:
> Move the declaration of flush_pmd_tlb_rang to tlbflush.h
>
>  arch/riscv/include/asm/pgtable.h  | 5 -----
>  arch/riscv/include/asm/tlbflush.h | 5 +++++
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
> index 29e2c836848d..eda31002c4b1 100644
> --- a/arch/riscv/include/asm/pgtable.h
> +++ b/arch/riscv/include/asm/pgtable.h
> @@ -622,11 +622,6 @@ static inline pmd_t pmdp_establish(struct vm_area_struct *vma,
>  {
>  	return __pmd(atomic_long_xchg((atomic_long_t *)pmdp, pmd_val(pmd)));
>  }
> -
> -#define __HAVE_ARCH_FLUSH_PMD_TLB_RANGE
> -void flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start,
> -			unsigned long end);
> -
>  #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
>
>  /*
> diff --git a/arch/riscv/include/asm/tlbflush.h b/arch/riscv/include/asm/tlbflush.h
> index c84218ad7afc..801019381dea 100644
> --- a/arch/riscv/include/asm/tlbflush.h
> +++ b/arch/riscv/include/asm/tlbflush.h
> @@ -33,6 +33,11 @@ void flush_tlb_mm(struct mm_struct *mm);
>  void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
>  void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
>  		     unsigned long end);
> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> +#define __HAVE_ARCH_FLUSH_PMD_TLB_RANGE
> +void flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start,
> +			unsigned long end);
> +#endif
>  #else /* CONFIG_SMP && CONFIG_MMU */
>
>  #define flush_tlb_all() local_flush_tlb_all()

Thanks, this is on for-next.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next v3] riscv: fix build error when CONFIG_SMP is disabled
@ 2021-06-09  0:05   ` Palmer Dabbelt
  0 siblings, 0 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2021-06-09  0:05 UTC (permalink / raw)
  To: cuibixuan
  Cc: Paul Walmsley, aou, vincent.chen, sunnanyong, linux-riscv,
	linux-kernel, cuibixuan

On Sat, 29 May 2021 01:06:57 PDT (-0700), cuibixuan@huawei.com wrote:
> Fix build error when disable CONFIG_SMP:
> mm/pgtable-generic.o: In function `.L19':
> pgtable-generic.c:(.text+0x42): undefined reference to `flush_pmd_tlb_range'
> mm/pgtable-generic.o: In function `pmdp_huge_clear_flush':
> pgtable-generic.c:(.text+0x6c): undefined reference to `flush_pmd_tlb_range'
> mm/pgtable-generic.o: In function `pmdp_invalidate':
> pgtable-generic.c:(.text+0x162): undefined reference to `flush_pmd_tlb_range'
>
> Fixes: e88b333142e4 ("riscv: mm: add THP support on 64-bit")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
> Acked-by: Nanyong Sun <sunnanyong@huawei.com>
> ---
> Changes in v3:
> Deleted the declaration of the flush_pmd_tlb_range() in the patch
>
> Changes in v2:
> Move the declaration of flush_pmd_tlb_rang to tlbflush.h
>
>  arch/riscv/include/asm/pgtable.h  | 5 -----
>  arch/riscv/include/asm/tlbflush.h | 5 +++++
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
> index 29e2c836848d..eda31002c4b1 100644
> --- a/arch/riscv/include/asm/pgtable.h
> +++ b/arch/riscv/include/asm/pgtable.h
> @@ -622,11 +622,6 @@ static inline pmd_t pmdp_establish(struct vm_area_struct *vma,
>  {
>  	return __pmd(atomic_long_xchg((atomic_long_t *)pmdp, pmd_val(pmd)));
>  }
> -
> -#define __HAVE_ARCH_FLUSH_PMD_TLB_RANGE
> -void flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start,
> -			unsigned long end);
> -
>  #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
>
>  /*
> diff --git a/arch/riscv/include/asm/tlbflush.h b/arch/riscv/include/asm/tlbflush.h
> index c84218ad7afc..801019381dea 100644
> --- a/arch/riscv/include/asm/tlbflush.h
> +++ b/arch/riscv/include/asm/tlbflush.h
> @@ -33,6 +33,11 @@ void flush_tlb_mm(struct mm_struct *mm);
>  void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
>  void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
>  		     unsigned long end);
> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> +#define __HAVE_ARCH_FLUSH_PMD_TLB_RANGE
> +void flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start,
> +			unsigned long end);
> +#endif
>  #else /* CONFIG_SMP && CONFIG_MMU */
>
>  #define flush_tlb_all() local_flush_tlb_all()

Thanks, this is on for-next.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-09  0:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-29  8:06 [PATCH -next v3] riscv: fix build error when CONFIG_SMP is disabled Bixuan Cui
2021-05-29  8:06 ` Bixuan Cui
2021-06-09  0:05 ` Palmer Dabbelt
2021-06-09  0:05   ` Palmer Dabbelt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.