1. 02 6月, 2018 3 次提交
  2. 26 5月, 2018 1 次提交
    • B
      PCI: Remove unused pcie_get_minimum_link() · e5b1db01
      Bjorn Helgaas 提交于
      In some cases pcie_get_minimum_link() returned misleading information
      because it found the slowest link and the narrowest link without
      considering the total bandwidth of the link.
      
      For example, consider a path with these two links:
      
        - 16.0 GT/s  x1 link  (16.0 * 10^9 * 128 / 130) *  1 / 8 = 1969 MB/s
        -  2.5 GT/s x16 link  ( 2.5 * 10^9 *   8 /  10) * 16 / 8 = 4000 MB/s
      
      The available bandwidth of the path is limited by the 16 GT/s link to about
      1969 MB/s, but pcie_get_minimum_link() returned 2.5 GT/s x1, which
      corresponds to only 250 MB/s.
      
      Callers should use pcie_print_link_status() instead, or
      pcie_bandwidth_available() if they need more detailed information.
      
      Remove pcie_get_minimum_link() since there are no callers left.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      e5b1db01
  3. 18 5月, 2018 1 次提交
  4. 16 5月, 2018 1 次提交
  5. 08 5月, 2018 2 次提交
    • G
      PCI: Check whether bridges allow access to extended config space · 17e8f0d4
      Gilles Buloz 提交于
      Even if a device supports extended config space, i.e., it is a PCI-X Mode 2
      or a PCI Express device, the extended space may not be accessible if
      there's a conventional PCI bus in the path to it.
      
      We currently figure that out in pci_cfg_space_size() by reading the first
      dword of extended config space.  On most platforms that returns ~0 data if
      the space is inaccessible, but it may set error bits in PCI status
      registers, and on some platforms it causes exceptions that we currently
      don't recover from.
      
      For example, a PCIe-to-conventional PCI bridge treats config transactions
      with a non-zero Extended Register Address as an Unsupported Request on PCIe
      and a received Master-Abort on the destination bus (see PCI Express to
      PCI/PCI-X Bridge spec, r1.0, sec 4.1.3).
      
      A sample case is a LS1043A CPU (NXP QorIQ Layerscape) platform with the
      following bus topology:
      
        LS1043 PCIe Root Port
          -> PEX8112 PCIe-to-PCI bridge (doesn't support ext cfg on PCI side)
            -> PMC slot connector (for legacy PMC modules)
      
      With a PMC module topology as follows:
      
        PMC connector
          -> PCI-to-PCIe bridge
            -> PCIe switch (4 ports)
              -> 4 PCIe devices (one on each port)
      
      The PCIe devices on the PMC module support extended config space, but we
      can't reach it because the PEX8112 can't generate accesses to the extended
      space on its secondary bus.  Attempts to access it cause Unsupported
      Request errors, which result in synchronous aborts on this platform.
      
      To avoid these errors, check whether bridges are capable of generating
      extended config space addresses on their secondary interfaces.  If they
      can't, we restrict devices below the bridge to only the 256-byte
      PCI-compatible config space.
      Signed-off-by: NGilles Buloz <gilles.buloz@kontron.com>
      [bhelgaas: changelog, rework patch so bus_flags testing is all in
      pci_bridge_child_ext_cfg_accessible()]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      17e8f0d4
    • B
      PCI: pciehp: Add quirk for Command Completed errata · d22b3621
      Bjorn Helgaas 提交于
      Several PCIe hotplug controllers have errata that mean they do not set the
      Command Completed bit unless writes to the Slot Command register change
      "Control" bits.  Command Completed is never set for writes that only change
      software notification "Enable" bits.  This results in timeouts like this:
      
        pciehp 0000:00:1c.0:pcie004: Timeout on hotplug command 0x1038 (issued 65284 msec ago)
      
      When this erratum is present, avoid these timeouts by marking commands
      "completed" immediately unless they change the "Control" bits.
      
      Here's the text of the Intel erratum CF118.  We assume this applies to all
      Intel parts:
      
        CF118        PCIe Slot Status Register Command Completed bit not always
                     updated on any configuration write to the Slot Control
                     Register
      
        Problem:     For PCIe root ports (devices 0 - 10) supporting hot-plug,
                     the Slot Status Register (offset AAh) Command Completed
                     (bit[4]) status is updated under the following condition:
                     IOH will set Command Completed bit after delivering the new
                     commands written in the Slot Controller register (offset
                     A8h) to VPP. The IOH detects new commands written in Slot
                     Control register by checking the change of value for Power
                     Controller Control (bit[10]), Power Indicator Control
                     (bits[9:8]), Attention Indicator Control (bits[7:6]), or
                     Electromechanical Interlock Control (bit[11]) fields. Any
                     other configuration writes to the Slot Control register
                     without changing the values of these fields will not cause
                     Command Completed bit to be set.
      
                     The PCIe Base Specification Revision 2.0 or later describes
                     the “Slot Control Register” in section 7.8.10, as follows
                     (Reference section 7.8.10, Slot Control Register, Offset
                     18h). In hot-plug capable Downstream Ports, a write to the
                     Slot Control register must cause a hot-plug command to be
                     generated (see Section 6.7.3.2 for details on hot-plug
                     commands). A write to the Slot Control register in a
                     Downstream Port that is not hotplug capable must not cause a
                     hot-plug command to be executed.
      
                     The PCIe Spec intended that every write to the Slot Control
                     Register is a command and expected a command complete status
                     to abstract the VPP implementation specific nuances from the
                     OS software. IOH PCIe Slot Control Register implementation
                     is not fully conforming to the PCIe Specification in this
                     respect.
      
        Implication: Software checking on the Command Completed status after
                     writing to the Slot Control register may time out.
      
        Workaround:  Software can read the Slot Control register and compare the
                     existing and new values to determine if it should check the
                     Command Completed status after writing to the Slot Control
                     register.
      
      Per Sinan, the Qualcomm QDF2400 controller also does not set the Command
      Completed bit unless writes to the Slot Command register change "Control"
      bits.
      
      Link: http://www.intel.com/content/www/us/en/processors/xeon/xeon-e7-v2-spec-update.html
      Link: https://lkml.kernel.org/r/8770820b-85a0-172b-7230-3a44524e6c9f@molgen.mpg.de
      Reported-by: Paul Menzel <pmenzel+linux-pci@molgen.mpg.de>	# Lenovo X60
      Tested-by: Paul Menzel <pmenzel+linux-pci@molgen.mpg.de>	# Lenovo X60
      Signed-off-by: Sinan Kaya <okaya@codeaurora.org>		# Qcom quirk
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      d22b3621
  6. 23 4月, 2018 1 次提交
    • B
      PCI/ACPI: Request LTR control from platform before using it · af8bb9f8
      Bjorn Helgaas 提交于
      Per the PCI Firmware spec r3.2, sec 4.5, an ACPI-based OS should use _OSC
      to request control of Latency Tolerance Reporting (LTR) before using it.
      
      Request control of LTR, and if the platform does not grant control, don't
      use it.
      
      N.B. If the hardware supports LTR and the ASPM L1.2 substate but the BIOS
      doesn't support LTR in _OSC, we previously would enable ASPM L1.2.  This
      patch will prevent us from enabling ASPM L1.2 in that case.  It does not
      prevent us from enabling PCI-PM L1.2, since that doesn't depend on LTR.
      See PCIe r40, sec 5.5.1, for the L1 PM substate entry conditions.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      af8bb9f8
  7. 04 4月, 2018 1 次提交
  8. 03 4月, 2018 2 次提交
    • T
      PCI: Add pcie_print_link_status() to log link speed and whether it's limited · 9e506a7b
      Tal Gilboa 提交于
      Add pcie_print_link_status().  This logs the current settings of the link
      (speed, width, and total available bandwidth).
      
      If the device is capable of more bandwidth but is limited by a slower
      upstream link, we include information about the link that limits the
      device's performance.
      
      The user may be able to move the device to a different slot for better
      performance.
      
      This provides a unified method for all PCI devices to report status and
      issues, instead of each device reporting in a different way, using
      different code.
      Signed-off-by: NTal Gilboa <talgi@mellanox.com>
      [bhelgaas: changelog, reword log messages, print device capabilities when
      not limited, print bandwidth in Gb/s]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      9e506a7b
    • T
      PCI: Add pcie_bandwidth_available() to compute bandwidth available to device · 6db79a88
      Tal Gilboa 提交于
      Add pcie_bandwidth_available() to compute the bandwidth available to a
      device.  This may be limited by the device itself or by a slower upstream
      link leading to the device.
      
      The available bandwidth at each link along the path is computed as:
      
        link_width * link_speed * (1 - encoding_overhead)
      
      2.5 and 5.0 GT/s links use 8b/10b encoding, which reduces the raw bandwidth
      available by 20%; 8.0 GT/s and faster links use 128b/130b encoding, which
      reduces it by about 1.5%.
      
      The result is in Mb/s, i.e., megabits/second, of raw bandwidth.
      
      Also return the device with the slowest link and the speed and width of
      that link.
      Signed-off-by: NTal Gilboa <talgi@mellanox.com>
      [bhelgaas: changelog, leave pcie_get_minimum_link() alone for now, return
      bw directly, use pci_upstream_bridge(), check "next_bw <= bw" to find
      uppermost limiting device, return speed/width of the limiting device]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      6db79a88
  9. 01 4月, 2018 1 次提交
    • M
      PCI/IOV: Add missing prototypes for powerpc pcibios interfaces · 619e6f34
      Mathieu Malaterre 提交于
      Add missing prototypes for:
      
        resource_size_t pcibios_default_alignment(void);
        int pcibios_sriov_enable(struct pci_dev *pdev, u16 num_vfs);
        int pcibios_sriov_disable(struct pci_dev *pdev);
      
      This fixes the following warnings treated as errors when using W=1:
      
        arch/powerpc/kernel/pci-common.c:236:17: error: no previous prototype for ‘pcibios_default_alignment’ [-Werror=missing-prototypes]
        arch/powerpc/kernel/pci-common.c:253:5: error: no previous prototype for ‘pcibios_sriov_enable’ [-Werror=missing-prototypes]
        arch/powerpc/kernel/pci-common.c:261:5: error: no previous prototype for ‘pcibios_sriov_disable’ [-Werror=missing-prototypes]
      
      Also, commit 978d2d68 ("PCI: Add pcibios_iov_resource_alignment()
      interface") added a new function but the prototype was located in the main
      header instead of the CONFIG_PCI_IOV specific section.  Move this function
      next to the newly added ones.
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NBjorn Helgaas <helgaas@kernel.org>
      619e6f34
  10. 31 3月, 2018 3 次提交
    • B
      PCI: Always define the of_node helpers · ad32eb2d
      Bjørn Mork 提交于
      Simply move these inline functions outside the ifdef instead of duplicating
      them as stubs in the !OF case.  The struct device of_node field does not
      depend on OF.
      
      This also fixes the missing stubbed pci_bus_to_OF_node().
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NBjorn Helgaas <helgaas@kernel.org>
      ad32eb2d
    • B
      PCI/portdrv: Encapsulate pcie_ports_auto inside the port driver · 842b447f
      Bjorn Helgaas 提交于
      "pcie_ports_auto" is only used inside the PCIe port driver itself, so
      move it from include/linux/pci.h to portdrv.h so it's not visible to the
      whole kernel.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      842b447f
    • B
      PCI/portdrv: Simplify PCIe feature permission checking · 02bfeb48
      Bjorn Helgaas 提交于
      Some PCIe features (AER, DPC, hotplug, PME) can be managed by either the
      platform firmware or the OS, so the host bridge driver may have to request
      permission from the platform before using them.  On ACPI systems, this is
      done by negotiate_os_control() in acpi_pci_root_add().
      
      The PCIe port driver later uses pcie_port_platform_notify() and
      pcie_port_acpi_setup() to figure out whether it can use these features.
      But all we need is a single bit for each service, so these interfaces are
      needlessly complicated.
      
      Simplify this by adding bits in the struct pci_host_bridge to show when the
      OS has permission to use each feature:
      
        + unsigned int native_aer:1;       /* OS may use PCIe AER */
        + unsigned int native_hotplug:1;   /* OS may use PCIe hotplug */
        + unsigned int native_pme:1;       /* OS may use PCIe PME */
      
      These are set when we create a host bridge, and the host bridge driver can
      clear the bits corresponding to any feature the platform doesn't want us to
      use.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      02bfeb48
  11. 22 3月, 2018 1 次提交
  12. 14 3月, 2018 1 次提交
    • L
      PCI: Make pci_wakeup_bus() & pci_bus_set_current_state() public · 2a4d2c42
      Lukas Wunner 提交于
      There are PCI devices which are power-manageable by a nonstandard means,
      such as a custom ACPI method.  One example are discrete GPUs in hybrid
      graphics laptops, another are Thunderbolt controllers in Macs.
      
      Such devices can't be put into D3cold with pci_set_power_state() because
      pci_platform_power_transition() fails with -ENODEV.  Instead they're put
      into D3hot by pci_set_power_state() and subsequently into D3cold by
      invoking the nonstandard means.  However as a consequence the cached
      current_state is incorrectly left at D3hot.
      
      What we need to do is walk the hierarchy below such a PCI device on
      powerdown and update the current_state to D3cold.  On powerup the PCI
      device itself and the hierarchy below it is in D0uninitialized, so we
      need to walk the hierarchy again and wake all devices, causing them to
      be put into D0active and then letting them autosuspend as they see fit.
      
      To this end make pci_wakeup_bus() & pci_bus_set_current_state() public
      so PCI drivers don't have to reinvent the wheel.
      
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/2962443259e7faec577274b4ef8c54aad66f9a94.1520068884.git.lukas@wunner.de
      2a4d2c42
  13. 05 3月, 2018 1 次提交
  14. 28 2月, 2018 1 次提交
  15. 23 2月, 2018 1 次提交
  16. 16 2月, 2018 1 次提交
  17. 31 1月, 2018 2 次提交
  18. 27 1月, 2018 1 次提交
  19. 24 1月, 2018 1 次提交
    • J
      PCI: Add pci_enable_atomic_ops_to_root() · 430a2368
      Jay Cornwall 提交于
      The Atomic Operations feature (PCIe r4.0, sec 6.15) allows atomic
      transctions to be requested by, routed through and completed by PCIe
      components. Routing and completion do not require software support.
      Component support for each is detectable via the DEVCAP2 register.
      
      A Requester may use AtomicOps only if its PCI_EXP_DEVCTL2_ATOMIC_REQ is
      set. This should be set only if the Completer and all intermediate routing
      elements support AtomicOps.
      
      A concrete example is the AMD Fiji-class GPU (which is capable of making
      AtomicOp requests), below a PLX 8747 switch (advertising AtomicOp routing)
      with a Haswell host bridge (advertising AtomicOp completion support).
      
      Add pci_enable_atomic_ops_to_root() for per-device control over AtomicOp
      requests. This checks to be sure the Root Port supports completion of the
      desired AtomicOp sizes and the path to the Root Port supports routing the
      AtomicOps.
      Signed-off-by: NJay Cornwall <Jay.Cornwall@amd.com>
      Signed-off-by: NFelix Kuehling <Felix.Kuehling@amd.com>
      [bhelgaas: changelog, comments, whitespace]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      430a2368
  20. 20 1月, 2018 1 次提交
    • N
      PCI: Add dummy pci_irqd_intx_xlate() for CONFIG_PCI=n build · 80db6f08
      Niklas Cassel 提交于
      Some hardware can operate in either "host" or "endpoint" mode, which means
      there can be both a host bridge driver and an endpoint driver for the same
      device.  Those drivers share a lot of code, so sometimes they live in the
      same source file.
      
      The host bridge driver requires CONFIG_PCI=y because it enumerates PCI
      devices below the bridge using the PCI core.  The endpoint driver does not
      require CONFIG_PCI=y because it runs in an embedded kernel on the other
      side of the device, e.g., on an adapter card.
      
      pci-dra7xx.c contains both host and endpoint drivers.  If we select only
      the endpoint driver (CONFIG_PCI=n and CONFIG_PCI_DRA7XX_EP=y), the unneeded
      host driver is still compiled.  It references pci_irqd_intx_xlate(), which
      is not present when CONFIG_PCI=n, which causes this error:
      
        drivers/pci/dwc/pci-dra7xx.c:229:11: error: 'pci_irqd_intx_xlate' undeclared here (not in a function)
      
      Add a dummy pci_irqd_intx_xlate() for the CONFIG_PCI=n case.
      
      [bhelgaas: changelog]
      Signed-off-by: NNiklas Cassel <niklas.cassel@axis.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      80db6f08
  21. 19 1月, 2018 1 次提交
  22. 19 12月, 2017 2 次提交
  23. 14 12月, 2017 1 次提交
  24. 11 12月, 2017 1 次提交
  25. 07 12月, 2017 1 次提交
    • R
      PCI: Add pci_get_domain_bus_and_slot() stub · 7912af5c
      Randy Dunlap 提交于
      The coretemp driver build fails when CONFIG_PCI is not enabled because it
      uses a function that does not have a stub for that config case, so add the
      function stub.
      
        ../drivers/hwmon/coretemp.c: In function 'adjust_tjmax':
        ../drivers/hwmon/coretemp.c:250:9: error: implicit declaration of function 'pci_get_domain_bus_and_slot' [-Werror=implicit-function-declaration]
          struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn);
        ../drivers/hwmon/coretemp.c:250:32: warning: initialization makes pointer from integer without a cast [enabled by default]
          struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn);
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      [bhelgaas: identical patch also by Arnd Bergmann <arnd@arndb.de>]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NGuenter Roeck <linux@roeck-us.net>
      7912af5c
  26. 24 11月, 2017 1 次提交
  27. 07 11月, 2017 1 次提交
  28. 06 11月, 2017 1 次提交
  29. 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
  30. 26 10月, 2017 1 次提交
    • C
      PCI: Add pci_resize_resource() for resizing BARs · 8bb705e3
      Christian König 提交于
      Add a pci_resize_resource() interface to allow device drivers to resize
      BARs of their devices.
      
      This is useful for devices with large local storage, e.g., graphics
      devices.  These devices often only expose 256MB BARs initially to be
      compatible with 32-bit systems.
      
      This function only tries to reprogram the windows of the bridge directly
      above the requesting device and only the BAR of the same type (usually mem,
      64bit, prefetchable).  This is done to avoid disturbing other drivers by
      changing the BARs of their devices.
      
      Drivers should use the following sequence to resize their BARs:
      1. Disable memory decoding of the device using the PCI cfg dword.
      2. Use pci_release_resource() to release all BARs which can move during the
         resize, including the one you want to resize.
      3. Call pci_resize_resource() for each BAR you want to resize.
      4. Call pci_assign_unassigned_bus_resources() to reassign new locations
         for all BARs which are not resized, but could move.
      5. If everything worked as expected, enable memory decoding in the device
         again using the PCI cfg dword.
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      8bb705e3
  31. 06 10月, 2017 2 次提交