# git rev-parse -q --verify 66763e9d1f6a8eda00da3a32c007b2af61412c10^{commit} 66763e9d1f6a8eda00da3a32c007b2af61412c10 already have revision, skipping fetch # git checkout -q -f -B kisskb 66763e9d1f6a8eda00da3a32c007b2af61412c10 # git clean -qxdf # git log -1 commit 66763e9d1f6a8eda00da3a32c007b2af61412c10 Author: Michael Ellerman Date: Tue Mar 13 15:58:11 2018 +1100 powerpc/64s: Fix NULL AT_BASE_PLATFORM when using DT CPU features When running virtualised the powerpc kernel is able to run the system in "compat mode" - which means the kernel and hardware are pretending to userspace that the CPU is an older version than it actually is. AT_BASE_PLATFORM is an AUXV entry that we export to userspace for use when we're running in that mode, which tells userspace the "platform" string for the real CPU version, as opposed to the faked version. Although we don't support compat mode when using DT CPU features, and arguably don't need to set AT_BASE_PLATFORM, the existing cputable based code always sets it even when we're running bare metal. That means the lack of AT_BASE_PLATFORM is a user-visible artifact of the fact that the kernel is using DT CPU features, which we don't want. So set it in the DT CPU features code also. This results in eg: $ LD_SHOW_AUXV=1 /bin/true | grep "AT_.*PLATFORM" AT_PLATFORM: power9 AT_BASE_PLATFORM:power9 Signed-off-by: Michael Ellerman # < /opt/cross/kisskb/gcc-4.6.3-nolibc/mips-linux/bin/mips-linux-gcc --version # < git log --format=%s --max-count=1 66763e9d1f6a8eda00da3a32c007b2af61412c10 # < make -s -j 80 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mips CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/mips-linux/bin/mips-linux- defconfig # make -s -j 80 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mips CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/mips-linux/bin/mips-linux- /kisskb/src/arch/mips/vdso/Makefile:32: MIPS VDSO requires binutils >= 2.25 /kisskb/src/arch/mips/vdso/Makefile:32: MIPS VDSO requires binutils >= 2.25 /kisskb/src/drivers/auxdisplay/img-ascii-lcd.c: In function 'malta_update': /kisskb/src/drivers/auxdisplay/img-ascii-lcd.c:109:5: warning: 'err' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/auxdisplay/img-ascii-lcd.c: In function 'sead3_update': /kisskb/src/drivers/auxdisplay/img-ascii-lcd.c:207:5: warning: 'err' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:183:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/cgroup/cgroup-v1.c: In function 'cgroup1_mount': /kisskb/src/kernel/cgroup/cgroup-v1.c:1268:20: warning: 'root' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/rcu/srcutree.c: In function 'init_srcu_struct_fields': /kisskb/src/kernel/rcu/srcutree.c:146:32: warning: 'levelspread[]' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/rcu/srcutree.c:94:6: note: 'levelspread[]' was declared here /kisskb/src/drivers/tty/serial/8250/8250_core.c: In function 'univ8250_release_irq': /kisskb/src/drivers/tty/serial/8250/8250_core.c:251:18: warning: 'i' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c:231:19: note: 'i' was declared here /kisskb/src/arch/mips/vdso/Makefile:32: MIPS VDSO requires binutils >= 2.25 /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:183:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] FIT description: Linux 4.16.0-rc2-g66763e9 Created: Wed Mar 14 00:01:39 2018 Image 0 (kernel@0) Description: Linux 4.16.0-rc2-g66763e9 Created: Wed Mar 14 00:01:39 2018 Type: Kernel Image Compression: gzip compressed Data Size: 4324738 Bytes = 4223.38 kB = 4.12 MB Architecture: MIPS OS: Linux Load Address: 0x80100000 Entry Point: 0x80850290 Hash algo: sha1 Hash value: b20641e05701377c20560af8f7f6e1ac5cda4026 Image 1 (fdt@boston) Description: img,boston Device Tree Created: Wed Mar 14 00:01:39 2018 Type: Flat Device Tree Compression: uncompressed Data Size: 3602 Bytes = 3.52 kB = 0.00 MB Architecture: MIPS Hash algo: sha1 Hash value: dabc84017c5ea1c23fdb5a4b25d185bdf81faa6a Image 2 (fdt@ni169445) Description: NI 169445 device tree Created: Wed Mar 14 00:01:39 2018 Type: Flat Device Tree Compression: uncompressed Data Size: 1871 Bytes = 1.83 kB = 0.00 MB Architecture: MIPS Hash algo: sha1 Hash value: 51b89b31605ee62038c8468c429af091dfc75ec7 Default Configuration: 'conf@default' Configuration 0 (conf@default) Description: Generic Linux kernel Kernel: kernel@0 Configuration 1 (conf@boston) Description: Boston Linux kernel Kernel: kernel@0 FDT: fdt@boston Configuration 2 (conf@ni169445) Description: NI 169445 Linux Kernel Kernel: kernel@0 FDT: fdt@ni169445 Completed OK # rm -rf /kisskb/build/powerpc-fixes_mips-defconfig_mips # Build took: 0:01:35.342207