1. 07 May, 2019 1 commit
    • Mathieu Desnoyers's avatar
      rseq/selftests: x86: Work-around bogus gcc-8 optimisation · fe22983d
      Mathieu Desnoyers authored
      gcc-8 version 8.1.0, 8.2.0, and 8.3.0 generate broken assembler with asm
      goto that have a thread-local storage "m" input operand on both x86-32
      and x86-64. For instance:
      
      __thread int var;
      
      static int fct(void)
      {
              asm goto (      "jmp %l[testlabel]\n\t"
                              : : [var] "m" (var) : : testlabel);
              return 0;
      testlabel:
              return 1;
      }
      
      int main()
      {
              return fct();
      }
      
      % gcc-8 -O2 -o test-asm-goto test-asm-goto.c
      /tmp/ccAdHJbe.o: In function `main':
      test-asm-goto.c:(.text.startup+0x1): undefined reference to `.L2'
      collect2: error: ld returned 1 exit status
      
      % gcc-8 -m32 -O2 -o test-asm-goto test-asm-goto.c
      /tmp/ccREsVXA.o: In function `main':
      test-asm-goto.c:(.text.startup+0x1): undefined reference to `.L2'
      collect2: error: ld returned 1 exit status
      
      Work-around this compiler bug in the rseq-x86.h header by passing the
      address of the __rseq_abi TLS as a register operand rather than using
      the "m" input operand.
      
      Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90193Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      CC: Ingo Molnar <mingo@redhat.com>
      CC: Peter Zijlstra <peterz@infradead.org>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Joel Fernandes <joelaf@google.com>
      CC: Catalin Marinas <catalin.marinas@arm.com>
      CC: Dave Watson <davejwatson@fb.com>
      CC: Will Deacon <will.deacon@arm.com>
      CC: Shuah Khan <shuah@kernel.org>
      CC: Andi Kleen <andi@firstfloor.org>
      CC: linux-kselftest@vger.kernel.org
      CC: "H . Peter Anvin" <hpa@zytor.com>
      CC: Chris Lameter <cl@linux.com>
      CC: Russell King <linux@arm.linux.org.uk>
      CC: Michael Kerrisk <mtk.manpages@gmail.com>
      CC: "Paul E . McKenney" <paulmck@linux.vnet.ibm.com>
      CC: Paul Turner <pjt@google.com>
      CC: Boqun Feng <boqun.feng@gmail.com>
      CC: Josh Triplett <josh@joshtriplett.org>
      CC: Steven Rostedt <rostedt@goodmis.org>
      CC: Ben Maurer <bmaurer@fb.com>
      CC: linux-api@vger.kernel.org
      CC: Andy Lutomirski <luto@amacapital.net>
      CC: Andrew Morton <akpm@linux-foundation.org>
      CC: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      fe22983d
  2. 25 Apr, 2019 8 commits
  3. 22 Apr, 2019 1 commit
    • Shuah Khan's avatar
      selftests: build and run gpio when output directory is the src dir · d917fb87
      Shuah Khan authored
      Build and run gpio when output directory is the src dir.  gpio has
      dependency on tools/gpio and builds tools/gpio objects in the src
      directory in all cases making the src repo dirty even when object
      relocation is specified.
      
      This fixes the following commands from generating gpio objects in
      the source repository:
      
      make O=dir kselftest
      export KBUILD_OUTPUT=dir; make kselftest
      make O=dir -C tools/testing/selftests
      expoert KBUILD_OUTPUT=dir; make -C tools/testing/selftests
      
      The following commands still build gpio objects in the source repo
      (gpio Makefile needs to fixed):
      make O=dir kselftest TARGETS="gpio"
      export KBUILD_OUTPUT=dir; make kselftest TARGETS="gpio"
      make O=dir -C tools/testing/selftests TARGETS="gpio"
      expoert KBUILD_OUTPUT=dir; make -C tools/testing/selftests TARGETS="gpio"
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      d917fb87
  4. 19 Apr, 2019 3 commits
    • Kees Cook's avatar
      selftests/ipc: Fix msgque compiler warnings · a147faa9
      Kees Cook authored
      This fixes the various compiler warnings when building the msgque
      selftest. The primary change is using sys/msg.h instead of linux/msg.h
      directly to gain the API declarations.
      
      Fixes: 3a665531 ("selftests: IPC message queue copy feature test")
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      a147faa9
    • Po-Hsu Lin's avatar
      selftests/efivarfs: clean up test files from test_create*() · dff6d2ae
      Po-Hsu Lin authored
      Test files created by test_create() and test_create_empty() tests will
      stay in the $efivarfs_mount directory until the system was rebooted.
      
      When the tester tries to run this efivarfs test again on the same
      system, the immutable characteristics in that directory will cause some
      "Operation not permitted" noises, and a false-positve test result as the
      file was created in previous run.
          --------------------
          running test_create
          --------------------
          ./efivarfs.sh: line 59: /sys/firmware/efi/efivars/test_create-210be57c-9849-4fc7-a635-e6382d1aec27: Operation not permitted
            [PASS]
          --------------------
          running test_create_empty
          --------------------
          ./efivarfs.sh: line 78: /sys/firmware/efi/efivars/test_create_empty-210be57c-9849-4fc7-a635-e6382d1aec27: Operation not permitted
           [PASS]
          --------------------
      
      Create a file_cleanup() to remove those test files in the end of each
      test to solve this issue.
      
      For the test_create_read, we can move the clean up task to the end of
      the test to ensure the system is clean.
      
      Also, use this function to replace the existing file removal code.
      Signed-off-by: default avatarPo-Hsu Lin <po-hsu.lin@canonical.com>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      dff6d2ae
    • Shuah Khan's avatar
      selftests: fix headers_install circular dependency · 8ce72dc3
      Shuah Khan authored
      "make kselftest" fails with "Circular Makefile.o <- prepare dependency
      dropped." error, when lib.mk invokes "make headers_install".
      
      Make level 0: Main make calls selftests run_tests target
      ...
      Make level n: selftests lib.mk invokes main make's headers_install
      
      The secondary level make inherits builtin-rules which will use the rule
      to generate Makefile.o  and runs into "Circular Makefile.o <- prepare
      dependency dropped." error, and kselftest compile fails.
      
      Invoke headers_install target with --no-builtin-rules to avoid circular
      error.
      
      In addition, lib.mk installs headers in the default HDR_PATH, even when
      build relocation is requested with O= or export KBUILD_OUTPUT. Fix the
      problem by passing in INSTALL_HDR_PATH. The headers are installed under
      the specified output "dir/usr".
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      8ce72dc3
  5. 17 Apr, 2019 10 commits
  6. 16 Apr, 2019 2 commits
  7. 08 Apr, 2019 14 commits
  8. 07 Apr, 2019 1 commit
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · d8491223
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "A collection of fixes from the last few weeks. Most of them are
        smaller tweaks and fixes to DT and hardware descriptions for boards.
        Some of the more significant ones are:
      
         - eMMC and RGMII stability tweaks for rk3288
      
         - DDC fixes for Rock PI 4
      
         - Audio fixes for two TI am335x eval boards
      
         - D_CAN clock fix for am335x
      
         - Compilation fixes for clang
      
         - !HOTPLUG_CPU compilation fix for one of the new platforms this
           release (milbeaut)
      
         - A revert of a gpio fix for nomadik that instead was fixed in the
           gpio subsystem
      
         - Whitespace fix for the DT JSON schema (no tabs allowed)"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (25 commits)
        ARM: milbeaut: fix build with !CONFIG_HOTPLUG_CPU
        ARM: iop: don't use using 64-bit DMA masks
        ARM: orion: don't use using 64-bit DMA masks
        Revert "ARM: dts: nomadik: Fix polarity of SPI CS"
        dt-bindings: cpu: Fix JSON schema
        arm/mach-at91/pm : fix possible object reference leak
        ARM: dts: at91: Fix typo in ISC_D0 on PC9
        ARM: dts: Fix dcan clkctrl clock for am3
        reset: meson-audio-arb: Fix missing .owner setting of reset_controller_dev
        dt-bindings: reset: meson-g12a: Add missing USB2 PHY resets
        ARM: dts: rockchip: Remove #address/#size-cells from rk3288-veyron gpio-keys
        ARM: dts: rockchip: Remove #address/#size-cells from rk3288 mipi_dsi
        ARM: dts: rockchip: Fix gpu opp node names for rk3288
        ARM: dts: am335x-evmsk: Correct the regulators for the audio codec
        ARM: dts: am335x-evm: Correct the regulators for the audio codec
        ARM: OMAP2+: add missing of_node_put after of_device_is_available
        ARM: OMAP1: ams-delta: Fix broken GPIO ID allocation
        arm64: dts: stratix10: add the sysmgr-syscon property from the gmac's
        arm64: dts: rockchip: fix rk3328 sdmmc0 write errors
        arm64: dts: rockchip: fix rk3328 rgmii high tx error rate
        ...
      d8491223