# git rev-parse -q --verify 335aca5f65f1a39670944930131da5f2276f888f^{commit} 335aca5f65f1a39670944930131da5f2276f888f already have revision, skipping fetch # git checkout -q -f -B kisskb 335aca5f65f1a39670944930131da5f2276f888f # git clean -qxdf # < git log -1 # commit 335aca5f65f1a39670944930131da5f2276f888f # Merge: 8ac9b9d61f0e 7fa95f9adaee # Author: Michael Ellerman # Date: Thu Jul 23 17:43:44 2020 +1000 # # Merge branch 'scv' support into next # # From Nick's cover letter: # # Linux powerpc new system call instruction and ABI # # System Call Vectored (scv) ABI # ============================== # # The scv instruction is introduced with POWER9 / ISA3, it comes with an # rfscv counter-part. The benefit of these instructions is # performance (trading slower SRR0/1 with faster LR/CTR registers, and # entering the kernel with MSR[EE] and MSR[RI] left enabled, which can # reduce MSR updates. The scv instruction has 128 levels (not enough to # cover the Linux system call space). # # Assignment and advertisement # ---------------------------- # The proposal is to assign scv levels conservatively, and advertise # them with HWCAP feature bits as we add support for more. # # Linux has not enabled FSCR[SCV] yet, so executing the scv instruction # will cause the kernel to log a "SCV facility unavilable" message, and # deliver a SIGILL with ILL_ILLOPC to the process. Linux has defined a # HWCAP2 bit PPC_FEATURE2_SCV for SCV support, but does not set it. # # This change allocates the zero level ('scv 0'), advertised with # PPC_FEATURE2_SCV, which will be used to provide normal Linux system # calls (equivalent to 'sc'). # # Attempting to execute scv with other levels will cause a SIGILL to be # delivered the same as before, but will not log a "SCV facility # unavailable" message (because the processor facility is enabled). # # Calling convention # ------------------ # The proposal is for scv 0 to provide the standard Linux system call # ABI with the following differences from sc convention[1]: # # - LR is to be volatile across scv calls. This is necessary because the # scv instruction clobbers LR. From previous discussion, this should # be possible to deal with in GCC clobbers and CFI. # # - cr1 and cr5-cr7 are volatile. This matches the C ABI and would allow # the kernel system call exit to avoid restoring the volatile cr # registers (although we probably still would anyway to avoid # information leaks). # # - Error handling: The consensus among kernel, glibc, and musl is to # move to using negative return values in r3 rather than CR0[SO]=1 to # indicate error, which matches most other architectures, and is # closer to a function call. # # Notes # ----- # - r0,r4-r8 are documented as volatile in the ABI, but the kernel patch # as submitted currently preserves them. This is to leave room for # deciding which way to go with these. Some small benefit was found by # preserving them[1] but I'm not convinced it's worth deviating from # the C function call ABI just for this. Release code should follow # the ABI. # # Previous discussions: # https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-April/208691.html # https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-April/209268.html # # [1] https://github.com/torvalds/linux/blob/master/Documentation/powerpc/syscall64-abi.rst # [2] https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-April/209263.html # < /opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux-gcc --version # < /opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux-ld --version # < git log --format=%s --max-count=1 335aca5f65f1a39670944930131da5f2276f888f # < make -s -j 48 ARCH=mips O=/kisskb/build/powerpc-next_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- defconfig # < make -s -j 48 ARCH=mips O=/kisskb/build/powerpc-next_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- help # make -s -j 48 ARCH=mips O=/kisskb/build/powerpc-next_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- olddefconfig # make -s -j 48 ARCH=mips O=/kisskb/build/powerpc-next_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- FIT description: Linux 5.8.0-rc2-g335aca5f65f1 Created: Fri Jul 24 07:58:26 2020 Image 0 (kernel@0) Description: Linux 5.8.0-rc2-g335aca5f65f1 Created: Fri Jul 24 07:58:26 2020 Type: Kernel Image Compression: gzip compressed Data Size: 4993922 Bytes = 4876.88 KiB = 4.76 MiB Architecture: MIPS OS: Linux Load Address: 0x80100000 Entry Point: 0x809319e0 Hash algo: sha1 Hash value: 2cf5e3cb846a36d5aece53a31570bff18137b045 Image 1 (fdt@boston) Description: img,boston Device Tree Created: Fri Jul 24 07:58:26 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 3793 Bytes = 3.70 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 4799f50d688573234da6e9d7701234d394759ef4 Image 2 (fdt@ni169445) Description: NI 169445 device tree Created: Fri Jul 24 07:58:26 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 1871 Bytes = 1.83 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 51b89b31605ee62038c8468c429af091dfc75ec7 Image 3 (fdt@ocelot_pcb123) Description: MSCC Ocelot PCB123 Device Tree Created: Fri Jul 24 07:58:26 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 4639 Bytes = 4.53 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: be2724f58b66c316a61da7c11ced633f4e7e86c7 Image 4 (fdt@ocelot_pcb120) Description: MSCC Ocelot PCB120 Device Tree Created: Fri Jul 24 07:58:26 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 5198 Bytes = 5.08 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 7556b1594bd7ab9e3b3fa939d8e3e03ae58fa180 Image 5 (fdt@xilfpga) Description: MIPSfpga (xilfpga) Device Tree Created: Fri Jul 24 07:58:26 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 2708 Bytes = 2.64 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 63d058b780f65e22da30f0a183433765f1807f1d 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 Configuration 3 (conf@ocelot_pcb123) Description: Ocelot Linux kernel Kernel: kernel@0 FDT: fdt@ocelot_pcb123 Configuration 4 (conf@ocelot_pcb120) Description: Ocelot Linux kernel Kernel: kernel@0 FDT: fdt@ocelot_pcb120 Configuration 5 (conf@xilfpga) Description: MIPSfpga Linux kernel Kernel: kernel@0 FDT: fdt@xilfpga Completed OK # rm -rf /kisskb/build/powerpc-next_mips-defconfig_mipsel # Build took: 0:01:59.867679