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. 11 9月, 2017 1 次提交
    • N
      ARM: XIP kernel: store .data compressed in ROM · ca8b5d97
      Nicolas Pitre 提交于
      The .data segment stored in ROM is only copied to RAM once at boot time
      and never referenced afterwards. This is arguably a suboptimal usage of
      ROM resources.
      
      This patch allows for compressing the .data segment before storing it
      into ROM and decompressing it to RAM rather than simply copying it,
      saving on precious ROM space.
      
      Because global data is not available yet (obviously) we must allocate
      decompressor workspace memory on the stack. The .bss area is used as a
      stack area for that purpose before it is cleared. The required stack
      frame is 9568 bytes for __inflate_kernel_data() alone, so make sure
      the .bss is large enough to cope with that plus extra room for called
      functions or fail the build.
      
      Those numbers were picked arbitrarily based on the above 9568 byte
      stack frame:
      
      10240 (2.5 * PAGE_SIZE): used to override -Wframe-larger-than whose
      default value is 1024.
      12288 (3 * PAGE_SIZE): minimum .bss size to contain the stack.
      Signed-off-by: NNicolas Pitre <nico@linaro.org>
      Reviewed-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Tested-by: NChris Brandt <Chris.Brandt@renesas.com>
      ca8b5d97
  3. 23 11月, 2016 1 次提交
    • R
      Revert "arm: move exports to definitions" · 8478132a
      Russell King 提交于
      This reverts commit 4dd1837d.
      
      Moving the exports for assembly code into the assembly files breaks
      KSYM trimming, but also breaks modversions.
      
      While fixing the KSYM trimming is trivial, fixing modversions brings
      us to a technically worse position that we had prior to the above
      change:
      
      - We end up with the prototype definitions divorsed from everything
        else, which means that adding or removing assembly level ksyms
        become more fragile:
        * if adding a new assembly ksyms export, a missed prototype in
          asm-prototypes.h results in a successful build if no module in
          the selected configuration makes use of the symbol.
        * when removing a ksyms export, asm-prototypes.h will get forgotten,
          with armksyms.c, you'll get a build error if you forget to touch
          the file.
      
      - We end up with the same amount of include files and prototypes,
        they're just in a header file instead of a .c file with their
        exports.
      
      As for lines of code, we don't get much of a size reduction:
       (original commit)
       47 files changed, 131 insertions(+), 208 deletions(-)
       (fix for ksyms trimming)
       7 files changed, 18 insertions(+), 5 deletions(-)
       (two fixes for modversions)
       1 file changed, 34 insertions(+)
       3 files changed, 7 insertions(+), 2 deletions(-)
      which results in a net total of only 25 lines deleted.
      
      As there does not seem to be much benefit from this change of approach,
      revert the change.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      8478132a
  4. 08 8月, 2016 1 次提交
  5. 22 2月, 2016 2 次提交
  6. 05 1月, 2016 2 次提交
  7. 04 1月, 2016 1 次提交
  8. 21 12月, 2015 1 次提交
  9. 14 12月, 2015 1 次提交
  10. 03 8月, 2015 1 次提交
    • M
      ARM: migrate to common PSCI client code · be120397
      Mark Rutland 提交于
      Now that the common PSCI client code has been factored out to
      drivers/firmware, and made safe for 32-bit use, move the 32-bit ARM code
      over to it. This results in a moderate reduction of duplicated lines,
      and will prevent further duplication as the PSCI client code is updated
      for PSCI 1.0 and beyond.
      
      The two legacy platform users of the PSCI invocation code are updated to
      account for interface changes. In both cases the power state parameter
      (which is constant) is now generated using macros, so that the
      pack/unpack logic can be killed in preparation for PSCI 1.0 power state
      changes.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Acked-by: NRob Herring <robh@kernel.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Ashwin Chaugule <ashwin.chaugule@linaro.org>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      be120397
  11. 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
  12. 29 5月, 2015 1 次提交
  13. 28 5月, 2015 3 次提交
    • 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
    • M
      arm: perf: factor out armv6 pmu driver · 1fe115b3
      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 ARMv6-specific portions out into the ARMv6
      driver. For the moment this is always built if perf event support is
      enabled, but the preprocessor guards will leave behind an empty file.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      1fe115b3
    • M
      arm: perf: factor out xscale pmu driver · a12c72cc
      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 xscale-specific portions out into the xscale
      driver. For the moment this is always built if perf event support is
      enabled, but the preprocessor guards will leave behind an empty file.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      a12c72cc
  14. 08 5月, 2015 1 次提交
    • A
      ARM: 8220/1: allow modules outside of bl range · 7d485f64
      Ard Biesheuvel 提交于
      Loading modules far away from the kernel in memory is problematic
      because the 'bl' instruction only has limited reach, and modules are not
      built with PLTs. Instead of using the -mlong-calls option (which affects
      all compiler emitted bl instructions, but not the ones in assembler),
      this patch allocates some additional space at module load time, and
      populates it with PLT like veneers when encountering relocations that
      are out of range.
      
      This should work with all relocations against symbols exported by the
      kernel, including those resulting from GCC generated implicit function
      calls for ftrace etc.
      
      The module memory size increases by about 5% on average, regardless of
      whether any PLT entries were actually needed. However, due to the page
      based rounding that occurs when allocating module memory, the average
      memory footprint increase is negligible.
      Reviewed-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      7d485f64
  15. 13 4月, 2015 1 次提交
  16. 02 4月, 2015 1 次提交
  17. 30 3月, 2015 1 次提交
  18. 28 3月, 2015 1 次提交
  19. 14 1月, 2015 1 次提交
    • W
      ARM: kprobes: enable OPTPROBES for ARM 32 · 0dc016db
      Wang Nan 提交于
      This patch introduce kprobeopt for ARM 32.
      
      Limitations:
       - Currently only kernel compiled with ARM ISA is supported.
      
       - Offset between probe point and optinsn slot must not larger than
         32MiB. Masami Hiramatsu suggests replacing 2 words, it will make
         things complex. Futher patch can make such optimization.
      
      Kprobe opt on ARM is relatively simpler than kprobe opt on x86 because
      ARM instruction is always 4 bytes aligned and 4 bytes long. This patch
      replace probed instruction by a 'b', branch to trampoline code and then
      calls optimized_callback(). optimized_callback() calls opt_pre_handler()
      to execute kprobe handler. It also emulate/simulate replaced instruction.
      
      When unregistering kprobe, the deferred manner of unoptimizer may leave
      branch instruction before optimizer is called. Different from x86_64,
      which only copy the probed insn after optprobe_template_end and
      reexecute them, this patch call singlestep to emulate/simulate the insn
      directly. Futher patch can optimize this behavior.
      Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Acked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Reviewed-by: NJon Medhurst (Tixy) <tixy@linaro.org>
      Signed-off-by: NJon Medhurst <tixy@linaro.org>
      0dc016db
  20. 09 1月, 2015 1 次提交
    • W
      ARM: probes: move all probe code to dedicate directory · fca08f32
      Wang Nan 提交于
      In discussion on LKML (https://lkml.org/lkml/2014/11/28/158), Russell
      King suggests to move all probe related code to arch/arm/probes. This
      patch does the work. Due to dependency on 'arch/arm/kernel/patch.h', this
      patch also moves patch.h to 'arch/arm/include/asm/patch.h', and related
      '#include' directives are also midified to '#include <asm/patch.h>'.
      
      Following is an overview of this patch:
      
       ./arch/arm/kernel/               ./arch/arm/probes/
       |-- Makefile                     |-- Makefile
       |-- probes-arm.c          ==>    |-- decode-arm.c
       |-- probes-arm.h          ==>    |-- decode-arm.h
       |-- probes-thumb.c        ==>    |-- decode-thumb.c
       |-- probes-thumb.h        ==>    |-- decode-thumb.h
       |-- probes.c              ==>    |-- decode.c
       |-- probes.h              ==>    |-- decode.h
       |                                |-- kprobes
       |                                |   |-- Makefile
       |-- kprobes-arm.c         ==>    |   |-- actions-arm.c
       |-- kprobes-common.c      ==>    |   |-- actions-common.c
       |-- kprobes-thumb.c       ==>    |   |-- actions-thumb.c
       |-- kprobes.c             ==>    |   |-- core.c
       |-- kprobes.h             ==>    |   |-- core.h
       |-- kprobes-test-arm.c    ==>    |   |-- test-arm.c
       |-- kprobes-test.c        ==>    |   |-- test-core.c
       |-- kprobes-test.h        ==>    |   |-- test-core.h
       |-- kprobes-test-thumb.c  ==>    |   `-- test-thumb.c
       |                                `-- uprobes
       |                                    |-- Makefile
       |-- uprobes-arm.c         ==>        |-- actions-arm.c
       |-- uprobes.c             ==>        |-- core.c
       |-- uprobes.h             ==>        `-- core.h
       |
       `-- patch.h               ==>    arch/arm/include/asm/patch.h
      Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Acked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Signed-off-by: NJon Medhurst <tixy@linaro.org>
      fca08f32
  21. 04 12月, 2014 1 次提交
  22. 21 11月, 2014 1 次提交
  23. 08 11月, 2014 1 次提交
  24. 30 10月, 2014 1 次提交
    • M
      arm: perf: factor out callchain code · d39976f0
      Mark Rutland 提交于
      The ARM callchain handling code is currently bundled with the ARM PMU
      management code, despite the two having no dependency on each other.
      This bundling has the unfortunate property of making callchain handling
      depend on CONFIG_HW_PERF_EVENTS, even though the callchain handling
      could be applied to software events in the absence of PMU hardware
      support.
      
      This patch separates the two, placing the callchain handling in
      perf_callchain.c and making it depend on CONFIG_PERF_EVENTS rather than
      CONFIG_HW_PERF_EVENTS, enabling callchain recording on kernels built
      without hardware perf event support.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Reviewed-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      d39976f0
  25. 17 10月, 2014 1 次提交
  26. 25 4月, 2014 1 次提交
  27. 23 4月, 2014 1 次提交
    • S
      ARM: 8011/1: ARM hibernation / suspend-to-disk · 603fb42a
      Sebastian Capella 提交于
      Enable hibernation for ARM architectures and provide ARM
      architecture specific calls used during hibernation.
      
      The swsusp hibernation framework depends on the
      platform first having functional suspend/resume.
      
      Then, in order to enable hibernation on a given platform, a
      platform_hibernation_ops structure may need to be registered with
      the system in order to save/restore any SoC-specific / cpu specific
      state needing (re)init over a suspend-to-disk/resume-from-disk cycle.
      
      For example:
      
           - "secure" SoCs that have different sets of control registers
             and/or different CR reg access patterns.
      
           - SoCs with L2 caches as the activation sequence there is
             SoC-dependent; a full off-on cycle for L2 is not done
             by the hibernation support code.
      
           - SoCs requiring steps on wakeup _before_ the "generic" parts
             done by cpu_suspend / cpu_resume can work correctly.
      
           - SoCs having persistent state which is maintained during suspend
             and resume, but will be lost during the power off cycle after
             suspend-to-disk.
      
      This is a rebase/rework of Frank Hofmann's v5 hibernation patchset.
      Acked-by: NRuss Dill <Russ.Dill@ti.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Signed-off-by: NSebastian Capella <sebastian.capella@linaro.org>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Reviewed-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      [fixed duplicate virt_to_pfn() definition --rmk]
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      603fb42a
  28. 19 3月, 2014 3 次提交
  29. 20 10月, 2013 1 次提交
  30. 30 9月, 2013 1 次提交
  31. 02 9月, 2013 1 次提交
  32. 13 6月, 2013 1 次提交
  33. 08 6月, 2013 1 次提交
  34. 21 5月, 2013 1 次提交
    • S
      arm: introduce psci_smp_ops · 05774088
      Stefano Stabellini 提交于
      Rename virt_smp_ops to psci_smp_ops and move them to arch/arm/kernel/psci_smp.c.
      Remove mach-virt/platsmp.c, now unused.
      Compile psci_smp if CONFIG_ARM_PSCI and CONFIG_SMP.
      
      Add a cpu_die smp_op based on psci_ops.cpu_off.
      
      Initialize PSCI before setting smp_ops in setup_arch.
      
      If PSCI is available on the platform, prefer psci_smp_ops over the
      platform smp_ops.
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      CC: arnd@arndb.de
      CC: marc.zyngier@arm.com
      CC: linux@arm.linux.org.uk
      CC: nico@linaro.org
      CC: rob.herring@calxeda.com
      05774088