Re: [PATCH v3 3/6] powerpc/fsl_booke/64: implement KASLR for fsl_booke64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Le 26/02/2020 à 04:33, Jason Yan a écrit :


在 2020/2/26 10:40, Jason Yan 写道:


在 2020/2/20 21:48, Christophe Leroy 写道:


Le 06/02/2020 à 03:58, Jason Yan a écrit :
Hi Christophe,

When using a standard C if/else, all code compiled for PPC32 and PPC64, but this will bring some build error because not all variables both defined for PPC32 and PPC64.

[yanaijie@138 linux]$ sh ppc64build.sh
   CALL    scripts/atomic/check-atomics.sh
   CALL    scripts/checksyscalls.sh
   CHK     include/generated/compile.h
   CC      arch/powerpc/mm/nohash/kaslr_booke.o
arch/powerpc/mm/nohash/kaslr_booke.c: In function 'kaslr_choose_location':
arch/powerpc/mm/nohash/kaslr_booke.c:341:30: error: 'CONFIG_LOWMEM_CAM_NUM' undeclared (first use in this function); did you mean 'CONFIG_FLATMEM_MANUAL'?
    ram = map_mem_in_cams(ram, CONFIG_LOWMEM_CAM_NUM, true);
                               ^~~~~~~~~~~~~~~~~~~~~
                               CONFIG_FLATMEM_MANUAL

This one has to remain inside an #ifdef. That's the only one that has to remain.

arch/powerpc/mm/nohash/kaslr_booke.c:341:30: note: each undeclared identifier is reported only once for each function it appears in
arch/powerpc/mm/nohash/kaslr_booke.c: In function 'kaslr_early_init':
arch/powerpc/mm/nohash/kaslr_booke.c:404:3: error: 'is_second_reloc'

In mmu_decl.h, put the declaration outside the #ifdef CONFIG_PPC32

undeclared (first use in this function); did you mean '__cond_lock'?
    is_second_reloc = 1;
    ^~~~~~~~~~~~~~~
    __cond_lock
arch/powerpc/mm/nohash/kaslr_booke.c:411:4: error: implicit declaration of function 'create_kaslr_tlb_entry'; did you mean 'reloc_kernel_entry'?

Same, put the declaration outside of the #ifdef

[-Werror=implicit-function-declaration]
     create_kaslr_tlb_entry(1, tlb_virt, tlb_phys);
     ^~~~~~~~~~~~~~~~~~~~~~
     reloc_kernel_entry
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:268: arch/powerpc/mm/nohash/kaslr_booke.o] Error 1
make[2]: *** [scripts/Makefile.build:505: arch/powerpc/mm/nohash] Error 2
make[1]: *** [scripts/Makefile.build:505: arch/powerpc/mm] Error 2
make: *** [Makefile:1681: arch/powerpc] Error 2

See the patch I sent you. It builds ok for me.

Christophe



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux