OpenCloudOS-Kernel/arch/tile/include/asm
Greg Kroah-Hartman b24413180f 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-02 11:10:55 +01:00
..
Kbuild tile: move generic-y of exported headers to uapi/asm/Kbuild 2017-07-11 21:33:52 +09:00
asm-offsets.h
atomic.h locking/atomic: Remove linux/atomic.h:atomic_fetch_or() 2016-06-16 10:48:32 +02:00
atomic_32.h locking/atomic: Fix atomic_set_release() for 'funny' architectures 2017-08-10 12:28:54 +02:00
atomic_64.h locking/atomic, arch/tile: Implement atomic{,64}_fetch_{add,sub,and,or,xor}() 2016-06-16 10:48:30 +02:00
backtrace.h arch/tile: refactor backtracing code 2011-05-02 13:49:14 -04:00
barrier.h locking/barriers, tile: Provide TILE specific smp_acquire__after_ctrl_dep() 2016-06-14 11:55:15 +02:00
bitops.h arch,tile: Convert smp_mb__*() 2014-04-18 14:20:45 +02:00
bitops_32.h locking/atomic, arch/tile: Implement atomic{,64}_fetch_{add,sub,and,or,xor}() 2016-06-16 10:48:30 +02:00
bitops_64.h arch,tile: Convert smp_mb__*() 2014-04-18 14:20:45 +02:00
cache.h tile: use __ro_after_init instead of tile-specific __write_once 2016-12-16 15:32:29 -05:00
cacheflush.h tile: convert uses of "inv" to "finv" 2013-07-31 11:51:19 -04:00
checksum.h arch/tile: break out the "csum a long" function to <asm/checksum.h> 2012-07-11 16:04:57 -04:00
cmpxchg.h locking/cmpxchg, arch: Remove tas() definitions 2015-12-04 11:39:51 +01:00
compat.h tile: Use get_signal() signal_setup_done() 2014-08-06 13:03:20 +02:00
current.h
delay.h
device.h treewide: Move dma_ops from struct dev_archdata into struct device 2017-01-24 12:23:35 -05:00
div64.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dma-mapping.h dma-mapping: remove dma_alloc_noncoherent and dma_free_noncoherent 2017-08-29 10:04:02 +02:00
dma.h
elf.h tile: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO 2016-07-25 12:15:06 -04:00
fixmap.h tile: use generic fixmap.h 2014-01-23 16:36:54 -08:00
ftrace.h tile: ftrace: fix function_graph tracer issues 2015-04-17 14:01:38 -04:00
futex.h futex: Remove duplicated code and fix undefined behaviour 2017-08-25 22:49:59 +02:00
hardirq.h hardirq: Make hardirq bits generic 2013-11-13 20:21:46 +01:00
hardwall.h proc: convert /proc/$PID/hardwall to seq_file interface 2014-08-08 15:57:23 -07:00
highmem.h kmap_atomic_to_page() has no users, remove it 2015-11-09 15:11:24 -08:00
homecache.h tile: remove support for TILE64 2013-09-03 14:53:29 -04:00
hugetlb.h mm/hugetlb: remove arch_prepare/release_hugepage from arch headers 2015-06-25 17:00:35 -07:00
hv_driver.h
ide.h
insn.h tile/jump_label: add jump label support for TILE-Gx 2016-01-04 15:09:31 -05:00
io.h tile: fix tilepro casts for readl, writel, etc 2016-01-18 14:49:23 -05:00
irq.h arch/tile: adopt the new nmi_backtrace framework 2016-10-07 18:46:30 -07:00
irq_work.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irqflags.h tile: Replace __get_cpu_var uses 2014-08-26 13:45:54 -04:00
jump_label.h tile/jump_label: add jump label support for TILE-Gx 2016-01-04 15:09:31 -05:00
kdebug.h tile: support kprobes on tilegx 2013-08-30 11:55:53 -04:00
kexec.h arch/tile: support kexec() for tilegx 2012-05-25 12:48:25 -04:00
kgdb.h tilegx: support KGDB 2013-09-03 14:51:26 -04:00
kmap_types.h tile: remove km_type definitions 2012-07-24 15:27:32 +08:00
kprobes.h kprobes: move kprobe declarations to asm-generic/kprobes.h 2017-02-27 18:43:45 -08:00
linkage.h
mmu.h tile: implement gettimeofday() via vDSO 2013-08-13 16:26:21 -04:00
mmu_context.h sched/headers: Prepare to remove the <linux/mm_types.h> dependency from <linux/sched.h> 2017-03-02 08:42:37 +01:00
mmzone.h tile: fix some -Wsign-compare warnings 2013-08-30 11:56:50 -04:00
module.h arch/tile: Allow tilegx to build with either 16K or 64K page size 2012-05-25 12:48:24 -04:00
page.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2016-01-18 12:57:18 -08:00
pci.h PCI: Move pci_dma_* helpers to common code 2016-03-07 10:40:02 -06:00
percpu.h tile: use a more conservative __my_cpu_offset in CONFIG_PREEMPT 2013-09-30 10:34:41 -04:00
perf_event.h tile/perf: Support perf_events on tilegx and tilepro 2014-03-07 11:19:48 -05:00
pgalloc.h arch/tile: Allow tilegx to build with either 16K or 64K page size 2012-05-25 12:48:24 -04:00
pgtable.h arch: fix has_transparent_hugepage() 2016-05-19 19:12:14 -07:00
pgtable_32.h arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
pgtable_64.h arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
pmc.h tile: Add support for handling PMC hardware 2014-03-07 11:19:47 -05:00
processor.h arch: remove unused macro/function thread_saved_pc() 2017-06-28 16:13:57 -07:00
ptrace.h tile: don't assume user privilege is zero 2013-09-03 14:45:52 -04:00
sections.h tile: use __ro_after_init instead of tile-specific __write_once 2016-12-16 15:32:29 -05:00
setup.h tile: allow disabling CONFIG_EARLY_PRINTK 2016-06-07 16:55:20 -04:00
sigframe.h
signal.h UAPI: (Scripted) Disintegrate arch/tile/include/asm 2012-10-09 09:47:47 +01:00
smp.h tile: support arch_irq_work_raise 2015-04-17 12:58:44 -04:00
spinlock.h
spinlock_32.h arch: Remove spin_unlock_wait() arch-specific definitions 2017-08-17 08:08:59 -07:00
spinlock_64.h arch: Remove spin_unlock_wait() arch-specific definitions 2017-08-17 08:08:59 -07:00
spinlock_types.h
stack.h sched/headers: Prepare for new header dependencies before moving code to <linux/sched/debug.h> 2017-03-02 08:42:34 +01:00
string.h tile: optimize strnlen using SIMD instructions 2013-08-01 20:08:51 -04:00
switch_to.h tile: Reorganize _switch_to() 2015-08-08 10:29:21 +02:00
syscall.h tile: enable full SECCOMP support 2015-07-30 12:32:16 -04:00
syscalls.h tile: move declaration of sys_call_table to <asm/syscall.h> 2013-03-21 15:39:35 -04:00
thread_info.h signal: consolidate {TS,TLF}_RESTORE_SIGMASK code 2016-08-02 19:35:23 -04:00
tile-desc.h arch/tile: factor out <arch/opcode.h> header 2011-11-03 16:58:54 -04:00
tile-desc_32.h arch/tile: factor out <arch/opcode.h> header 2011-11-03 16:58:54 -04:00
tile-desc_64.h arch/tile: factor out <arch/opcode.h> header 2011-11-03 16:58:54 -04:00
timex.h Disintegrate asm/system.h for Tile 2012-03-28 18:30:03 +01:00
tlb.h
tlbflush.h arch/tile: support multiple huge page sizes dynamically 2012-05-25 12:48:27 -04:00
topology.h numa: remove stale node_has_online_mem() define 2016-01-18 14:49:33 -05:00
traps.h tile: support delivering NMIs for multicore backtrace 2015-05-11 11:22:31 -04:00
uaccess.h Merge branch 'work.uaccess-unaligned' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-07-15 11:17:52 -07:00
unaligned.h tile: improve big-endian support 2013-08-13 16:26:05 -04:00
unistd.h burying unused conditionals 2013-02-14 09:21:15 -05:00
user.h
vdso.h tile: add clock_gettime support to vDSO 2014-10-02 13:56:07 -04:00
vga.h arch/tile: various header improvements for building drivers 2011-05-04 14:40:54 -04:00
word-at-a-time.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00