1. 28 5月, 2018 2 次提交
  2. 24 5月, 2018 2 次提交
  3. 21 5月, 2018 1 次提交
  4. 14 5月, 2018 1 次提交
  5. 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
  6. 20 3月, 2018 1 次提交
  7. 13 3月, 2018 2 次提交
  8. 02 3月, 2018 1 次提交
    • M
      selftests/powerpc: Skip the subpage_prot tests if the syscall is unavailable · cd4a6f3a
      Michael Ellerman 提交于
      The subpage_prot syscall is only functional when the system is using
      the Hash MMU. Since commit 5b2b8071 ("powerpc/mm: Invalidate
      subpage_prot() system call on radix platforms") it returns ENOENT when
      the Radix MMU is active. Currently this just makes the test fail.
      
      Additionally the syscall is not available if the kernel is built with
      4K pages, or if CONFIG_PPC_SUBPAGE_PROT=n, in which case it returns
      ENOSYS because the syscall is missing entirely.
      
      So check explicitly for ENOENT and ENOSYS and skip if we see either of
      those.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      cd4a6f3a
  9. 28 2月, 2018 1 次提交
  10. 26 2月, 2018 1 次提交
  11. 13 2月, 2018 1 次提交
  12. 22 1月, 2018 2 次提交
  13. 21 1月, 2018 1 次提交
  14. 03 1月, 2018 1 次提交
  15. 11 12月, 2017 1 次提交
    • S
      selftests/powerpc: Fix build errors in powerpc ptrace selftests · f36dbfe1
      Simon Guo 提交于
      GCC 7 will take "r2" in clobber list as an error and it will get
      following build errors for powerpc ptrace selftests even with -fno-pic
      option:
        ptrace-tm-vsx.c: In function ‘tm_vsx’:
        ptrace-tm-vsx.c:42:2: error: PIC register clobbered by ‘r2’ in ‘asm’
          asm __volatile__(
          ^~~
        make[1]: *** [ptrace-tm-vsx] Error 1
        ptrace-tm-spd-vsx.c: In function ‘tm_spd_vsx’:
        ptrace-tm-spd-vsx.c:55:2: error: PIC register clobbered by ‘r2’ in ‘asm’
          asm __volatile__(
          ^~~
        make[1]: *** [ptrace-tm-spd-vsx] Error 1
        ptrace-tm-spr.c: In function ‘tm_spr’:
        ptrace-tm-spr.c:46:2: error: PIC register clobbered by ‘r2’ in ‘asm’
          asm __volatile__(
          ^~~
      
      Fix the build error by removing "r2" from the clobber list. None of
      these asm blocks actually clobber r2.
      Reported-by: NSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: NSimon Guo <wei.guo.simon@gmail.com>
      Tested-by: NSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      f36dbfe1
  16. 04 12月, 2017 1 次提交
  17. 09 11月, 2017 1 次提交
  18. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  19. 25 10月, 2017 1 次提交
    • M
      locking/atomics, selftests/powerpc: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() · 564cbc87
      Mark Rutland 提交于
      For several reasons, it is desirable to use {READ,WRITE}_ONCE() in
      preference to ACCESS_ONCE(), and new code is expected to use one of the
      former. So far, there's been no reason to change most existing uses of
      ACCESS_ONCE(), as these aren't currently harmful.
      
      However, for some features it is necessary to instrument reads and
      writes separately, which is not possible with ACCESS_ONCE(). This
      distinction is critical to correct operation.
      
      The bulk of the kernel code can be transformed via Coccinelle to use
      {READ,WRITE}_ONCE(), though this only modifies users of ACCESS_ONCE(),
      and not the implementation itself. As such, it has the potential to
      break homebrew ACCESS_ONCE() macros seen in some user code in the kernel
      tree (e.g. the virtio code, as fixed in commit ea9156fb).
      
      To avoid fragility if/when that transformation occurs, and to align with
      the preferred usage of {READ,WRITE}_ONCE(), this patch updates the DSCR
      selftest code to use READ_ONCE() rather than ACCESS_ONCE(). There should
      be no functional change as a result of this patch.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Acked-by: NMichael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: davem@davemloft.net
      Cc: linux-arch@vger.kernel.org
      Cc: snitzer@redhat.com
      Cc: thor.thayer@linux.intel.com
      Cc: tj@kernel.org
      Cc: viro@zeniv.linux.org.uk
      Cc: will.deacon@arm.com
      Link: http://lkml.kernel.org/r/1508792849-3115-11-git-send-email-paulmck@linux.vnet.ibm.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      564cbc87
  20. 13 10月, 2017 1 次提交
  21. 06 10月, 2017 1 次提交
  22. 31 8月, 2017 2 次提交
  23. 17 8月, 2017 1 次提交
    • S
      selftests/powerpc: Improve tm-resched-dscr · 99597ced
      Sam Bobroff 提交于
      The tm-resched-dscr self test can, in some situations, run for
      several minutes before being successfully interrupted by the context
      switch it needs in order to perform the test. This often seems to
      occur when the test is being run in a virtual machine.
      
      Improve the test by running it under eat_cpu() to guarantee
      contention for the CPU and increase the chance of a context switch.
      
      In practice this seems to reduce the test time, in some cases, from
      more than two minutes to under a second.
      
      Also remove the "progress dots" so that if the test does run for a
      long time, it doesn't produce large amounts of unnecessary output.
      Signed-off-by: NSam Bobroff <sam.bobroff@au1.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      99597ced
  24. 05 6月, 2017 1 次提交
  25. 19 5月, 2017 1 次提交
    • M
      selftests/powerpc: Fix TM resched DSCR test with some compilers · fe06fe86
      Michael Ellerman 提交于
      The tm-resched-dscr test has started failing sometimes, depending on
      what compiler it's built with, eg:
      
        test: tm_resched_dscr
        Check DSCR TM context switch: tm-resched-dscr: tm-resched-dscr.c:76: test_body: Assertion `rv' failed.
        !! child died by signal 6
      
      When it fails we see that the compiler doesn't initialise rv to 1 before
      entering the inline asm block. Although that's counter intuitive, it
      is allowed because we tell the compiler that the inline asm will write
      to rv (using "=r"), meaning the original value is irrelevant.
      
      Marking it as a read/write parameter would presumably work, but it seems
      simpler to fix it by setting the initial value of rv in the inline asm.
      
      Fixes: 96d01610 ("powerpc: Correct DSCR during TM context switch")
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Acked-by: NMichael Neuling <mikey@neuling.org>
      fe06fe86
  26. 16 5月, 2017 1 次提交
  27. 25 4月, 2017 1 次提交
  28. 27 3月, 2017 1 次提交
    • M
      selftests/powerpc: Fix standalone powerpc build · 2db2c250
      Michael Ellerman 提交于
      The changes to enable building with a separate output directory, in
      commit a8ba798b ("selftests: enable O and KBUILD_OUTPUT") broke
      building the powerpc selftests on their own, eg:
      
       $ cd tools/testing/selftests/powerpc; make
      
      It was partially fixed in commit e53aff45 ("selftests: lib.mk Fix
      individual test builds"), which defined OUTPUT for standalone tests. But
      that only defines OUTPUT within the Makefile, the value is not exported
      so sub-shells can't see it. We could export OUTPUT, but it's actually
      cleaner to just expand the value of OUTPUT before we invoke the shell.
      
      Fixes: a8ba798b ("selftests: enable O and KBUILD_OUTPUT")
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      2db2c250
  29. 24 3月, 2017 1 次提交
  30. 20 3月, 2017 2 次提交
  31. 09 3月, 2017 1 次提交
    • C
      selftests/powerpc: Replace stxvx and lxvx with stxvd2x/lxvd2x · 605df8d6
      Cyril Bur 提交于
      On POWER8 (ISA 2.07) lxvx and stxvx are defined to be extended mnemonics
      of lxvd2x and stxvd2x. For POWER9 (ISA 3.0) the HW architects in their
      infinite wisdom made lxvx and stxvx instructions in their own right.
      
      POWER9 aware GCC will use the POWER9 instruction for lxvx and stxvx
      causing these selftests to fail on POWER8. Further compounding the
      issue, because of the way -mvsx works it will cause the power9
      instructions to be used regardless of -mcpu=power8 to GCC or -mpower8 to
      AS.
      
      The safest way to address the problem for now is to not use the extended
      mnemonic. We don't care how the CPU loads the values from memory since
      the tests only performs register comparisons, so using stdvd2x/lxvd2x
      does not impact the test.
      Signed-off-by: NCyril Bur <cyrilbur@gmail.com>
      Acked-by: Balbir Singh<bsingharora@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      605df8d6
  32. 03 3月, 2017 1 次提交
    • S
      selftest/powerpc: Fix false failures for skipped tests · a6d8a215
      Sachin Sant 提交于
      Tests under alignment subdirectory are skipped when executed on previous
      generation hardware, but harness still marks them as failed.
      
        test: test_copy_unaligned
        tags: git_version:unknown
        [SKIP] Test skipped on line 26
        skip: test_copy_unaligned
        selftests: copy_unaligned [FAIL]
      
      The MAGIC_SKIP_RETURN_VALUE value assigned to rc variable is retained till
      the program exit which causes the test to be marked as failed.
      
      This patch resets the value before returning to the main() routine.
      With this patch the test o/p is as follows:
      
        test: test_copy_unaligned
        tags: git_version:unknown
        [SKIP] Test skipped on line 26
        skip: test_copy_unaligned
        selftests: copy_unaligned [PASS]
      Signed-off-by: NSachin Sant <sachinp@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      a6d8a215
  33. 14 2月, 2017 2 次提交