# git rev-parse -q --verify 36e826b568e412f61d68fedc02a67b4d8b7583cc^{commit} 36e826b568e412f61d68fedc02a67b4d8b7583cc already have revision, skipping fetch # git checkout -q -f -B kisskb 36e826b568e412f61d68fedc02a67b4d8b7583cc # git clean -qxdf # < git log -1 # commit 36e826b568e412f61d68fedc02a67b4d8b7583cc # Author: Aditya Gupta # Date: Mon Oct 23 12:56:12 2023 +0530 # # powerpc/vmcore: Add MMU information to vmcoreinfo # # Since below commit, address mapping for vmemmap has changed for Radix # MMU, where address mapping is stored in kernel page table itself, # instead of earlier used 'vmemmap_list'. # # commit 368a0590d954 ("powerpc/book3s64/vmemmap: switch radix to use # a different vmemmap handling function") # # Hence with upstream kernel, in case of Radix MMU, makedumpfile fails # to do address translation for vmemmap addresses, as it depended on # vmemmap_list, which can now be empty. # # While fixing the address translation in makedumpfile, it was identified # that currently makedumpfile cannot distinguish between Hash MMU and # Radix MMU, unless VMLINUX is passed with -x flag to makedumpfile. And # hence fails to assign offsets and shifts correctly (such as in L4 to # PGDIR offset calculation in makedumpfile). # # For getting the MMU, makedumpfile uses `cur_cpu_spec.mmu_features`. # # Add `cur_cpu_spec` symbol and offset of `mmu_features` in the `cpu_spec` # struct, to VMCOREINFO, so that makedumpfile can assign the offsets # correctly, without needing a VMLINUX. # # Also, even along with `cur_cpu_spec->mmu_features` makedumpfile has to # depend on the 'MMU_FTR_TYPE_RADIX' flag in mmu_features, implying kernel # developers need to be cautious of changes to 'MMU_FTR_*' defines. # # A more stable approach was suggested in the below thread by contributors: # https://lore.kernel.org/linuxppc-dev/20230920105706.853626-1-adityag@linux.ibm.com/ # # The suggestion was to add whether 'RADIX_MMU' is enabled in vmcoreinfo # # This patch also implements the suggestion, by adding 'RADIX_MMU' in # vmcoreinfo, which makedumpfile can use to get whether the crashed system # had RADIX MMU (in which case 'NUMBER(RADIX_MMU)=1') or not (in which # case 'NUMBER(RADIX_MMU)=0') # # Fixes: 368a0590d954 ("powerpc/book3s64/vmemmap: switch radix to use a different vmemmap handling function") # Reported-by: Sachin Sant # Signed-off-by: Aditya Gupta # Signed-off-by: Michael Ellerman # Link: https://msgid.link/20231023072612.50874-1-adityag@linux.ibm.com # < /opt/cross/kisskb/korg/gcc-12.2.0-nolibc/sparc64-linux/bin/sparc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-12.2.0-nolibc/sparc64-linux/bin/sparc64-linux-ld --version # < git log --format=%s --max-count=1 36e826b568e412f61d68fedc02a67b4d8b7583cc # make -s -j 160 ARCH=sparc64 O=/kisskb/build/powerpc-next_defconfig_sparc64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-12.2.0-nolibc/sparc64-linux/bin/sparc64-linux- defconfig # < make -s -j 160 ARCH=sparc64 O=/kisskb/build/powerpc-next_defconfig_sparc64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-12.2.0-nolibc/sparc64-linux/bin/sparc64-linux- help # make -s -j 160 ARCH=sparc64 O=/kisskb/build/powerpc-next_defconfig_sparc64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-12.2.0-nolibc/sparc64-linux/bin/sparc64-linux- olddefconfig # make -s -j 160 ARCH=sparc64 O=/kisskb/build/powerpc-next_defconfig_sparc64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-12.2.0-nolibc/sparc64-linux/bin/sparc64-linux- :1519:2: warning: #warning syscall clone3 not implemented [-Wcpp] /opt/cross/kisskb/korg/gcc-12.2.0-nolibc/sparc64-linux/bin/sparc64-linux-ld: warning: arch/sparc/vdso/vdso-note.o: missing .note.GNU-stack section implies executable stack /opt/cross/kisskb/korg/gcc-12.2.0-nolibc/sparc64-linux/bin/sparc64-linux-ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker /opt/cross/kisskb/korg/gcc-12.2.0-nolibc/sparc64-linux/bin/sparc64-linux-ld: warning: arch/sparc/vdso/vdso32/vdso-note.o: missing .note.GNU-stack section implies executable stack /opt/cross/kisskb/korg/gcc-12.2.0-nolibc/sparc64-linux/bin/sparc64-linux-ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker WARNING: modpost: EXPORT symbol "_mcount" [vmlinux] version generation failed, symbol will not be versioned. Is "_mcount" prototyped in ? kernel: arch/sparc/boot/image is ready kernel: arch/sparc/boot/zImage is ready Completed OK # rm -rf /kisskb/build/powerpc-next_defconfig_sparc64-gcc12 # Build took: 0:01:26.833723