1. 13 2月, 2019 1 次提交
    • M
      xtensa: xtfpga.dtsi: fix dtc warnings about SPI · 64257468
      Max Filippov 提交于
      [ Upstream commit f37598be4e3896359e87c824be57ddddc280cc3f ]
      
      Rename SPI controller node in the XTFPGA DTS to spi@...
      This fixes the following build warnings:
      
      arch/xtensa/boot/dts/kc705_nommu.dtb: Warning (spi_bus_bridge):
       /soc/spi-master@0d0a0000: node name for SPI buses should be 'spi'
      arch/xtensa/boot/dts/kc705_nommu.dtb: Warning (spi_bus_reg):
       Failed prerequisite 'spi_bus_bridge'
      arch/xtensa/boot/dts/lx200mx.dtb: Warning (spi_bus_bridge):
       /soc/spi-master@0d0a0000: node name for SPI buses should be 'spi'
      arch/xtensa/boot/dts/lx200mx.dtb: Warning (spi_bus_reg):
       Failed prerequisite 'spi_bus_bridge'
      arch/xtensa/boot/dts/kc705.dtb: Warning (spi_bus_bridge):
       /soc/spi-master@0d0a0000: node name for SPI buses should be 'spi'
      arch/xtensa/boot/dts/kc705.dtb: Warning (spi_bus_reg):
       Failed prerequisite 'spi_bus_bridge'
      arch/xtensa/boot/dts/ml605.dtb: Warning (spi_bus_bridge):
       /soc/spi-master@0d0a0000: node name for SPI buses should be 'spi'
      arch/xtensa/boot/dts/ml605.dtb: Warning (spi_bus_reg):
       Failed prerequisite 'spi_bus_bridge'
      arch/xtensa/boot/dts/lx60.dtb: Warning (spi_bus_bridge):
       /soc/spi-master@0d0a0000: node name for SPI buses should be 'spi'
      arch/xtensa/boot/dts/lx60.dtb: Warning (spi_bus_reg):
       Failed prerequisite 'spi_bus_bridge'
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      64257468
  2. 21 11月, 2018 1 次提交
  3. 24 8月, 2018 1 次提交
  4. 21 8月, 2018 2 次提交
  5. 09 8月, 2018 1 次提交
  6. 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
  7. 11 12月, 2017 1 次提交
    • M
      xtensa: build kernel with text-section-literals · f8f02ca7
      Max Filippov 提交于
      vmlinux.lds.S doesn't do anything special with literals, so instead of
      keeping them separate put them into the corresponding text sections.
      Drop explicit .literal sections from the vmlinux.lds.S, use standard
      section macros. Mark literal pool locations in the assembly sources.
      Unfortunately assembler doesn't put literals into .init sections and
      external libgcc may still have .literal sections, so sed transformation
      to the linker script is still needed.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      f8f02ca7
  8. 10 11月, 2017 1 次提交
    • M
      kbuild: handle dtb-y and CONFIG_OF_ALL_DTBS natively in Makefile.lib · 7e7962dd
      Masahiro Yamada 提交于
      If CONFIG_OF_ALL_DTBS is enabled, "make ARCH=arm64 dtbs" compiles each
      DTB twice; one from arch/arm64/boot/dts/*/Makefile and the other from
      the dtb-$(CONFIG_OF_ALL_DTBS) line in arch/arm64/boot/dts/Makefile.
      It could be a race problem when building DTBS in parallel.
      
      Another minor issue is CONFIG_OF_ALL_DTBS covers only *.dts in vendor
      sub-directories, so this broke when Broadcom added one more hierarchy
      in arch/arm64/boot/dts/broadcom/<soc>/.
      
      One idea to fix the issues in a clean way is to move DTB handling
      to Kbuild core scripts.  Makefile.dtbinst already recognizes dtb-y
      natively, so it should not hurt to do so.
      
      Add $(dtb-y) to extra-y, and $(dtb-) as well if CONFIG_OF_ALL_DTBS is
      enabled.  All clutter things in Makefiles go away.
      
      As a bonus clean-up, I also removed dts-dirs.  Just use subdir-y
      directly to traverse sub-directories.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      [robh: corrected BUILTIN_DTB to CONFIG_BUILTIN_DTB]
      Signed-off-by: NRob Herring <robh@kernel.org>
      7e7962dd
  9. 09 11月, 2017 2 次提交
  10. 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
  11. 02 3月, 2017 1 次提交
    • M
      xtensa: clean up bootable image build targets · 9a736fcb
      Max Filippov 提交于
      Currently xtensa uses 'zImage' as a synonym of 'all', but in fact xtensa
      supports three targets: 'Image' (ELF image with reset vector), 'zImage'
      (compressed redboot image) and 'uImage' (U-Boot image).
      Provide separate 'Image', 'zImage' and 'uImage' make targets that only
      build corresponding image type. Make 'all' build all images appropriate
      for a platform.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      9a736fcb
  12. 16 12月, 2016 1 次提交
  13. 21 9月, 2016 2 次提交
    • M
      xtensa: rearrange CCOUNT calibration · 205ad548
      Max Filippov 提交于
      DT-enabled kernel should have a CPU node connected to a clock. This clock
      is the CCOUNT clock. Use old platform_calibrate_ccount call as a fallback
      when CPU node cannot be found or has no clock and in non-DT-enabled
      configurations.
      
      Drop no longer needed code that updates CPU clock-frequency property in
      the DT; drop DT-related code from the platform_calibrate_ccount too.
      
      Move of_clk_init to the top of time_init, so that clocks are initialized
      before CCOUNT calibration is attempted.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      205ad548
    • M
      xtensa: xtfpga: use clock provider, don't update DT · 58c3e3ac
      Max Filippov 提交于
      Instead of querying hardcoded FPGA frequency register and then updating
      clock-frequency property in specificly named DT nodes in machine setup
      code register a clock provider that returns fixed-rate clock, configured
      by register specified in DT. This way we have less magic/hardcoded names
      and use more existing common clock framework code.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      58c3e3ac
  14. 20 9月, 2016 1 次提交
  15. 10 9月, 2016 1 次提交
  16. 24 7月, 2016 1 次提交
    • M
      xtensa: cleanup MMU setup and kernel layout macros · a9f2fc62
      Max Filippov 提交于
      Make kernel load address explicit, independent of the selected MMU
      configuration and configurable from Kconfig. Do not restrict it to the
      first 512MB of the physical address space.
      
      Cleanup kernel memory layout macros:
      
      - rename VECBASE_RESET_VADDR to VECBASE_VADDR, XC_VADDR to VECTOR_VADDR;
      - drop VIRTUAL_MEMORY_ADDRESS and LOAD_MEMORY_ADDRESS;
      - introduce PHYS_OFFSET and use it in __va and __pa definitions;
      - synchronize MMU/noMMU vectors, drop unused NMI vector;
      - replace hardcoded vectors offset of 0x3000 with Kconfig symbol.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      a9f2fc62
  17. 11 3月, 2016 4 次提交
  18. 03 11月, 2015 1 次提交
    • M
      xtensa: drop unused sections and remapped reset handlers · 0d848afe
      Max Filippov 提交于
      There are no .bootstrap or .ResetVector.text sections linked to the
      vmlinux image, drop these sections from vmlinux.ld.S. Drop
      RESET_VECTOR_VADDR definition only used for .ResetVector.text.
      
      Drop remapped copies of primary and secondary reset vectors, as modern
      gdb don't have problems stepping through instructions at arbitrary
      locations. Drop corresponding sections from the corresponding linker
      scripts.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      0d848afe
  19. 02 11月, 2015 1 次提交
  20. 28 10月, 2015 1 次提交
    • R
      xtensa: enable building of all dtbs · 99085704
      Rob Herring 提交于
      Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
      are not really dependent on a platform being enabled or any other kernel
      config, so for testing coverage it is convenient to build all of the dtbs.
      This builds all dts files in the tree, not just targets listed.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: linux-xtensa@linux-xtensa.org
      99085704
  21. 07 2月, 2015 1 次提交
  22. 21 10月, 2014 3 次提交
  23. 14 8月, 2014 1 次提交
  24. 07 4月, 2014 2 次提交
  25. 22 2月, 2014 2 次提交
  26. 15 1月, 2014 2 次提交
  27. 07 9月, 2013 1 次提交
  28. 08 7月, 2013 1 次提交