diff mbox series

[linux-next] LoongArch: mm: Export symbol for invalid_pud_table.

Message ID 20231007075303.263407-1-zhaotianrui@loongson.cn (mailing list archive)
State New, archived
Headers show
Series [linux-next] LoongArch: mm: Export symbol for invalid_pud_table. | expand

Commit Message

zhaotianrui Oct. 7, 2023, 7:53 a.m. UTC
Export symbol for invalid_pud_table, so it can be used
by the files in other directories.

And this can resolve the problem caused in:
https://lore.kernel.org/lkml/20230927030959.3629941-5-zhaotianrui@loongson.cn/
ERROR: modpost: "invalid_pud_table" [arch/loongarch/kvm/kvm.ko] undefined!

Signed-off-by: Tianrui Zhao <zhaotianrui@loongson.cn>
---
 arch/loongarch/mm/init.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Huacai Chen Oct. 7, 2023, 9:48 a.m. UTC | #1
Queued for loongarch-next (though I prepared a similar patch), thanks.

Huacai

On Sat, Oct 7, 2023 at 3:53 PM Tianrui Zhao <zhaotianrui@loongson.cn> wrote:
>
> Export symbol for invalid_pud_table, so it can be used
> by the files in other directories.
>
> And this can resolve the problem caused in:
> https://lore.kernel.org/lkml/20230927030959.3629941-5-zhaotianrui@loongson.cn/
> ERROR: modpost: "invalid_pud_table" [arch/loongarch/kvm/kvm.ko] undefined!
>
> Signed-off-by: Tianrui Zhao <zhaotianrui@loongson.cn>
> ---
>  arch/loongarch/mm/init.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c
> index f3fe8c06ba4d..ddf1330c924c 100644
> --- a/arch/loongarch/mm/init.c
> +++ b/arch/loongarch/mm/init.c
> @@ -240,6 +240,7 @@ pgd_t swapper_pg_dir[_PTRS_PER_PGD] __section(".bss..swapper_pg_dir");
>  pgd_t invalid_pg_dir[_PTRS_PER_PGD] __page_aligned_bss;
>  #ifndef __PAGETABLE_PUD_FOLDED
>  pud_t invalid_pud_table[PTRS_PER_PUD] __page_aligned_bss;
> +EXPORT_SYMBOL(invalid_pud_table);
>  #endif
>  #ifndef __PAGETABLE_PMD_FOLDED
>  pmd_t invalid_pmd_table[PTRS_PER_PMD] __page_aligned_bss;
> --
> 2.39.1
>
Randy Dunlap Oct. 7, 2023, 4:14 p.m. UTC | #2
On 10/7/23 00:53, Tianrui Zhao wrote:
> Export symbol for invalid_pud_table, so it can be used
> by the files in other directories.
> 
> And this can resolve the problem caused in:
> https://lore.kernel.org/lkml/20230927030959.3629941-5-zhaotianrui@loongson.cn/
> ERROR: modpost: "invalid_pud_table" [arch/loongarch/kvm/kvm.ko] undefined!
> 
> Signed-off-by: Tianrui Zhao <zhaotianrui@loongson.cn>

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  arch/loongarch/mm/init.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c
> index f3fe8c06ba4d..ddf1330c924c 100644
> --- a/arch/loongarch/mm/init.c
> +++ b/arch/loongarch/mm/init.c
> @@ -240,6 +240,7 @@ pgd_t swapper_pg_dir[_PTRS_PER_PGD] __section(".bss..swapper_pg_dir");
>  pgd_t invalid_pg_dir[_PTRS_PER_PGD] __page_aligned_bss;
>  #ifndef __PAGETABLE_PUD_FOLDED
>  pud_t invalid_pud_table[PTRS_PER_PUD] __page_aligned_bss;
> +EXPORT_SYMBOL(invalid_pud_table);
>  #endif
>  #ifndef __PAGETABLE_PMD_FOLDED
>  pmd_t invalid_pmd_table[PTRS_PER_PMD] __page_aligned_bss;
diff mbox series

Patch

diff --git a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c
index f3fe8c06ba4d..ddf1330c924c 100644
--- a/arch/loongarch/mm/init.c
+++ b/arch/loongarch/mm/init.c
@@ -240,6 +240,7 @@  pgd_t swapper_pg_dir[_PTRS_PER_PGD] __section(".bss..swapper_pg_dir");
 pgd_t invalid_pg_dir[_PTRS_PER_PGD] __page_aligned_bss;
 #ifndef __PAGETABLE_PUD_FOLDED
 pud_t invalid_pud_table[PTRS_PER_PUD] __page_aligned_bss;
+EXPORT_SYMBOL(invalid_pud_table);
 #endif
 #ifndef __PAGETABLE_PMD_FOLDED
 pmd_t invalid_pmd_table[PTRS_PER_PMD] __page_aligned_bss;