1. 01 12月, 2019 3 次提交
  2. 21 11月, 2019 1 次提交
    • B
      selftests/powerpc: Do not fail with reschedule · a3581509
      Breno Leitao 提交于
      [ Upstream commit 44d947eff19d64384efc06069509db7a0a1103b0 ]
      
      There are cases where the test is not expecting to have the transaction
      aborted, but, the test process might have been rescheduled, either in the
      OS level or by KVM (if it is running on a KVM guest machine). The process
      reschedule will cause a treclaim/recheckpoint which will cause the
      transaction to doom, aborting the transaction as soon as the process is
      rescheduled back to the CPU. This might cause the test to fail, but this is
      not a failure in essence.
      
      If that is the case, TEXASR[FC] is indicated with either
      TM_CAUSE_RESCHEDULE or TM_CAUSE_KVM_RESCHEDULE for KVM interruptions.
      
      In this scenario, ignore these two failures and avoid the whole test to
      return failure.
      Signed-off-by: NBreno Leitao <leitao@debian.org>
      Reviewed-by: NGustavo Romero <gromero@linux.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      a3581509
  3. 10 11月, 2019 2 次提交
  4. 21 11月, 2018 1 次提交
  5. 14 11月, 2018 1 次提交
    • B
      selftests/powerpc: Fix ptrace tm failure · 1ebadf5e
      Breno Leitao 提交于
      commit 48dc0ef1 upstream.
      
      Test ptrace-tm-spd-gpr fails on current kernel (4.19) due to a segmentation
      fault that happens on the child process prior to setting cptr[2] = 1. This
      causes the parent process to wait forever at 'while (!pptr[2])' and the test to
      be killed by the test harness framework by timeout, thus, failing.
      
      The segmentation fault happens because of a inline assembly being
      generated as:
      
      	0x10000355c <tm_spd_gpr+492>    lfs    f0, 0(0)
      
      This is reading memory position 0x0 and causing the segmentation fault.
      
      This code is being generated by ASM_LOAD_FPR_SINGLE_PRECISION(flt_4), where
      flt_4 is passed to the inline assembly block as:
      
      	[flt_4] "r" (&d)
      
      Since the inline assembly 'r' constraint means any GPR, gpr0 is being
      chosen, thus causing this issue when issuing a Load Floating-Point Single
      instruction.
      
      This patch simply changes the constraint to 'b', which specify that this
      register will be used as base, and r0 is not allowed to be used, avoiding
      this issue.
      
      Other than that, removing flt_2 register from the input operands, since it
      is not used by the inline assembly code at all.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NBreno Leitao <leitao@debian.org>
      Acked-by: NSegher Boessenkool <segher@kernel.crashing.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1ebadf5e
  6. 28 9月, 2018 1 次提交
    • M
      selftests/powerpc: Fix Makefiles for headers_install change · 7e0cf1c9
      Michael Ellerman 提交于
      Commit b2d35fa5 ("selftests: add headers_install to lib.mk")
      introduced a requirement that Makefiles more than one level below the
      selftests directory need to define top_srcdir, but it didn't update
      any of the powerpc Makefiles.
      
      This broke building all the powerpc selftests with eg:
      
        make[1]: Entering directory '/src/linux/tools/testing/selftests/powerpc'
        BUILD_TARGET=/src/linux/tools/testing/selftests/powerpc/alignment; mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C alignment all
        make[2]: Entering directory '/src/linux/tools/testing/selftests/powerpc/alignment'
        ../../lib.mk:20: ../../../../scripts/subarch.include: No such file or directory
        make[2]: *** No rule to make target '../../../../scripts/subarch.include'.
        make[2]: Failed to remake makefile '../../../../scripts/subarch.include'.
        Makefile:38: recipe for target 'alignment' failed
      
      Fix it by setting top_srcdir in the affected Makefiles.
      
      Fixes: b2d35fa5 ("selftests: add headers_install to lib.mk")
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      7e0cf1c9
  7. 08 8月, 2018 1 次提交
    • B
      selftests/powerpc: Kill child processes on SIGINT · 7c27a26e
      Breno Leitao 提交于
      There are some powerpc selftests, as tm/tm-unavailable, that run for a long
      period (>120 seconds), and if it is interrupted, as pressing CRTL-C
      (SIGINT), the foreground process (harness) dies but the child process and
      threads continue to execute (with PPID = 1 now) in background.
      
      In this case, you'd think the whole test exited, but there are remaining
      threads and processes being executed in background. Sometimes these
      zombies processes are doing annoying things, as consuming the whole CPU or
      dumping things to STDOUT.
      
      This patch fixes this problem by attaching an empty signal handler to
      SIGINT in the harness process. This handler will interrupt (EINTR) the
      parent process waitpid() call, letting the code to follow through the
      normal flow, which will kill all the processes in the child process group.
      
      This patch also fixes a typo.
      Signed-off-by: NBreno Leitao <leitao@debian.org>
      Signed-off-by: NGustavo Romero <gromero@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      7c27a26e
  8. 07 8月, 2018 10 次提交
  9. 30 7月, 2018 2 次提交
  10. 24 7月, 2018 3 次提交
  11. 20 7月, 2018 3 次提交
  12. 02 7月, 2018 2 次提交
  13. 03 6月, 2018 1 次提交
  14. 28 5月, 2018 2 次提交
  15. 24 5月, 2018 2 次提交
  16. 21 5月, 2018 1 次提交
  17. 14 5月, 2018 1 次提交
  18. 03 4月, 2018 1 次提交
    • M
      selftests/powerpc: Fix copyloops build since Power4 assembler change · b6f534d1
      Michael Ellerman 提交于
      The recent commit 15a3204d ("powerpc/64s: Set assembler machine
      type to POWER4") set the machine type in our ASFLAGS when building the
      kernel, and removed some ".machine power4" directives from various asm
      files.
      
      This broke the selftests build on old toolchains (that don't assume
      Power4), because we build the kernel source files into the selftests
      using different ASFLAGS.
      
      The fix is simply to add -mpower4 to the selftest ASFLAGS as well.
      
      Fixes: 15a3204d ("powerpc/64s: Set assembler machine type to POWER4")
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      b6f534d1
  19. 20 3月, 2018 1 次提交
  20. 13 3月, 2018 1 次提交