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. 10 7月, 2017 1 次提交
  3. 03 7月, 2017 1 次提交
    • L
      ARM/PCI: Remove pci_fixup_irqs() call for bios32 host controllers · 16508469
      Lorenzo Pieralisi 提交于
      Legacy PCI host controllers (ie host controllers that set-up the PCI bus
      through the ARM pci_common_init() API) are currently relying on
      pci_fixup_irqs() to assign legacy PCI irqs to devices.  This is not ideal
      in that pci_fixup_irqs() assigns IRQs for all PCI devices present in a given
      system some of which may well be enabled by the time pci_fixup_irqs() is
      called (ie a system with multiple host controllers).  With the introduction
      of struct pci_host_bridge.(*map_irq) pointer it is possible to assign IRQs
      for all devices originating from a PCI host bridge at probe time; this is
      implemented through pci_assign_irq() that relies on the struct
      pci_host_bridge.map_irq pointer to map IRQ for a given device.
      
      The benefits this brings are twofold:
      
        - the IRQ for a device is assigned once at probe time
        - the IRQ assignment works also for hotplugged devices
      
      Remove pci_fixup_irqs() call from bios32 code and rely on pci_assign_irq()
      to carry out the IRQ mapping at device probe time.
      
      The map_irq() and swizzle_irq() struct pci_host_bridge callbacks are set-up
      in the struct pci_host_bridge created in the bios32 pcibios_init_hw()
      function and mach-* code paths (for PCI mach implementations that require a
      specific struct hw_pci.(*scan) function callback).
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      [bhelgaas: folded in fixes from Lorenzo:
      http://lkml.kernel.org/r/20170701140629.GC8977@red-moon]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Andrew Lunn <andrew@lunn.ch>
      16508469
  4. 29 6月, 2017 1 次提交
  5. 20 4月, 2017 2 次提交
  6. 24 6月, 2016 2 次提交
    • L
      ARM/PCI: Remove arch-specific pcibios_enable_device() · 313cb902
      Lorenzo Pieralisi 提交于
      On systems with PCI_PROBE_ONLY set, we rely on BAR assignments from
      firmware.  Previously we did not insert those resources into the resource
      tree, so we had to skip pci_enable_resources() because it fails if
      resources are not in the resource tree.
      
      Now that we *do* insert resources even when PCI_PROBE_ONLY is set, we no
      longer need the ARM-specific pcibios_enable_device().  Remove it so we
      use the generic version.
      
      [bhelgaas: changelog]
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      CC: Arnd Bergmann <arnd@arndb.de>
      CC: Russell King <linux@arm.linux.org.uk>
      313cb902
    • L
      ARM/PCI: Claim bus resources on PCI_PROBE_ONLY set-ups · b30742aa
      Lorenzo Pieralisi 提交于
      We claim PCI BAR and bridge window resources in pci_bus_assign_resources(),
      but when PCI_PROBE_ONLY is set, we treat those resources as immutable and
      don't call pci_bus_assign_resources(), so the resources aren't put in the
      resource tree.
      
      When the resources aren't in the tree, they don't show up in /proc/iomem,
      we can't detect conflicts, and we need special cases elsewhere for
      PCI_PROBE_ONLY or resources without a parent pointer.
      
      Claim all PCI BAR and window resources in the PCI_PROBE_ONLY case.
      
      If a PCI_PROBE_ONLY platform assigns conflicting resources, Linux can't fix
      the conflicts.  Previously we didn't notice the conflicts, but now we will,
      which may expose new failures.
      
      [bhelgaas: changelog, add resource comment, remove size/assign comments]
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Russell King <linux@armlinux.org.uk>
      b30742aa
  7. 21 6月, 2016 1 次提交
    • B
      ARM: Make PCI I/O space optional · 1fa05101
      Bjorn Helgaas 提交于
      For callers of pci_common_init_dev(), we previously always required a PCI
      I/O port resource.  If the caller's ->setup() function had added an I/O
      resource, we used that; otherwise, we added a default 64K I/O port space
      for it.
      
      There are PCI host bridges that do not support I/O port space, and we
      should not add fictitious spaces for them.
      
      If a caller sets struct hw_pci.io_optional, assume it is responsible for
      adding any I/O port resource it desires, and do not add any default I/O
      port space.
      Tested-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      1fa05101
  8. 04 4月, 2016 1 次提交
  9. 26 11月, 2015 1 次提交
  10. 03 11月, 2015 1 次提交
    • G
      ARM/PCI: Replace pci_sys_data->align_resource with global function pointer · b3a72384
      Gabriele Paoloni 提交于
      dw_pcie_host_init() creates the PCI host bridge with pci_common_init_dev(),
      an ARM-specific function that supplies the ARM-specific pci_sys_data
      structure as the PCI "sysdata".  To use dw_pcie_host_init() on other
      architectures, we will copy the internals of pci_common_init_dev() into
      pcie-designware.c instead of calling it, and dw_pcie_host_init() will
      supply the DesignWare pcie_port structure as "sysdata".
      
      Most ARM "sysdata" users are specific to non-DesignWare host bridges;
      they'll be unaffected because those bridges will continue to have the ARM
      pci_sys_data.  Most of the rest are ARM-generic functions called by
      pci_common_init_dev(); these will be unaffected because dw_pcie_host_init()
      will no longer call pci_common_init().
      
      But the ARM pcibios_align_resource() can be called by the PCI core for any
      bridge, so it can't depend on sysdata since it may be either pci_sys_data
      or pcie_port.
      
      Remove the pcibios_align_resource() dependency on sysdata by replacing the
      pci_sys_data->align_resource pointer with a global function pointer.
      
      This is less general (we can no longer have per-host bridge
      align_resource() methods), but the pci_sys_data->align_resource pointer was
      used only by Marvell (see mvebu_pcie_enable()), so this would only be a
      problem if we had a system with a combination of Marvell and other host
      bridges
      
      [bhelgaas: changelog]
      Signed-off-by: NGabriele Paoloni <gabriele.paoloni@huawei.com>
      Signed-off-by: NZhou Wang <wangzhou1@hisilicon.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NPratyush Anand <pratyush.anand@gmail.com>
      b3a72384
  11. 21 8月, 2015 3 次提交
  12. 23 7月, 2015 1 次提交
  13. 23 2月, 2015 1 次提交
    • L
      ARM: 8293/1: kernel: fix pci_mmap_page_range() offset calculation · 415ae101
      Lorenzo Pieralisi 提交于
      The pci_mmap_page_range() API should be written to expect offset
      values representing PCI memory resource addresses as seen by user
      space, through the pci_resource_to_user() API.
      
      ARM relies on the standard implementation of pci_resource_to_user()
      which actually is an identity map and exports to user space
      PCI memory resources as they are stored in PCI devices resources
      structures, which represent CPU physical addresses (fixed-up using
      BUS to CPU address conversions) not PCI bus addresses.
      
      Therefore, on ARM platforms where the mapping between CPU and BUS
      address is not a 1:1 the current pci_mmap_page_range() implementation is
      erroneous, in that an additional shift is applied to an already fixed-up
      offset passed from userspace.
      
      Hence, this patch removes the mem_offset from the pgoff calculation
      since the offset as passed from user space already represents the CPU
      physical address corresponding to the resource to be mapped, ie no
      additional offset should be applied.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      415ae101
  14. 05 2月, 2015 1 次提交
  15. 28 12月, 2014 1 次提交
  16. 22 11月, 2014 2 次提交
  17. 21 11月, 2014 1 次提交
  18. 31 5月, 2014 1 次提交
    • M
      ARM/PCI: Call pcie_bus_configure_settings() to set MPS · 8b5742ad
      Murali Karicheri 提交于
      Call pcie_bus_configure_settings() on ARM, like for other platforms.
      pcie_bus_configure_settings() makes sure the MPS across the bus is uniform
      and provides the ability to tune the MRSS and MPS to higher performance
      values.  This is particularly important for embedded where there is no
      firmware to program these PCIe settings for the OS.
      Signed-off-by: NMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Russell King <linux@arm.linux.org.uk>
      CC: Arnd Bergmann <arnd@arndb.de>
      CC: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
      CC: Santosh Shilimkar <santosh.shilimkar@ti.com>
      8b5742ad
  19. 25 2月, 2014 1 次提交
  20. 15 2月, 2014 2 次提交
  21. 12 8月, 2013 1 次提交
  22. 26 7月, 2013 1 次提交
  23. 03 6月, 2013 1 次提交
    • L
      ARM: pci: create pci_common_init_dev() · 14d86e72
      Linus Walleij 提交于
      When working with device tree support for PCI on ARM you run
      into a problem when mapping IRQs from the device tree irqmaps:
      doing this the code in drivers/of/of_pci_irq.c will try to
      find the OF node on the root bridge and this fails, because
      bus->dev.of_node is NULL, and that in turn boils down to
      the fact that pci_set_bus_of_node() has called
      pcibios_get_phb_of_node() from drivers/pci/of.c to obtain
      the OF node of the bridge or its parent and none is set
      and thus NULL is returned.
      
      Fix this by adding an additional parent argument API for
      registering PCI bridges on the ARM architecture called
      pci_common_init_dev(), and pass along this parent to
      pci_scan_root_bus() called from pcibios_init_hw() in
      bios32.c and voila: the IRQ mappings start working:
      the OF node can be retrieved from the parent.
      
      Create the old pci_common_init() as a wrapper around
      the new call.
      
      Cc: Mike Rapoport <mike@compulab.co.il>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Benjamin Herrenschmitt <benh@kernel.crashing.org>
      Reviewed-by: NAndrew Murray <andrew.murray@arm.com>
      Reviewed-by: NThierry Reding <thierry.reding@avionic-design.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      14d86e72
  24. 03 4月, 2013 1 次提交
    • T
      ARM: 7683/1: pci: add a align_resource hook · 029baf14
      Thomas Petazzoni 提交于
      The PCI specifications says that an I/O region must be aligned on a 4
      KB boundary, and a memory region aligned on a 1 MB boundary.
      
      However, the Marvell PCIe interfaces rely on address decoding windows
      (which allow to associate a range of physical addresses with a given
      device). For PCIe memory windows, those windows are defined with a 1
      MB granularity (which matches the PCI specs), but PCIe I/O windows can
      only be defined with a 64 KB granularity, so they have to be 64 KB
      aligned. We therefore need to tell the PCI core about this special
      alignement requirement.
      
      The PCI core already calls pcibios_align_resource() in the ARM PCI
      core, specifically for such purposes. So this patch extends the ARM
      PCI core so that it calls a ->align_resource() hook registered by the
      PCI driver, exactly like the existing ->map_irq() and ->swizzle()
      hooks.
      
      A particular PCI driver can register a align_resource() hook, and do
      its own specific alignement, depending on the specific constraints of
      the underlying hardware.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      029baf14
  25. 17 2月, 2013 2 次提交
  26. 04 1月, 2013 1 次提交
    • G
      ARM: drivers: remove __dev* attributes. · 351a102d
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Russell King <linux@arm.linux.org.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      351a102d
  27. 19 9月, 2012 2 次提交
  28. 26 7月, 2012 1 次提交
  29. 25 7月, 2012 1 次提交
    • R
      ARM: Add fixed PCI i/o mapping · c2794437
      Rob Herring 提交于
      This adds a fixed virtual mapping for PCI i/o addresses. The mapping is
      located at the last 2MB of vmalloc region (0xfee00000-0xff000000). 2MB
      is used to align with PMD size, but IO_SPACE_LIMIT is 1MB. The space
      is reserved after .map_io and can be mapped at any time later with
      pci_ioremap_io. Platforms which need early i/o mapping (e.g. for vga
      console) can call pci_map_io_early in their .map_io function.
      
      This has changed completely from the 1st implementation which only
      supported creating the static mapping at .map_io.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Acked-by: NNicolas Pitre <nico@linaro.org>
      c2794437
  30. 14 6月, 2012 1 次提交
  31. 12 6月, 2012 1 次提交
  32. 16 5月, 2012 1 次提交