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 */
|
2005-04-17 06:20:36 +08:00
|
|
|
#ifndef __ALPHA_HWRPB_H
|
|
|
|
#define __ALPHA_HWRPB_H
|
|
|
|
|
|
|
|
#define INIT_HWRPB ((struct hwrpb_struct *) 0x10000000)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* DEC processor types for Alpha systems. Found in HWRPB.
|
|
|
|
* These values are architected.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define EV3_CPU 1 /* EV3 */
|
|
|
|
#define EV4_CPU 2 /* EV4 (21064) */
|
|
|
|
#define LCA4_CPU 4 /* LCA4 (21066/21068) */
|
|
|
|
#define EV5_CPU 5 /* EV5 (21164) */
|
|
|
|
#define EV45_CPU 6 /* EV4.5 (21064/xxx) */
|
|
|
|
#define EV56_CPU 7 /* EV5.6 (21164) */
|
|
|
|
#define EV6_CPU 8 /* EV6 (21264) */
|
|
|
|
#define PCA56_CPU 9 /* PCA56 (21164PC) */
|
|
|
|
#define PCA57_CPU 10 /* PCA57 (notyet) */
|
|
|
|
#define EV67_CPU 11 /* EV67 (21264A) */
|
|
|
|
#define EV68CB_CPU 12 /* EV68CB (21264C) */
|
|
|
|
#define EV68AL_CPU 13 /* EV68AL (21264B) */
|
|
|
|
#define EV68CX_CPU 14 /* EV68CX (21264D) */
|
|
|
|
#define EV7_CPU 15 /* EV7 (21364) */
|
|
|
|
#define EV79_CPU 16 /* EV79 (21364??) */
|
|
|
|
#define EV69_CPU 17 /* EV69 (21264/EV69A) */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* DEC system types for Alpha systems. Found in HWRPB.
|
|
|
|
* These values are architected.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define ST_ADU 1 /* Alpha ADU systype */
|
|
|
|
#define ST_DEC_4000 2 /* Cobra systype */
|
|
|
|
#define ST_DEC_7000 3 /* Ruby systype */
|
|
|
|
#define ST_DEC_3000_500 4 /* Flamingo systype */
|
|
|
|
#define ST_DEC_2000_300 6 /* Jensen systype */
|
|
|
|
#define ST_DEC_3000_300 7 /* Pelican systype */
|
|
|
|
#define ST_DEC_2100_A500 9 /* Sable systype */
|
|
|
|
#define ST_DEC_AXPVME_64 10 /* AXPvme system type */
|
|
|
|
#define ST_DEC_AXPPCI_33 11 /* NoName system type */
|
|
|
|
#define ST_DEC_TLASER 12 /* Turbolaser systype */
|
|
|
|
#define ST_DEC_2100_A50 13 /* Avanti systype */
|
|
|
|
#define ST_DEC_MUSTANG 14 /* Mustang systype */
|
|
|
|
#define ST_DEC_ALCOR 15 /* Alcor (EV5) systype */
|
|
|
|
#define ST_DEC_1000 17 /* Mikasa systype */
|
|
|
|
#define ST_DEC_EB64 18 /* EB64 systype */
|
|
|
|
#define ST_DEC_EB66 19 /* EB66 systype */
|
|
|
|
#define ST_DEC_EB64P 20 /* EB64+ systype */
|
|
|
|
#define ST_DEC_BURNS 21 /* laptop systype */
|
|
|
|
#define ST_DEC_RAWHIDE 22 /* Rawhide systype */
|
|
|
|
#define ST_DEC_K2 23 /* K2 systype */
|
|
|
|
#define ST_DEC_LYNX 24 /* Lynx systype */
|
|
|
|
#define ST_DEC_XL 25 /* Alpha XL systype */
|
|
|
|
#define ST_DEC_EB164 26 /* EB164 systype */
|
|
|
|
#define ST_DEC_NORITAKE 27 /* Noritake systype */
|
|
|
|
#define ST_DEC_CORTEX 28 /* Cortex systype */
|
|
|
|
#define ST_DEC_MIATA 30 /* Miata systype */
|
|
|
|
#define ST_DEC_XXM 31 /* XXM systype */
|
|
|
|
#define ST_DEC_TAKARA 32 /* Takara systype */
|
|
|
|
#define ST_DEC_YUKON 33 /* Yukon systype */
|
|
|
|
#define ST_DEC_TSUNAMI 34 /* Tsunami systype */
|
|
|
|
#define ST_DEC_WILDFIRE 35 /* Wildfire systype */
|
|
|
|
#define ST_DEC_CUSCO 36 /* CUSCO systype */
|
|
|
|
#define ST_DEC_EIGER 37 /* Eiger systype */
|
|
|
|
#define ST_DEC_TITAN 38 /* Titan systype */
|
|
|
|
#define ST_DEC_MARVEL 39 /* Marvel systype */
|
|
|
|
|
|
|
|
/* UNOFFICIAL!!! */
|
|
|
|
#define ST_UNOFFICIAL_BIAS 100
|
|
|
|
#define ST_DTI_RUFFIAN 101 /* RUFFIAN systype */
|
|
|
|
|
|
|
|
/* Alpha Processor, Inc. systems */
|
|
|
|
#define ST_API_BIAS 200
|
|
|
|
#define ST_API_NAUTILUS 201 /* UP1000 systype */
|
|
|
|
|
|
|
|
struct pcb_struct {
|
|
|
|
unsigned long ksp;
|
|
|
|
unsigned long usp;
|
|
|
|
unsigned long ptbr;
|
|
|
|
unsigned int pcc;
|
|
|
|
unsigned int asn;
|
|
|
|
unsigned long unique;
|
|
|
|
unsigned long flags;
|
|
|
|
unsigned long res1, res2;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct percpu_struct {
|
|
|
|
unsigned long hwpcb[16];
|
|
|
|
unsigned long flags;
|
|
|
|
unsigned long pal_mem_size;
|
|
|
|
unsigned long pal_scratch_size;
|
|
|
|
unsigned long pal_mem_pa;
|
|
|
|
unsigned long pal_scratch_pa;
|
|
|
|
unsigned long pal_revision;
|
|
|
|
unsigned long type;
|
|
|
|
unsigned long variation;
|
|
|
|
unsigned long revision;
|
|
|
|
unsigned long serial_no[2];
|
|
|
|
unsigned long logout_area_pa;
|
|
|
|
unsigned long logout_area_len;
|
|
|
|
unsigned long halt_PCBB;
|
|
|
|
unsigned long halt_PC;
|
|
|
|
unsigned long halt_PS;
|
|
|
|
unsigned long halt_arg;
|
|
|
|
unsigned long halt_ra;
|
|
|
|
unsigned long halt_pv;
|
|
|
|
unsigned long halt_reason;
|
|
|
|
unsigned long res;
|
|
|
|
unsigned long ipc_buffer[21];
|
|
|
|
unsigned long palcode_avail[16];
|
|
|
|
unsigned long compatibility;
|
|
|
|
unsigned long console_data_log_pa;
|
|
|
|
unsigned long console_data_log_length;
|
|
|
|
unsigned long bcache_info;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct procdesc_struct {
|
|
|
|
unsigned long weird_vms_stuff;
|
|
|
|
unsigned long address;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct vf_map_struct {
|
|
|
|
unsigned long va;
|
|
|
|
unsigned long pa;
|
|
|
|
unsigned long count;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct crb_struct {
|
|
|
|
struct procdesc_struct * dispatch_va;
|
|
|
|
struct procdesc_struct * dispatch_pa;
|
|
|
|
struct procdesc_struct * fixup_va;
|
|
|
|
struct procdesc_struct * fixup_pa;
|
|
|
|
/* virtual->physical map */
|
|
|
|
unsigned long map_entries;
|
|
|
|
unsigned long map_pages;
|
|
|
|
struct vf_map_struct map[1];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct memclust_struct {
|
|
|
|
unsigned long start_pfn;
|
|
|
|
unsigned long numpages;
|
|
|
|
unsigned long numtested;
|
|
|
|
unsigned long bitmap_va;
|
|
|
|
unsigned long bitmap_pa;
|
|
|
|
unsigned long bitmap_chksum;
|
|
|
|
unsigned long usage;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct memdesc_struct {
|
|
|
|
unsigned long chksum;
|
|
|
|
unsigned long optional_pa;
|
|
|
|
unsigned long numclusters;
|
|
|
|
struct memclust_struct cluster[0];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct dsr_struct {
|
|
|
|
long smm; /* SMM nubber used by LMF */
|
|
|
|
unsigned long lurt_off; /* offset to LURT table */
|
|
|
|
unsigned long sysname_off; /* offset to sysname char count */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct hwrpb_struct {
|
|
|
|
unsigned long phys_addr; /* check: physical address of the hwrpb */
|
|
|
|
unsigned long id; /* check: "HWRPB\0\0\0" */
|
|
|
|
unsigned long revision;
|
|
|
|
unsigned long size; /* size of hwrpb */
|
|
|
|
unsigned long cpuid;
|
|
|
|
unsigned long pagesize; /* 8192, I hope */
|
|
|
|
unsigned long pa_bits; /* number of physical address bits */
|
|
|
|
unsigned long max_asn;
|
|
|
|
unsigned char ssn[16]; /* system serial number: big bother is watching */
|
|
|
|
unsigned long sys_type;
|
|
|
|
unsigned long sys_variation;
|
|
|
|
unsigned long sys_revision;
|
|
|
|
unsigned long intr_freq; /* interval clock frequency * 4096 */
|
|
|
|
unsigned long cycle_freq; /* cycle counter frequency */
|
|
|
|
unsigned long vptb; /* Virtual Page Table Base address */
|
|
|
|
unsigned long res1;
|
|
|
|
unsigned long tbhb_offset; /* Translation Buffer Hint Block */
|
|
|
|
unsigned long nr_processors;
|
|
|
|
unsigned long processor_size;
|
|
|
|
unsigned long processor_offset;
|
|
|
|
unsigned long ctb_nr;
|
|
|
|
unsigned long ctb_size; /* console terminal block size */
|
|
|
|
unsigned long ctbt_offset; /* console terminal block table offset */
|
|
|
|
unsigned long crb_offset; /* console callback routine block */
|
|
|
|
unsigned long mddt_offset; /* memory data descriptor table */
|
|
|
|
unsigned long cdb_offset; /* configuration data block (or NULL) */
|
|
|
|
unsigned long frut_offset; /* FRU table (or NULL) */
|
|
|
|
void (*save_terminal)(unsigned long);
|
|
|
|
unsigned long save_terminal_data;
|
|
|
|
void (*restore_terminal)(unsigned long);
|
|
|
|
unsigned long restore_terminal_data;
|
|
|
|
void (*CPU_restart)(unsigned long);
|
|
|
|
unsigned long CPU_restart_data;
|
|
|
|
unsigned long res2;
|
|
|
|
unsigned long res3;
|
|
|
|
unsigned long chksum;
|
|
|
|
unsigned long rxrdy;
|
|
|
|
unsigned long txrdy;
|
|
|
|
unsigned long dsr_offset; /* "Dynamic System Recognition Data Block Table" */
|
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef __KERNEL__
|
|
|
|
|
|
|
|
extern struct hwrpb_struct *hwrpb;
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
hwrpb_update_checksum(struct hwrpb_struct *h)
|
|
|
|
{
|
|
|
|
unsigned long sum = 0, *l;
|
|
|
|
for (l = (unsigned long *) h; l < (unsigned long *) &h->chksum; ++l)
|
|
|
|
sum += *l;
|
|
|
|
h->chksum = sum;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* __KERNEL__ */
|
|
|
|
|
|
|
|
#endif /* __ALPHA_HWRPB_H */
|