License cleanup: add SPDX GPL-2.0 license identifier to files with no license
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: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 22:07:57 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2019-11-11 20:30:44 +08:00
|
|
|
obj-$(CONFIG_PCIE_CADENCE) += cadence/
|
PCI: faraday: Add Faraday Technology FTPCI100 PCI Host Bridge driver
Add a host bridge driver for the Faraday Technology FPPCI100 host bridge,
used for Cortina Systems Gemini SoC (SL3516) PCI Host Bridge.
This code is inspired by the out-of-tree OpenWRT patch and then extensively
rewritten for device tree and using the modern helpers to cut down and
modernize the code to all new PCI frameworks. A driver exists in U-Boot as
well.
Tested on the ITian Square One SQ201 NAS with the following result in the
boot log (trimmed to relevant parts):
OF: PCI: host bridge /soc/pci@50000000 ranges:
OF: PCI: IO 0x50000000..0x500fffff -> 0x00000000
OF: PCI: MEM 0x58000000..0x5fffffff -> 0x58000000
ftpci100 50000000.pci: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: root bus resource [io 0x0000-0xfffff]
pci_bus 0000:00: root bus resource [mem 0x58000000-0x5fffffff]
ftpci100 50000000.pci:
DMA MEM1 BASE: 0x0000000000000000 -> 0x0000000007ffffff config 00070000
ftpci100 50000000.pci:
DMA MEM2 BASE: 0x0000000000000000 -> 0x0000000003ffffff config 00060000
ftpci100 50000000.pci:
DMA MEM3 BASE: 0x0000000000000000 -> 0x0000000003ffffff config 00060000
PCI: bus0: Fast back to back transfers disabled
pci 0000:00:00.0: of_irq_parse_pci() failed with rc=-22
pci 0000:00:0c.0: BAR 0: assigned [mem 0x58000000-0x58007fff]
pci 0000:00:09.2: BAR 0: assigned [mem 0x58008000-0x580080ff]
pci 0000:00:09.0: BAR 4: assigned [io 0x1000-0x101f]
pci 0000:00:09.1: BAR 4: assigned [io 0x1020-0x103f]
pci 0000:00:09.0: enabling device (0140 -> 0141)
pci 0000:00:09.0: HCRESET not completed yet!
pci 0000:00:09.1: enabling device (0140 -> 0141)
pci 0000:00:09.1: HCRESET not completed yet!
pci 0000:00:09.2: enabling device (0140 -> 0142)
rt61pci 0000:00:0c.0: enabling device (0140 -> 0142)
ieee80211 phy0: rt2x00_set_chip: Info - Chipset detected -
rt: 2561, rf: 0003, rev: 000c
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ehci-pci 0000:00:09.2: EHCI Host Controller
ehci-pci 0000:00:09.2: new USB bus registered, assigned bus number 1
ehci-pci 0000:00:09.2: irq 125, io mem 0x58008000
ehci-pci 0000:00:09.2: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 4 ports detected
uhci_hcd: USB Universal Host Controller Interface driver
uhci_hcd 0000:00:09.0: UHCI Host Controller
uhci_hcd 0000:00:09.0: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:09.0: HCRESET not completed yet!
uhci_hcd 0000:00:09.0: irq 123, io base 0x00001000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: config failed, hub doesn't have any ports! (err -19)
uhci_hcd 0000:00:09.1: UHCI Host Controller
uhci_hcd 0000:00:09.1: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:09.1: HCRESET not completed yet!
uhci_hcd 0000:00:09.1: irq 124, io base 0x00001020
hub 3-0:1.0: USB hub found
hub 3-0:1.0: config failed, hub doesn't have any ports! (err -19)
scsi 0:0:0:0: Direct-Access USB Flash Disk 1.00 PQ: 0 ANSI: 2
sd 0:0:0:0: [sda] 7900336 512-byte logical blocks: (4.04 GB/3.77 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] No Caching mode page found
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1 sda2 sda3
sd 0:0:0:0: [sda] Attached SCSI removable disk
ieee80211 phy0: rt2x00lib_request_firmware: Info -
Loading firmware file 'rt2561s.bin'
ieee80211 phy0: rt2x00lib_request_firmware: Info -
Firmware detected - version: 0.8
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
$ lspci
00:00.0 Class 0600: 159b:4321
00:09.2 Class 0c03: 1106:3104
00:09.0 Class 0c03: 1106:3038
00:09.1 Class 0c03: 1106:3038
00:0c.0 Class 0280: 1814:0301
$ cat /proc/interrupts
CPU0
123: 0 PCI 0 Edge uhci_hcd:usb2
124: 0 PCI 1 Edge uhci_hcd:usb3
125: 159 PCI 2 Edge ehci_hcd:usb1
126: 1082 PCI 3 Edge rt61pci
$ cat /proc/iomem
50000000-500000ff : /soc/pci@50000000
58000000-5fffffff : Gemini PCI MEM
58000000-58007fff : 0000:00:0c.0
58000000-58007fff : 0000:00:0c.0
58008000-580080ff : 0000:00:09.2
58008000-580080ff : ehci_hcd
The EHCI USB hub works fine; I can mount and manage files and the IRQs just
keep ticking up. I can issue iwlist wlan0 scanning and see all the WLANs
here. I don't have wpa_supplicant so have not tried connecting to them.
[bhelgaas: fold in %pap change from Arnd Bergmann <arnd@arndb.de>]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Janos Laube <janos.dev@gmail.com>
CC: Paulius Zaleckas <paulius.zaleckas@gmail.com>
CC: Hans Ulli Kroll <ulli.kroll@googlemail.com>
CC: Florian Fainelli <f.fainelli@gmail.com>
CC: Feng-Hsin Chiang <john453@faraday-tech.com>
CC: Greentime Hu <green.hu@gmail.com>
2017-03-13 06:24:03 +08:00
|
|
|
obj-$(CONFIG_PCI_FTPCI100) += pci-ftpci100.o
|
2021-05-03 06:09:20 +08:00
|
|
|
obj-$(CONFIG_PCI_IXP4XX) += pci-ixp4xx.o
|
2016-02-17 05:56:23 +08:00
|
|
|
obj-$(CONFIG_PCI_HYPERV) += pci-hyperv.o
|
2019-08-22 13:05:41 +08:00
|
|
|
obj-$(CONFIG_PCI_HYPERV_INTERFACE) += pci-hyperv-intf.o
|
2013-07-31 16:14:10 +08:00
|
|
|
obj-$(CONFIG_PCI_MVEBU) += pci-mvebu.o
|
2016-06-30 17:32:31 +08:00
|
|
|
obj-$(CONFIG_PCI_AARDVARK) += pci-aardvark.o
|
2013-08-09 22:49:19 +08:00
|
|
|
obj-$(CONFIG_PCI_TEGRA) += pci-tegra.o
|
2013-10-30 00:12:51 +08:00
|
|
|
obj-$(CONFIG_PCI_RCAR_GEN2) += pci-rcar-gen2.o
|
2020-05-07 20:33:13 +08:00
|
|
|
obj-$(CONFIG_PCIE_RCAR_HOST) += pcie-rcar.o pcie-rcar-host.o
|
2020-05-07 20:33:18 +08:00
|
|
|
obj-$(CONFIG_PCIE_RCAR_EP) += pcie-rcar.o pcie-rcar-ep.o
|
2016-03-12 05:35:55 +08:00
|
|
|
obj-$(CONFIG_PCI_HOST_COMMON) += pci-host-common.o
|
2013-11-23 00:14:41 +08:00
|
|
|
obj-$(CONFIG_PCI_HOST_GENERIC) += pci-host-generic.o
|
2021-03-08 23:24:48 +08:00
|
|
|
obj-$(CONFIG_PCI_HOST_THUNDER_ECAM) += pci-thunder-ecam.o
|
|
|
|
obj-$(CONFIG_PCI_HOST_THUNDER_PEM) += pci-thunder-pem.o
|
2014-08-21 00:26:02 +08:00
|
|
|
obj-$(CONFIG_PCIE_XILINX) += pcie-xilinx.o
|
2016-03-07 00:32:14 +08:00
|
|
|
obj-$(CONFIG_PCIE_XILINX_NWL) += pcie-xilinx-nwl.o
|
2020-06-16 20:56:54 +08:00
|
|
|
obj-$(CONFIG_PCIE_XILINX_CPM) += pcie-xilinx-cpm.o
|
2017-09-27 02:02:20 +08:00
|
|
|
obj-$(CONFIG_PCI_V3_SEMI) += pci-v3-semi.o
|
2021-03-08 23:24:48 +08:00
|
|
|
obj-$(CONFIG_PCI_XGENE) += pci-xgene.o
|
2015-06-06 04:56:34 +08:00
|
|
|
obj-$(CONFIG_PCI_XGENE_MSI) += pci-xgene-msi.o
|
2015-01-29 00:16:18 +08:00
|
|
|
obj-$(CONFIG_PCI_VERSATILE) += pci-versatile.o
|
2015-04-09 02:21:35 +08:00
|
|
|
obj-$(CONFIG_PCIE_IPROC) += pcie-iproc.o
|
2016-01-07 08:04:35 +08:00
|
|
|
obj-$(CONFIG_PCIE_IPROC_MSI) += pcie-iproc-msi.o
|
2015-04-09 02:21:35 +08:00
|
|
|
obj-$(CONFIG_PCIE_IPROC_PLATFORM) += pcie-iproc-platform.o
|
2015-05-13 05:23:01 +08:00
|
|
|
obj-$(CONFIG_PCIE_IPROC_BCMA) += pcie-iproc-bcma.o
|
2015-10-23 18:27:12 +08:00
|
|
|
obj-$(CONFIG_PCIE_ALTERA) += pcie-altera.o
|
2015-10-23 18:27:13 +08:00
|
|
|
obj-$(CONFIG_PCIE_ALTERA_MSI) += pcie-altera-msi.o
|
2016-09-04 00:41:09 +08:00
|
|
|
obj-$(CONFIG_PCIE_ROCKCHIP) += pcie-rockchip.o
|
2018-05-09 09:12:59 +08:00
|
|
|
obj-$(CONFIG_PCIE_ROCKCHIP_EP) += pcie-rockchip-ep.o
|
2018-05-09 09:11:49 +08:00
|
|
|
obj-$(CONFIG_PCIE_ROCKCHIP_HOST) += pcie-rockchip-host.o
|
2017-05-21 11:42:24 +08:00
|
|
|
obj-$(CONFIG_PCIE_MEDIATEK) += pcie-mediatek.o
|
2021-04-20 14:17:19 +08:00
|
|
|
obj-$(CONFIG_PCIE_MEDIATEK_GEN3) += pcie-mediatek-gen3.o
|
2021-01-26 00:29:33 +08:00
|
|
|
obj-$(CONFIG_PCIE_MICROCHIP_HOST) += pcie-microchip-host.o
|
2016-10-05 01:26:37 +08:00
|
|
|
obj-$(CONFIG_VMD) += vmd.o
|
2019-12-16 19:01:09 +08:00
|
|
|
obj-$(CONFIG_PCIE_BRCMSTB) += pcie-brcmstb.o
|
2020-05-26 17:21:13 +08:00
|
|
|
obj-$(CONFIG_PCI_LOONGSON) += pci-loongson.o
|
2020-09-03 20:34:56 +08:00
|
|
|
obj-$(CONFIG_PCIE_HISI_ERR) += pcie-hisi-error.o
|
2021-09-30 00:38:37 +08:00
|
|
|
obj-$(CONFIG_PCIE_APPLE) += pcie-apple.o
|
2021-09-22 13:00:34 +08:00
|
|
|
obj-$(CONFIG_PCIE_MT7621) += pcie-mt7621.o
|
|
|
|
|
2018-05-31 09:12:37 +08:00
|
|
|
# pcie-hisi.o quirks are needed even without CONFIG_PCIE_DW
|
|
|
|
obj-y += dwc/
|
2020-02-13 12:06:35 +08:00
|
|
|
obj-y += mobiveil/
|
2018-05-31 09:12:37 +08:00
|
|
|
|
2016-12-07 04:27:59 +08:00
|
|
|
|
|
|
|
# The following drivers are for devices that use the generic ACPI
|
|
|
|
# pci_root.c driver but don't support standard ECAM config access.
|
|
|
|
# They contain MCFG quirks to replace the generic ECAM accessors with
|
|
|
|
# device-specific ones that are shared with the DT driver.
|
|
|
|
|
|
|
|
# The ACPI driver is generic and should not require driver-specific
|
|
|
|
# config options to be enabled, so we always build these drivers on
|
|
|
|
# ARM64 and use internal ifdefs to only build the pieces we need
|
|
|
|
# depending on whether ACPI, the DT driver, or both are enabled.
|
|
|
|
|
2021-03-08 23:24:48 +08:00
|
|
|
ifdef CONFIG_ACPI
|
|
|
|
ifdef CONFIG_PCI_QUIRKS
|
2016-12-07 04:27:59 +08:00
|
|
|
obj-$(CONFIG_ARM64) += pci-thunder-ecam.o
|
|
|
|
obj-$(CONFIG_ARM64) += pci-thunder-pem.o
|
|
|
|
obj-$(CONFIG_ARM64) += pci-xgene.o
|
2018-01-31 04:56:49 +08:00
|
|
|
endif
|
2021-03-08 23:24:48 +08:00
|
|
|
endif
|