1. 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
  2. 04 2月, 2017 1 次提交
  3. 09 9月, 2016 1 次提交
  4. 26 1月, 2016 1 次提交
  5. 22 12月, 2015 1 次提交
  6. 16 11月, 2015 2 次提交
  7. 31 7月, 2015 1 次提交
    • M
      arm: perf: factor arm_pmu core out to drivers · fa8ad788
      Mark Rutland 提交于
      To enable sharing of the arm_pmu code with arm64, this patch factors it
      out to drivers/perf/. A new drivers/perf directory is added for
      performance monitor drivers to live under.
      
      MAINTAINERS is updated accordingly. Files added previously without a
      corresponsing MAINTAINERS update (perf_regs.c, perf_callchain.c, and
      perf_event.h) are also added.
      
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      [will: augmented Kconfig help slightly]
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      fa8ad788
  8. 28 5月, 2015 1 次提交
    • M
      arm: perf: factor out armv7 pmu driver · 29ba0f37
      Mark Rutland 提交于
      Now that the core arm perf code maintains no global state and all
      microarchitecture-specific PMU data can be fed in through the shared
      probe function, it's possible to use it as a library and get rid of the
      C file includes we have currently.
      
      This patch factors out the ARMv7-specific portions out into the ARMv7
      driver. For the moment this is always built if perf event support is
      enabled, but the preprocessor guards will leave behind an empty file.
      
      Now that perf_event_cpu.c contains no microarchitecture-specific data,
      the associated probing code is removed, completing its relegation to a
      library file. The vestigal "arm-pmu" platform device ID is removed in
      this patch, as it has been unused since platform files were updated to
      specify a more specific PMU variant.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      29ba0f37
  9. 27 5月, 2015 1 次提交
  10. 18 3月, 2015 3 次提交
    • S
      ARM: perf: Add support for Scorpion PMUs · 341e42c4
      Stephen Boyd 提交于
      Scorpion supports a set of local performance monitor event
      selection registers (LPM) sitting behind a cp15 based interface
      that extend the architected PMU events to include Scorpion CPU
      and Venum VFP specific events. To use these events the user is
      expected to program the lpm register with the event code shifted
      into the group they care about and then point the PMNx event at
      that region+group combo by writing a LPMn_GROUPx event. Add
      support for this hardware.
      
      Note: the raw event number is a pure software construct that
      allows us to map the multi-dimensional number space of regions,
      groups, and event codes into a flat event number space suitable
      for use by the perf framework.
      
      This is based on code originally written by Sheetal Sahasrabudhe,
      Ashwin Chaugule, and Neil Leeder [1].
      
      [1] https://www.codeaurora.org/cgit/quic/la/kernel/msm/tree/arch/arm/kernel/perf_event_msm.c?h=msm-3.4
      
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Neil Leeder <nleeder@codeaurora.org>
      Cc: Ashwin Chaugule <ashwinc@codeaurora.org>
      Cc: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
      Cc: <devicetree@vger.kernel.org>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      341e42c4
    • S
      ARM: perf: Only reset PMxEVCNTCR registers on reset · 93499918
      Stephen Boyd 提交于
      The Krait specific PMxEVCNTCR register is unpredictable upon
      reset. Currently we clear the register before we setup an event,
      but we don't need to do that. Instead, we can iterate through all
      the events and clear them once when we reset the PMU, saving a
      write in the event setup path.
      
      Cc: Neil Leeder <nleeder@codeaurora.org>
      Cc: Ashwin Chaugule <ashwinc@codeaurora.org>
      Cc: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      93499918
    • S
      ARM: perf: Preparatory work for Scorpion PMU support · 65bab451
      Stephen Boyd 提交于
      Do some things to make the Krait PMU support code generic enough
      to be used by the Scorpion PMU support code.
      
       * Rename the venum register functions to be venum instead of krait
         specific because the same registers exist on Scorpion
      
       * Add some macros to decode our Krait specific event encoding that's
         the same on Scorpion (modulo an extra region).
      
       * Drop 'krait' from krait_clear_pmresrn_group() so it can be used
         by Scorpion code
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      65bab451
  11. 30 10月, 2014 3 次提交
  12. 02 7月, 2014 3 次提交
  13. 19 6月, 2014 1 次提交
    • R
      ARM: perf: fix compiler warning with gcc 4.6.4 (and tidy code) · 6a78371a
      Russell King 提交于
      GCC 4.6.4 spits out the following warning when building perf_event_v7.c:
      
      arch/arm/kernel/perf_event_v7.c: In function 'krait_pmu_get_event_idx':
      arch/arm/kernel/perf_event_v7.c:1927:6: warning: 'bit' may be used uninitialized in this function
      
      While upgrading the version of gcc may solve this, the code can also be
      organised to be more efficient by not carrying more local variables than
      is necessary across the armv7pmu_get_event_idx function call.  If we set
      'bit' to -1 (which is invalid for clear_bit) we can use that as an
      indication whether we need to clear a bit after this function.
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      6a78371a
  14. 26 5月, 2014 1 次提交
  15. 21 2月, 2014 3 次提交
  16. 04 3月, 2013 1 次提交
  17. 16 1月, 2013 1 次提交
  18. 04 1月, 2013 1 次提交
    • G
      ARM: drivers: remove __dev* attributes. · 351a102d
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Russell King <linux@arm.linux.org.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      351a102d
  19. 09 11月, 2012 3 次提交
  20. 23 8月, 2012 2 次提交
    • W
      ARM: perf: prepare for moving CPU PMU code into separate file · 6dbc0029
      Will Deacon 提交于
      The CPU PMU code is tightly coupled with generic ARM PMU handling code.
      This makes it cumbersome when trying to add support for other ARM PMUs
      (e.g. interconnect, L2 cache controller, bus) as the generic parts of
      the code are not readily reusable.
      
      This patch cleans up perf_event.c so that reusable code is exposed via
      header files to other potential PMU drivers. The CPU code is
      consistently named to identify it as such and also to prepare for moving
      it into a separate file.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      6dbc0029
    • W
      ARM: perf: probe devicetree in preference to current CPU · 04236f9f
      Will Deacon 提交于
      The CPU PMU is probed using the current cpuid information as part of the
      early_initcall initialising the architecture perf backend. For
      architectures without NMI (such as ARM), this does not need to be
      performed early and can be deferred to the driver probe callback. This
      also allows us to probe the devicetree in preference to parsing the
      current cpuid, which may be invalid on a big.LITTLE multi-cluster
      system.
      
      This patch defers the PMU probing and uses the devicetree information
      when available.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      04236f9f
  21. 10 7月, 2012 1 次提交
    • W
      ARM: 7448/1: perf: remove arm_perf_pmu_ids global enumeration · 4295b898
      Will Deacon 提交于
      In order to provide PMU name strings compatible with the OProfile
      user ABI, an enumeration of all PMUs is currently used by perf to
      identify each PMU uniquely. Unfortunately, this does not scale well
      in the presence of multiple PMUs and creates a single, global namespace
      across all PMUs in the system.
      
      This patch removes the enumeration and instead uses the name string
      for the PMU to map onto the OProfile variant. perf_pmu_name is
      implemented for CPU PMUs, which is all that OProfile cares about anyway.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      4295b898
  22. 09 5月, 2012 1 次提交
  23. 24 3月, 2012 1 次提交
  24. 07 3月, 2012 3 次提交
  25. 03 2月, 2012 1 次提交
  26. 02 12月, 2011 1 次提交