On 6/21/23 9:38 AM, Michael Ellerman wrote:
> "Aneesh Kumar K.V" <aneesh.ku...@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.ku...@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

Reply via email to