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. 23 10月, 2017 1 次提交
  3. 28 9月, 2017 1 次提交
  4. 21 9月, 2017 1 次提交
    • H
      ARM: ep93xx: switch to SPARSEMEM · 80320927
      H Hartley Sweeten 提交于
      The EP93xx has four chip selects that can be used for the SDRAM memory.
      These chip selects are decoded to specify an address domain:
      
        SDCS3  0x00000000-0x0fffffff with Boot Option ASDO=1
        SDCS0  0xc0000000-0xcfffffff
        SDCS1  0xd0000000-0xdfffffff
        SDCS2  0xe0000000-x0efffffff
        SDCS3  0xf0000000-0xffffffff with Boot Option ASDO=0
      
      Because of the row/column/bank architecture of SDRAM, the mapping of
      these memories into the processor's memory space is discontiguous.
      
      Most ep93xx systems only use one of the chip selects. For these systems,
      ARCH_HAS_HOLES_MEMORYMODEL has worked fine to handle the discontiguous
      memory.
      
      But, some of the TS-72xx boards use multiple chip selects. The TS-7300 in
      particular uses SDCS3 (with ASDO=1) and SDCS2. On that system with
      ARCH_HAS_HOLES_MEMORYMODEL the SDCS2 memory does not get handled correctly
      and results in the system not booting.
      
      Change the EP93xx to ARCH_SPARSEMEM_ENABLE. This handles the discontiguous
      memory for all configurations.
      
      This has been tested on the following ep93xx platforms:
      
      EDB9307A with 64 MiB on SDCS0
      Vision EP9307 with 64 MiB on SDCS0
      TS-7300 with 64 MiB on SDCS3 (with ASDO=1) and 64 MiB on SDCS2
      sim.one with 64 MiB on SDCS0
      Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Tested-by: NLinus Walleij <linus.walleij@linaro.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Tested-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Tested-by: NAlexander Sverdlin <alexander.sverdlin@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      80320927
  5. 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
  6. 23 8月, 2017 1 次提交
    • S
      arm: eBPF JIT compiler · 39c13c20
      Shubham Bansal 提交于
      The JIT compiler emits ARM 32 bit instructions. Currently, It supports
      eBPF only. Classic BPF is supported because of the conversion by BPF core.
      
      This patch is essentially changing the current implementation of JIT compiler
      of Berkeley Packet Filter from classic to internal with almost all
      instructions from eBPF ISA supported except the following
      	BPF_ALU64 | BPF_DIV | BPF_K
      	BPF_ALU64 | BPF_DIV | BPF_X
      	BPF_ALU64 | BPF_MOD | BPF_K
      	BPF_ALU64 | BPF_MOD | BPF_X
      	BPF_STX | BPF_XADD | BPF_W
      	BPF_STX | BPF_XADD | BPF_DW
      
      Implementation is using scratch space to emulate 64 bit eBPF ISA on 32 bit
      ARM because of deficiency of general purpose registers on ARM. Currently,
      only LITTLE ENDIAN machines are supported in this eBPF JIT Compiler.
      
      Tested on ARMv7 with QEMU by me (Shubham Bansal).
      
      Testing results on ARMv7:
      
      1) test_bpf: Summary: 341 PASSED, 0 FAILED, [312/333 JIT'ed]
      2) test_tag: OK (40945 tests)
      3) test_progs: Summary: 30 PASSED, 0 FAILED
      4) test_lpm: OK
      5) test_lru_map: OK
      
      Above tests are all done with following flags enabled discreatly.
      
      1) bpf_jit_enable=1
      	a) CONFIG_FRAME_POINTER enabled
      	b) CONFIG_FRAME_POINTER disabled
      2) bpf_jit_enable=1 and bpf_jit_harden=2
      	a) CONFIG_FRAME_POINTER enabled
      	b) CONFIG_FRAME_POINTER disabled
      
      See Documentation/networking/filter.txt for more information.
      Signed-off-by: NShubham Bansal <illusionist.neo@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      39c13c20
  7. 02 8月, 2017 1 次提交
    • R
      ARM: always enable AEABI for ARMv6+ · 49460970
      Russell King 提交于
      Always enable AEABI for ARMv6+, as these use the double-word exclusives
      which must be passed an even register to avoid errors such as:
      
      /tmp/ccG2rCwe.s:905: Error: even register required -- `ldrexd r5,r6,[r7]'
      /tmp/ccG2rCwe.s:909: Error: even register required -- `strexd sl,r3,r4,[r7]'
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      49460970
  8. 28 7月, 2017 1 次提交
  9. 01 7月, 2017 1 次提交
  10. 22 6月, 2017 1 次提交
  11. 21 6月, 2017 1 次提交
  12. 19 6月, 2017 1 次提交
    • A
      ARM: 8678/1: ftrace: Adds support for CONFIG_DYNAMIC_FTRACE_WITH_REGS · 620176f3
      Abel Vesa 提交于
      The DYNAMIC_FTRACE_WITH_REGS configuration makes it possible for a
      ftrace operation to specify if registers need to saved/restored by
      the ftrace handler. This is needed by kgraft and possibly other
      ftrace-based tools, and the ARM architecture is currently lacking
      this feature. It would also be the first step to support the
      "Kprobes-on-ftrace" optimization on ARM.
      
      This patch introduces a new ftrace handler that stores the registers
      on the stack before calling the next stage. The registers are restored
      from the stack before going back to the instrumented function.
      
      A side-effect of this patch is to activate the support for
      ftrace_modify_call() as it defines ARCH_SUPPORTS_FTRACE_OPS for the
      ARM architecture.
      Signed-off-by: NAbel Vesa <abelvesa@linux.com>
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      620176f3
  13. 14 6月, 2017 1 次提交
  14. 13 6月, 2017 1 次提交
  15. 12 6月, 2017 1 次提交
  16. 05 6月, 2017 1 次提交
    • A
      efi/arm: Enable DMI/SMBIOS · bb817bef
      Ard Biesheuvel 提交于
      Wire up the existing arm64 support for SMBIOS tables (aka DMI) for ARM as
      well, by moving the arm64 init code to drivers/firmware/efi/arm-runtime.c
      (which is shared between ARM and arm64), and adding a asm/dmi.h header to
      ARM that defines the mapping routines for the firmware tables.
      
      This allows userspace to access these tables to discover system information
      exposed by the firmware. It also sets the hardware name used in crash
      dumps, e.g.:
      
        Unable to handle kernel NULL pointer dereference at virtual address 00000000
        pgd = ed3c0000
        [00000000] *pgd=bf1f3835
        Internal error: Oops: 817 [#1] SMP THUMB2
        Modules linked in:
        CPU: 0 PID: 759 Comm: bash Not tainted 4.10.0-09601-g0e8f38792120-dirty #112
        Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
        ^^^
      
      NOTE: This does *NOT* enable or encourage the use of DMI quirks, i.e., the
            the practice of identifying the platform via DMI to decide whether
            certain workarounds for buggy hardware and/or firmware need to be
            enabled. This would require the DMI subsystem to be enabled much
            earlier than we do on ARM, which is non-trivial.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/20170602135207.21708-14-ard.biesheuvel@linaro.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      bb817bef
  17. 03 6月, 2017 1 次提交
  18. 27 4月, 2017 2 次提交
  19. 23 4月, 2017 1 次提交
    • I
      Revert "x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation" · 6dd29b3d
      Ingo Molnar 提交于
      This reverts commit 2947ba05.
      
      Dan Williams reported dax-pmem kernel warnings with the following signature:
      
         WARNING: CPU: 8 PID: 245 at lib/percpu-refcount.c:155 percpu_ref_switch_to_atomic_rcu+0x1f5/0x200
         percpu ref (dax_pmem_percpu_release [dax_pmem]) <= 0 (0) after switching to atomic
      
      ... and bisected it to this commit, which suggests possible memory corruption
      caused by the x86 fast-GUP conversion.
      
      He also pointed out:
      
       "
        This is similar to the backtrace when we were not properly handling
        pud faults and was fixed with this commit: 220ced16 "mm: fix
        get_user_pages() vs device-dax pud mappings"
      
        I've found some missing _devmap checks in the generic
        get_user_pages_fast() path, but this does not fix the regression
        [...]
       "
      
      So given that there are known bugs, and a pretty robust looking bisection
      points to this commit suggesting that are unknown bugs in the conversion
      as well, revert it for the time being - we'll re-try in v4.13.
      Reported-by: NDan Williams <dan.j.williams@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Michal Hocko <mhocko@suse.cz>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: aneesh.kumar@linux.vnet.ibm.com
      Cc: dann.frazier@canonical.com
      Cc: dave.hansen@intel.com
      Cc: steve.capper@linaro.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      6dd29b3d
  20. 31 3月, 2017 1 次提交
    • A
      ARM: 8663/1: wire up HWCAP/HWCAP2 feature bits to the CPU modalias · ea2d9a96
      Ard Biesheuvel 提交于
      Wire up the generic support for exposing CPU feature bits via the
      modalias in /sys/device/system/cpu. This allows udev to automatically
      load modules for things like crypto algorithms that are implemented
      using optional instructions.
      
      Since it is non-trivial to transparantly support both HWCAP and HWCAP2
      capabilities in the cpu_feature() macro (which allows a module's hwcap
      dependency and init routine to be declared using a single invocation of
      module_cpu_feature_match()), support only HWCAP2 for now, which covers
      the capabilities that are most likely to be useful in this manner.
      Module dependencies on HWCAP will need to be declared explicitly via a
      MODULE_DEVICE_TABLE(cpu, ...) declaration.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      ea2d9a96
  21. 29 3月, 2017 1 次提交
  22. 24 3月, 2017 1 次提交
  23. 18 3月, 2017 1 次提交
  24. 12 3月, 2017 6 次提交
    • L
      ARM: gemini: convert to ARMv4 multiplatform · 6dbb708a
      Linus Walleij 提交于
      This converts the Gemini platform to ARMv4 multiplatform, deleting
      the local <mach/*> include directory, moving an idiomatic local
      idling function into the .machine_init() call and getting rid of
      the Makefile.boot finally.
      
      Cc: Janos Laube <janos.dev@gmail.com>
      Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>
      Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      6dbb708a
    • L
      ARM: gemini: select ARM_PATCH_PHYS_VIRT and AUTO_ZRELADDR · 8e39061e
      Linus Walleij 提交于
      This platform survives physical to virtual patching
      without any hickups, and can use AUTO_ZRELADDR.
      We still need to keep Makefile.boot but it is now empty.
      
      Cc: Janos Laube <janos.dev@gmail.com>
      Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>
      Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      8e39061e
    • L
      ARM: gemini: switch to sparse IRQs · 46abf938
      Linus Walleij 提交于
      There is no boardfiles or anything else using the fixed IRQs
      anymore, switch the platform to use sparse IRQs and delete
      the <mach/irqs.h> header.
      
      Cc: Janos Laube <janos.dev@gmail.com>
      Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>
      Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      46abf938
    • L
      ARM: gemini: delete all boardfiles · ee149d66
      Linus Walleij 提交于
      Delete the Gemini boardfiles: we have corresponding, fully-featured
      device trees for all these boards. Delete the referenced include
      files. Delete the local config symbols, especially one for
      "swapped memory", as all supported boards have swapped memory, and
      would a new board be supported this is likely not the right way
      to achieve it anyways. Only the Kconfig options in the central
      arch/arm/Kconfig remains.
      
      Cc: Janos Laube <janos.dev@gmail.com>
      Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>
      Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      ee149d66
    • L
      ARM: gemini: DT for the Cortina Gemini SoC platforms · 41d9830c
      Linus Walleij 提交于
      This adds initial and compulsory device tree support to the
      Gemini ARMv4 platform.
      
      We are selecting a bunch of "absolute minimals" for getting a working
      system up with just device tree:
      
      - We select USE_OF for natural reasons or nothing works.
      
      - We select CLKSRC_OF and GEMINI_TIMER so we get timekeeping from
        the clocksource.
      
      - We select GPIO_GEMINI because these are used as irqchips, and
        for a generic driver it is not reasonable for those to have to
        select every possible irqchip in the world to work, the platform
        should simply provide the available irqchips.
      
      - We select a UART that can be exprected to work with
        SERIAL_OF_PLATFORM which is the name for an 8250 OF-probed
        serial port.
      
      - We select the syscon-based reset controller: it's not fun when
        "reboot" doesn't work because of Kconfig, so we just select
        POWER_RESET and POWER_RESET_SYSCON.
      
      - We perhaps a bit controversiallt select ARM_APPENDED_DTB, because
        this platform is using the ancient RedBoot, and can *NOT* be
        expected to upgrade its bootloaders. Appended device tree is
        simply how these devices have to work with device tree.
      
      Cc: Janos Laube <janos.dev@gmail.com>
      Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>
      Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      41d9830c
    • L
      ARM: gemini: convert to MULTI_IRQ_HANDLER · c12ddfe1
      Linus Walleij 提交于
      In order to enable device tree boot on this machine we must first
      convert it to runtime-manage its irq handler, so do this.
      
      Cc: Janos Laube <janos.dev@gmail.com>
      Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>
      Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      c12ddfe1
  25. 28 2月, 2017 1 次提交
  26. 22 2月, 2017 1 次提交
    • D
      arch: add ARCH_HAS_SET_MEMORY config · d2852a22
      Daniel Borkmann 提交于
      Currently, there's no good way to test for the presence of
      set_memory_ro/rw/x/nx() helpers implemented by archs such as
      x86, arm, arm64 and s390.
      
      There's DEBUG_SET_MODULE_RONX and DEBUG_RODATA, however both
      don't really reflect that: set_memory_*() are also available
      even when DEBUG_SET_MODULE_RONX is turned off, and DEBUG_RODATA
      is set by parisc, but doesn't implement above functions. Thus,
      add ARCH_HAS_SET_MEMORY that is selected by mentioned archs,
      where generic code can test against this.
      
      This also allows later on to move DEBUG_SET_MODULE_RONX out of
      the arch specific Kconfig to define it only once depending on
      ARCH_HAS_SET_MEMORY.
      Suggested-by: NLaura Abbott <labbott@redhat.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d2852a22
  27. 08 2月, 2017 1 次提交
  28. 08 12月, 2016 1 次提交
    • K
      ARM: Drop fixed 200 Hz timer requirement from Samsung platforms · da6b21e9
      Krzysztof Kozlowski 提交于
      All Samsung platforms, including the Exynos, are selecting HZ_FIXED with
      200 Hz.  Unfortunately in case of multiplatform image this affects also
      other platforms when Exynos is enabled.
      
      This looks like an very old legacy code, dating back to initial
      upstreaming of S3C24xx.  Probably it was required for s3c24xx timer
      driver, which was removed in commit ad38bdd1 ("ARM: SAMSUNG: Remove
      unused plat-samsung/time.c").
      
      Since then, this fixed 200 Hz spread everywhere, including out-of-tree
      Samsung kernels (SoC vendor's and Tizen's).  I believe this choice
      was rather an effect of coincidence instead of conscious choice.
      
      On S3C24xx, the PWM counter is only 16 bit wide, and with the
      typical 12MHz input clock that overflows every 5.5ms.  This works
      with HZ=200 or higher but not with HZ=100 which needs a 10ms
      interval between ticks.  On Later chips (S3C64xx, S5P and EXYNOS),
      the counter is 32 bits and does not have this problem.
      
      The new samsung_pwm_timer driver solves the problem by scaling the input
      clock by a factor of 50 on S3C24xx, which makes it less accurate but
      allows HZ=100 as well as CONFIG_NO_HZ with fewer wakeups.
      
      Few perf mem and sched tests on Odroid XU3 board (Exynos5422, 4x Cortex
      A7, 4x Cortex A15) show no regressions when switching from 200 Hz to
      other values.
      Reported-by: NLee Jones <lee.jones@linaro.org>
      [Dropping of 200_HZ from S3C/S5P was suggested by Arnd]
      Reported-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Kukjin Kim <kgene@kernel.org>
      Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org>
      [Tested on Exynos5800]
      Tested-by: NJavier Martinez Canillas <javier@osg.samsung.com>
      Acked-by: NKukjin Kim <kgene@kernel.org>
      [Tested on S3C2440]
      Tested-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Acked-by: NLee Jones <lee.jones@linaro.org>
      da6b21e9
  29. 29 11月, 2016 1 次提交
  30. 15 11月, 2016 1 次提交
  31. 08 10月, 2016 1 次提交
    • V
      atomic64: no need for CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE · 51a02124
      Vineet Gupta 提交于
      This came to light when implementing native 64-bit atomics for ARCv2.
      
      The atomic64 self-test code uses CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
      to check whether atomic64_dec_if_positive() is available.  It seems it
      was needed when not every arch defined it.  However as of current code
      the Kconfig option seems needless
      
       - for CONFIG_GENERIC_ATOMIC64 it is auto-enabled in lib/Kconfig and a
         generic definition of API is present lib/atomic64.c
       - arches with native 64-bit atomics select it in arch/*/Kconfig and
         define the API in their headers
      
      So I see no point in keeping the Kconfig option
      
      Compile tested for:
       - blackfin (CONFIG_GENERIC_ATOMIC64)
       - x86 (!CONFIG_GENERIC_ATOMIC64)
       - ia64
      
      Link: http://lkml.kernel.org/r/1473703083-8625-3-git-send-email-vgupta@synopsys.comSigned-off-by: NVineet Gupta <vgupta@synopsys.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Ming Lin <ming.l@ssi.samsung.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      51a02124
  32. 24 9月, 2016 1 次提交
  33. 22 9月, 2016 1 次提交
  34. 21 9月, 2016 1 次提交