diff mbox series

[02/16] powerpc/book3s64/mm: mmu_vmemmap_psize is used by radix

Message ID 20230606045608.55127-3-aneesh.kumar@linux.ibm.com (mailing list archive)
State Superseded
Headers show
Series Add support for DAX vmemmap optimization for ppc64 | expand

Commit Message

Aneesh Kumar K V June 6, 2023, 4:55 a.m. UTC
This should not be within CONFIG_PPC_64S_HASHS_MMU. We use mmu_vmemmap_psize
on radix while mapping the vmemmap area.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
 arch/powerpc/mm/book3s64/radix_pgtable.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Michael Ellerman June 21, 2023, 4:08 a.m. UTC | #1
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> writes:
> This should not be within CONFIG_PPC_64S_HASHS_MMU. We use mmu_vmemmap_psize
> on radix while mapping the vmemmap area.
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> ---
>  arch/powerpc/mm/book3s64/radix_pgtable.c | 2 --
>  1 file changed, 2 deletions(-)

This breaks microwatt_defconfig, which does not enable CONFIG_PPC_64S_HASH_MMU:

  ../arch/powerpc/mm/book3s64/radix_pgtable.c: In function ‘radix__early_init_mmu’:
  ../arch/powerpc/mm/book3s64/radix_pgtable.c:601:27: error: lvalue required as left operand of assignment
    601 |         mmu_virtual_psize = MMU_PAGE_4K;
        |                           ^
  make[5]: *** [../scripts/Makefile.build:252: arch/powerpc/mm/book3s64/radix_pgtable.o] Error 1
  make[4]: *** [../scripts/Makefile.build:494: arch/powerpc/mm/book3s64] Error 2
  make[3]: *** [../scripts/Makefile.build:494: arch/powerpc/mm] Error 2
  make[2]: *** [../scripts/Makefile.build:494: arch/powerpc] Error 2
  make[2]: *** Waiting for unfinished jobs....
  make[1]: *** [/home/michael/linux/Makefile:2026: .] Error 2
  make: *** [Makefile:226: __sub-make] Error 2

Because mmu_virtual_psize is defined in hash_utils.c, which isn't built.

cheers
Aneesh Kumar K V June 21, 2023, 5:59 a.m. UTC | #2
On 6/21/23 9:38 AM, Michael Ellerman wrote:
> "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> writes:
>> This should not be within CONFIG_PPC_64S_HASHS_MMU. We use mmu_vmemmap_psize
>> on radix while mapping the vmemmap area.
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
>> ---
>>  arch/powerpc/mm/book3s64/radix_pgtable.c | 2 --
>>  1 file changed, 2 deletions(-)
> 
> This breaks microwatt_defconfig, which does not enable CONFIG_PPC_64S_HASH_MMU:
> 
>   ../arch/powerpc/mm/book3s64/radix_pgtable.c: In function ‘radix__early_init_mmu’:
>   ../arch/powerpc/mm/book3s64/radix_pgtable.c:601:27: error: lvalue required as left operand of assignment
>     601 |         mmu_virtual_psize = MMU_PAGE_4K;
>         |                           ^
>   make[5]: *** [../scripts/Makefile.build:252: arch/powerpc/mm/book3s64/radix_pgtable.o] Error 1
>   make[4]: *** [../scripts/Makefile.build:494: arch/powerpc/mm/book3s64] Error 2
>   make[3]: *** [../scripts/Makefile.build:494: arch/powerpc/mm] Error 2
>   make[2]: *** [../scripts/Makefile.build:494: arch/powerpc] Error 2
>   make[2]: *** Waiting for unfinished jobs....
>   make[1]: *** [/home/michael/linux/Makefile:2026: .] Error 2
>   make: *** [Makefile:226: __sub-make] Error 2
> 
> Because mmu_virtual_psize is defined in hash_utils.c, which isn't built.
> 

Ok i missed the mmu_virtual_psize dependency there. Will add microwatt_defconfig to build configs. 


modified   arch/powerpc/mm/book3s64/radix_pgtable.c
@@ -594,12 +594,14 @@ void __init radix__early_init_mmu(void)
 {
 	unsigned long lpcr;
 
+#ifdef CONFIG_PPC_64S_HASH_MMU
 #ifdef CONFIG_PPC_64K_PAGES
 	/* PAGE_SIZE mappings */
 	mmu_virtual_psize = MMU_PAGE_64K;
 #else
 	mmu_virtual_psize = MMU_PAGE_4K;
 #endif
+#endif
 
 #ifdef CONFIG_SPARSEMEM_VMEMMAP
 	/* vmemmap mapping */



> cheers
diff mbox series

Patch

diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
index 5f8c6fbe8a69..570add33c02d 100644
--- a/arch/powerpc/mm/book3s64/radix_pgtable.c
+++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
@@ -594,7 +594,6 @@  void __init radix__early_init_mmu(void)
 {
 	unsigned long lpcr;
 
-#ifdef CONFIG_PPC_64S_HASH_MMU
 #ifdef CONFIG_PPC_64K_PAGES
 	/* PAGE_SIZE mappings */
 	mmu_virtual_psize = MMU_PAGE_64K;
@@ -611,7 +610,6 @@  void __init radix__early_init_mmu(void)
 		mmu_vmemmap_psize = MMU_PAGE_2M;
 	} else
 		mmu_vmemmap_psize = mmu_virtual_psize;
-#endif
 #endif
 	/*
 	 * initialize page table size