1. 27 2月, 2018 1 次提交
  2. 23 2月, 2018 1 次提交
    • F
      PCI: Add ACS quirk for Ampere root ports · 4ef76ad0
      Feng Kan 提交于
      The Ampere Computing PCIe root port does not support ACS at this point.
      However, the hardware provides isolation and source validation through the
      SMMU. The stream ID generated by the PCIe ports contain both the
      bus/device/function number as well as the port ID in its 3 most significant
      bits. Turn on ACS but disable all the peer-to-peer features.
      
      APM is being rebranded to Ampere.  The Vendor and Device IDs change, but
      the functionality stays the same.
      Signed-off-by: NFeng Kan <fkan@apm.com>
      Signed-off-by: NBjorn Helgaas <helgaas@kernel.org>
      4ef76ad0
  3. 19 1月, 2018 1 次提交
  4. 17 1月, 2018 2 次提交
  5. 13 1月, 2018 1 次提交
  6. 19 12月, 2017 2 次提交
  7. 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
  8. 21 10月, 2017 1 次提交
  9. 20 10月, 2017 1 次提交
  10. 19 10月, 2017 1 次提交
  11. 12 10月, 2017 1 次提交
  12. 14 9月, 2017 1 次提交
  13. 02 9月, 2017 1 次提交
  14. 31 8月, 2017 1 次提交
  15. 15 8月, 2017 3 次提交
  16. 11 8月, 2017 1 次提交
  17. 04 8月, 2017 1 次提交
    • L
      treewide: Consolidate Apple DMI checks · 630b3aff
      Lukas Wunner 提交于
      We're about to amend ACPI bus scan with DMI checks whether we're running
      on a Mac to support Apple device properties in AML.  The DMI checks are
      performed for every single device, adding overhead for everything x86
      that isn't Apple, which is the majority.  Rafael and Andy therefore
      request to perform the DMI match only once and cache the result.
      
      Outside of ACPI various other Apple DMI checks exist and it seems
      reasonable to use the cached value there as well.  Rafael, Andy and
      Darren suggest performing the DMI check in arch code and making it
      available with a header in include/linux/platform_data/x86/.
      
      To this end, add early_platform_quirks() to arch/x86/kernel/quirks.c
      to perform the DMI check and invoke it from setup_arch().  Switch over
      all existing Apple DMI checks, thereby fixing two deficiencies:
      
      * They are now #defined to false on non-x86 arches and can thus be
        optimized away if they're located in cross-arch code.
      
      * Some of them only match "Apple Inc." but not "Apple Computer, Inc.",
        which is used by BIOSes released between January 2006 (when the first
        x86 Macs started shipping) and January 2007 (when the company name
        changed upon introduction of the iPhone).
      Suggested-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Suggested-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Suggested-by: NDarren Hart <dvhart@infradead.org>
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      630b3aff
  18. 01 8月, 2017 2 次提交
  19. 01 7月, 2017 1 次提交
  20. 14 6月, 2017 1 次提交
  21. 13 6月, 2017 1 次提交
  22. 25 4月, 2017 1 次提交
  23. 20 4月, 2017 2 次提交
  24. 18 4月, 2017 1 次提交
    • J
      PCI: Avoid generating invalid ThunderX2 DMA aliases · 45a23293
      Jayachandran C 提交于
      On Cavium ThunderX2 arm64 SoCs (formerly known as Broadcom Vulcan), the PCI
      topology is slightly unusual.  For a multi-node system, it looks like:
      
          00:00.0 PCI bridge to [bus 01-1e]
          01:0a.0 PCI-to-PCIe bridge to [bus 02-04]
          02:00.0 PCIe Root Port bridge to [bus 03-04] (XLATE_ROOT)
          03:00.0 PCIe Endpoint
      
      pci_for_each_dma_alias() assumes IOMMU translation is done at the root of
      the PCI hierarchy.  It generates 03:00.0, 01:0a.0, and 00:00.0 as DMA
      aliases for 03:00.0 because buses 01 and 00 are non-PCIe buses that don't
      carry the Requester ID.
      
      Because the ThunderX2 IOMMU is at 02:00.0, the Requester IDs 01:0a.0 and
      00:00.0 are never valid for the endpoint.  This quirk stops alias
      generation at the XLATE_ROOT bridge so we won't generate 01:0a.0 or
      00:00.0.
      
      The current IOMMU code only maps the last alias (this is a separate bug in
      itself).  Prior to this quirk, we only created IOMMU mappings for the
      invalid Requester ID 00:00:0, which never matched any DMA transactions.
      
      With this quirk, we create IOMMU mappings for a valid Requester ID, which
      fixes devices with no aliases but leaves devices with aliases still broken.
      
      The last alias for the endpoint is also used by the ARM GICv3 MSI-X code.
      Without this quirk, the GIC Interrupt Translation Tables are setup with the
      invalid Requester ID, and the MSI-X generated by the device fails to be
      translated and routed.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=195447Signed-off-by: NJayachandran C <jnair@caviumnetworks.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NRobin Murphy <robin.murphy@arm.com>
      Acked-by: NDavid Daney <david.daney@cavium.com>
      45a23293
  25. 13 4月, 2017 1 次提交
  26. 04 4月, 2017 1 次提交
  27. 31 3月, 2017 1 次提交
  28. 08 3月, 2017 1 次提交
    • E
      PCI: Prevent VPD access for QLogic ISP2722 · 0d5370d1
      Ethan Zhao 提交于
      QLogic ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter has the VPD
      access issue too, while read the common pci-sysfs access interface shown as
      
       /sys/devices/pci0000:00/0000:00:03.2/0000:0b:00.0/vpd
      
      with simple 'cat' could cause system hang and panic:
      
        Kernel panic - not syncing: An NMI occurred. Depending on your system the reason for the NMI is logged in any one of the following resources:
        1. Integrated Management Log (IML)
        2. OA Syslog
        3. OA Forward Progress Log
        4. iLO Event Log
        CPU: 0 PID: 15070 Comm: udevadm Not tainted 4.1.12
        Hardware name: HP ProLiant DL380 Gen9/ProLiant DL380 Gen9, BIOS P89 12/27/2015
         0000000000000086 000000007f0cdf51 ffff880c4fa05d58 ffffffff817193de
         ffffffffa00b42d8 0000000000000075 ffff880c4fa05dd8 ffffffff81714072
         0000000000000008 ffff880c4fa05de8 ffff880c4fa05d88 000000007f0cdf51
        Call Trace:
         <NMI>  [<ffffffff817193de>] dump_stack+0x63/0x81
         [<ffffffff81714072>] panic+0xd0/0x20e
         [<ffffffffa00b390d>] hpwdt_pretimeout+0xdd/0xe0 [hpwdt]
         [<ffffffff81021fc9>] ? sched_clock+0x9/0x10
         [<ffffffff8101c101>] nmi_handle+0x91/0x170
         [<ffffffff8101c10c>] ? nmi_handle+0x9c/0x170
         [<ffffffff8101c5fe>] io_check_error+0x1e/0xa0
         [<ffffffff8101c719>] default_do_nmi+0x99/0x140
         [<ffffffff8101c8b4>] do_nmi+0xf4/0x170
         [<ffffffff817232c5>] end_repeat_nmi+0x1a/0x1e
         [<ffffffff815d724b>] ? pci_conf1_read+0xeb/0x120
         [<ffffffff815d724b>] ? pci_conf1_read+0xeb/0x120
         [<ffffffff815d724b>] ? pci_conf1_read+0xeb/0x120
         <<EOE>>  [<ffffffff815db4b3>] raw_pci_read+0x23/0x40
         [<ffffffff815db4fc>] pci_read+0x2c/0x30
         [<ffffffff8136f612>] pci_user_read_config_word+0x72/0x110
         [<ffffffff8136f746>] pci_vpd_pci22_wait+0x96/0x130
         [<ffffffff8136ff9b>] pci_vpd_pci22_read+0xdb/0x1a0
         [<ffffffff8136ea30>] pci_read_vpd+0x20/0x30
         [<ffffffff8137d590>] read_vpd_attr+0x30/0x40
         [<ffffffff8128e037>] sysfs_kf_bin_read+0x47/0x70
         [<ffffffff8128d24e>] kernfs_fop_read+0xae/0x180
         [<ffffffff8120dd97>] __vfs_read+0x37/0x100
         [<ffffffff812ba7e4>] ? security_file_permission+0x84/0xa0
         [<ffffffff8120e366>] ? rw_verify_area+0x56/0xe0
         [<ffffffff8120e476>] vfs_read+0x86/0x140
         [<ffffffff8120f3f5>] SyS_read+0x55/0xd0
         [<ffffffff81720f2e>] system_call_fastpath+0x12/0x71
        Shutting down cpus with NMI
        Kernel Offset: disabled
        drm_kms_helper: panic occurred, switching back to text console
      
      So blacklist the access to its VPD.
      Signed-off-by: NEthan Zhao <ethan.zhao@oracle.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: stable@vger.kernel.org	# v4.6+
      0d5370d1
  29. 28 2月, 2017 1 次提交
  30. 18 2月, 2017 1 次提交
    • S
      PCI: Add ACS quirk for Qualcomm QDF2400 and QDF2432 · 33be632b
      Sinan Kaya 提交于
      The Qualcomm QDF2xxx root ports don't advertise an ACS capability, but they
      do provide ACS-like features to disable peer transactions and validate bus
      numbers in requests.
      
      To be specific:
      * Hardware supports source validation but it will report the issue as
      Completer Abort instead of ACS Violation.
      
      * Hardware doesn't support peer-to-peer and each root port is a root
      complex with unique segment numbers.
      
      * It is not possible for one root port to pass traffic to the other root
      port.  All PCIe transactions are terminated inside the root port.
      
      Add an ACS quirk for the QDF2400 and QDF2432 products.
      
      [bhelgaas: changelog]
      Signed-off-by: NSinan Kaya <okaya@codeaurora.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NAlex Williamson <alex.williamson@redhat.com>
      33be632b
  31. 16 2月, 2017 1 次提交
  32. 09 2月, 2017 2 次提交
  33. 29 1月, 2017 1 次提交