1. 26 1月, 2019 2 次提交
  2. 21 12月, 2018 1 次提交
    • M
      xtensa: implement jump_label support · 64711f9a
      Max Filippov 提交于
      Use 3-byte 'nop' and 'j' instructions that are always present. Don't let
      assembler mark a spot right after patchable 'j' instruction as
      unreachable and later put literals or padding bytes there. Add separate
      implementations of patch_text for SMP and UP cases, avoiding use of
      atomics on UP.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      64711f9a
  3. 18 12月, 2018 2 次提交
    • M
      xtensa: implement syscall tracepoints · af5395c2
      Max Filippov 提交于
      Add TIF_SYSCALL_TRACEPOINT flag definition; add _TIF_SYSCALL_TRACEPOINT
      to _TIF_WORK_MASK. Call trace_sys_enter from do_syscall_trace_enter and
      trace_sys_exit from do_syscall_trace_leave when TIF_SYSCALL_TRACEPOINT
      flag is set.
      Add declaration of sys_call_table to arch/xtensa/include/asm/syscall.h
      Add definition of NR_syscalls to arch/xtensa/include/asm/unistd.h
      Select HAVE_SYSCALL_TRACEPOINTS.
      
      This change allows tracing each syscall entry and exit through the
      ftrace mechanism.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      af5395c2
    • M
      xtensa: implement tracehook functions and enable HAVE_ARCH_TRACEHOOK · 9f24f3c1
      Max Filippov 提交于
      Implement syscall_get_nr, syscall_rollback, syscall_get_error,
      syscall_{get,set}_return_value and syscall_{get,set}_arguments.
      Select HAVE_ARCH_TRACEHOOK as Xtensa now has all support for that.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      9f24f3c1
  4. 14 12月, 2018 1 次提交
  5. 06 12月, 2018 1 次提交
  6. 02 12月, 2018 1 次提交
  7. 23 11月, 2018 2 次提交
  8. 31 10月, 2018 2 次提交
  9. 16 10月, 2018 1 次提交
  10. 20 9月, 2018 1 次提交
  11. 12 9月, 2018 1 次提交
  12. 21 8月, 2018 5 次提交
  13. 14 8月, 2018 1 次提交
  14. 02 8月, 2018 3 次提交
  15. 12 7月, 2018 1 次提交
  16. 15 6月, 2018 1 次提交
  17. 08 5月, 2018 1 次提交
  18. 18 12月, 2017 1 次提交
  19. 17 12月, 2017 2 次提交
    • M
      xtensa: add support for KASAN · c633544a
      Max Filippov 提交于
      Cover kernel addresses above 0x90000000 by the shadow map. Enable
      HAVE_ARCH_KASAN when MMU is enabled. Provide kasan_early_init that fills
      shadow map with writable copies of kasan_zero_page. Call
      kasan_early_init right after mmu initialization in the setup_arch.
      Provide kasan_init that allocates proper shadow map pages from the
      memblock and puts these pages into the shadow map for addresses from
      VMALLOC area to the end of KSEG. Call kasan_init right after memblock
      initialization. Don't use KASAN for the boot code, MMU and KASAN
      initialization and page fault handler. Make kernel stack size 4 times
      larger when KASAN is enabled to avoid stack overflows.
      GCC 7.3, 8 or newer is required to build the xtensa kernel with KASAN.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      c633544a
    • M
      xtensa: enable stack protector · 40d1a07b
      Max Filippov 提交于
      The implementation is adopted from the ARM arch. GCC 7.3, 8 or newer is
      required for building the xtensa kernel with SSP.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      40d1a07b
  20. 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
  21. 12 10月, 2017 1 次提交
  22. 01 7月, 2017 1 次提交
    • V
      drivers: dma-mapping: allow dma_common_mmap() for NOMMU · 07c75d7a
      Vladimir Murzin 提交于
      Currently, internals of dma_common_mmap() is compiled out if build is
      done for either NOMMU or target which explicitly says it does not
      have/want coherent DMA mmap. It turned out that dma_common_mmap() can
      be handy in NOMMU setup (at least for ARM).
      
      This patch converts exitent NOMMU targets to use ARCH_NO_COHERENT_DMA_MMAP,
      thus when CONFIG_MMU is gone from dma_common_mmap() their behaviour stays
      unchanged.
      
      ARM is not converted to ARCH_NO_COHERENT_DMA_MMAP because it 1)
      already has mmap callback which can handle (at some extent) NOMMU 2)
      already defines dummy pgprot_noncached() for NOMMU build.
      
      c6x and frv stay untouched since they already have ARCH_NO_COHERENT_DMA_MMAP.
      
      Cc: Steven Miao <realmz6@gmail.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Suggested-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NVladimir Murzin <vladimir.murzin@arm.com>
      Tested-by: NBenjamin Gaignard <benjamin.gaignard@linaro.org>
      07c75d7a
  23. 27 4月, 2017 1 次提交
  24. 29 3月, 2017 1 次提交
  25. 16 12月, 2016 1 次提交
    • M
      xtensa: enable HAVE_DMA_CONTIGUOUS · 9d2ffe5c
      Max Filippov 提交于
      Enable HAVE_DMA_CONTIGUOUS, reserve contiguous memory at bootmem_init,
      use dma_alloc_from_contiguous and dma_release_from_contiguous in
      xtensa_dma_alloc/free.
      This allows for big contiguous DMA buffer allocation from designated
      area configured in the device tree.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      9d2ffe5c
  26. 30 9月, 2016 1 次提交
    • M
      xtensa: disable MMU initialization option on MMUv2 cores · a4c6be5a
      Max Filippov 提交于
      MMU initialization option is currently ignored on MMUv2 cores, but it is
      used in Kconfig to select kernel load and start addresses. This choice
      is not available for MMUv2 cores as they have hardwired TLB entries.
      Disable MMU initialization option for known MMUv2 cores so that they get
      correct kernel load/start address by default.
      This fixes the default allmodconfig build.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      a4c6be5a
  27. 10 9月, 2016 1 次提交
    • M
      xtensa: fix default kernel load address · 73a3eed0
      Max Filippov 提交于
      Make default kernel load address 0xd0003000 for MMUv2 cores and
      0x60003000 for noMMU cores. Don't initialize MMU inside vmlinux for
      predefined MMUv2 cores (it's noop anyway).
      
      This fixes the following defconfig build error:
        arch/xtensa/kernel/built-in.o: In function `fast_alloca':
        (.text+0x99a): dangerous relocation: j: cannot encode: _WindowUnderflow12
        arch/xtensa/kernel/built-in.o: In function `fast_alloca':
        (.text+0x99d): dangerous relocation: j: cannot encode: _WindowUnderflow8
        arch/xtensa/kernel/built-in.o: In function `fast_alloca':
        (.text+0x9a0): dangerous relocation: j: cannot encode: _WindowUnderflow4
        arch/xtensa/kernel/built-in.o: In function `window_overflow_restore_a0_fixup':
        (.text+0x23a3): dangerous relocation: j: cannot encode: (.DoubleExceptionVector.text+0x104)
        arch/xtensa/kernel/built-in.o: In function `window_overflow_restore_a0_fixup':
        (.text+0x23c1): dangerous relocation: j: cannot encode: (.DoubleExceptionVector.text+0x104)
        arch/xtensa/kernel/built-in.o: In function `window_overflow_restore_a0_fixup':
        (.text+0x23dd): dangerous relocation: j: cannot encode: (.DoubleExceptionVector.text+0x104)
      
      With this change all xtensa defconfigs build correctly.
      Reported-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      73a3eed0
  28. 24 7月, 2016 2 次提交