å 2020/2/26 10:40, Jason Yan åé:
Hi Christophe,
å 2020/2/20 21:48, Christophe Leroy åé:
Le 06/02/2020 Ã 03:58, Jason Yan a ÃcritÂ:
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
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'
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'?
[-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