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 14:07:57 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2005-04-16 22:20:36 +00:00
|
|
|
#ifndef S390_CIO_H
|
|
|
|
#define S390_CIO_H
|
|
|
|
|
2006-07-12 14:39:50 +00:00
|
|
|
#include <linux/mutex.h>
|
2007-04-27 14:01:31 +00:00
|
|
|
#include <linux/device.h>
|
2008-07-14 07:58:44 +00:00
|
|
|
#include <linux/mod_devicetable.h>
|
2007-04-27 14:01:35 +00:00
|
|
|
#include <asm/chpid.h>
|
2008-07-14 07:58:51 +00:00
|
|
|
#include <asm/cio.h>
|
|
|
|
#include <asm/fcx.h>
|
2008-07-14 07:59:05 +00:00
|
|
|
#include <asm/schid.h>
|
2021-05-10 19:10:15 +00:00
|
|
|
#include <asm/tpi.h>
|
2007-04-27 14:01:35 +00:00
|
|
|
#include "chsc.h"
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* path management control word
|
|
|
|
*/
|
|
|
|
struct pmcw {
|
2008-01-26 13:10:43 +00:00
|
|
|
u32 intparm; /* interruption parameter */
|
|
|
|
u32 qf : 1; /* qdio facility */
|
2008-07-14 07:58:48 +00:00
|
|
|
u32 w : 1;
|
2008-01-26 13:10:43 +00:00
|
|
|
u32 isc : 3; /* interruption sublass */
|
|
|
|
u32 res5 : 3; /* reserved zeros */
|
|
|
|
u32 ena : 1; /* enabled */
|
|
|
|
u32 lm : 2; /* limit mode */
|
|
|
|
u32 mme : 2; /* measurement-mode enable */
|
|
|
|
u32 mp : 1; /* multipath mode */
|
|
|
|
u32 tf : 1; /* timing facility */
|
|
|
|
u32 dnv : 1; /* device number valid */
|
|
|
|
u32 dev : 16; /* device number */
|
|
|
|
u8 lpm; /* logical path mask */
|
|
|
|
u8 pnom; /* path not operational mask */
|
|
|
|
u8 lpum; /* last path used mask */
|
|
|
|
u8 pim; /* path installed mask */
|
|
|
|
u16 mbi; /* measurement-block index */
|
|
|
|
u8 pom; /* path operational mask */
|
|
|
|
u8 pam; /* path available mask */
|
|
|
|
u8 chpid[8]; /* CHPID 0-7 (if available) */
|
|
|
|
u32 unused1 : 8; /* reserved zeros */
|
|
|
|
u32 st : 3; /* subchannel type */
|
|
|
|
u32 unused2 : 18; /* reserved zeros */
|
|
|
|
u32 mbfc : 1; /* measurement block format control */
|
|
|
|
u32 xmwme : 1; /* extended measurement word mode enable */
|
|
|
|
u32 csense : 1; /* concurrent sense; can be enabled ...*/
|
2005-04-16 22:20:36 +00:00
|
|
|
/* ... per MSCH, however, if facility */
|
|
|
|
/* ... is not installed, this results */
|
|
|
|
/* ... in an operand exception. */
|
|
|
|
} __attribute__ ((packed));
|
|
|
|
|
2008-12-25 12:39:13 +00:00
|
|
|
/* Target SCHIB configuration. */
|
|
|
|
struct schib_config {
|
|
|
|
u64 mba;
|
|
|
|
u32 intparm;
|
|
|
|
u16 mbi;
|
|
|
|
u32 isc:3;
|
|
|
|
u32 ena:1;
|
|
|
|
u32 mme:2;
|
|
|
|
u32 mp:1;
|
|
|
|
u32 csense:1;
|
|
|
|
u32 mbfc:1;
|
|
|
|
} __attribute__ ((packed));
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
/*
|
|
|
|
* subchannel information block
|
|
|
|
*/
|
|
|
|
struct schib {
|
|
|
|
struct pmcw pmcw; /* path management control word */
|
2008-07-14 07:58:50 +00:00
|
|
|
union scsw scsw; /* subchannel status word */
|
2005-04-16 22:20:36 +00:00
|
|
|
__u64 mba; /* measurement block address */
|
|
|
|
__u8 mda[4]; /* model dependent area */
|
|
|
|
} __attribute__ ((packed,aligned(4)));
|
|
|
|
|
2011-12-01 12:32:19 +00:00
|
|
|
/*
|
|
|
|
* When rescheduled, todo's with higher values will overwrite those
|
|
|
|
* with lower values.
|
|
|
|
*/
|
2009-12-07 11:51:18 +00:00
|
|
|
enum sch_todo {
|
|
|
|
SCH_TODO_NOTHING,
|
2011-12-01 12:32:19 +00:00
|
|
|
SCH_TODO_EVAL,
|
2009-12-07 11:51:18 +00:00
|
|
|
SCH_TODO_UNREG,
|
|
|
|
};
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
/* subchannel data structure used by I/O subroutines */
|
|
|
|
struct subchannel {
|
2006-01-06 08:19:21 +00:00
|
|
|
struct subchannel_id schid;
|
2023-11-01 11:57:51 +00:00
|
|
|
spinlock_t lock; /* subchannel lock */
|
2006-07-12 14:39:50 +00:00
|
|
|
struct mutex reg_mutex;
|
2005-04-16 22:20:36 +00:00
|
|
|
enum {
|
|
|
|
SUBCHANNEL_TYPE_IO = 0,
|
|
|
|
SUBCHANNEL_TYPE_CHSC = 1,
|
2008-01-26 13:10:45 +00:00
|
|
|
SUBCHANNEL_TYPE_MSG = 2,
|
2005-04-16 22:20:36 +00:00
|
|
|
SUBCHANNEL_TYPE_ADM = 3,
|
|
|
|
} st; /* subchannel type */
|
|
|
|
__u8 vpm; /* verified path mask */
|
|
|
|
__u8 lpm; /* logical path mask */
|
|
|
|
__u8 opm; /* operational path mask */
|
|
|
|
struct schib schib; /* subchannel information block */
|
2008-04-30 11:38:39 +00:00
|
|
|
int isc; /* desired interruption subclass */
|
2007-04-27 14:01:35 +00:00
|
|
|
struct chsc_ssd_info ssd_info; /* subchannel description */
|
2005-04-16 22:20:36 +00:00
|
|
|
struct device dev; /* entry in device tree */
|
|
|
|
struct css_driver *driver;
|
2009-12-07 11:51:18 +00:00
|
|
|
enum sch_todo todo;
|
|
|
|
struct work_struct todo_work;
|
2008-12-25 12:39:13 +00:00
|
|
|
struct schib_config config;
|
2019-09-30 15:38:02 +00:00
|
|
|
u64 dma_mask;
|
2022-04-19 11:34:29 +00:00
|
|
|
/*
|
|
|
|
* Driver name to force a match. Do not set directly, because core
|
|
|
|
* frees it. Use driver_set_override() to set or clear it.
|
|
|
|
*/
|
|
|
|
const char *driver_override;
|
2005-04-16 22:20:36 +00:00
|
|
|
} __attribute__ ((aligned(8)));
|
|
|
|
|
2019-04-08 21:26:20 +00:00
|
|
|
DECLARE_PER_CPU_ALIGNED(struct irb, cio_irb);
|
2014-05-27 12:40:39 +00:00
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
#define to_subchannel(n) container_of(n, struct subchannel, dev)
|
|
|
|
|
2008-04-30 11:38:39 +00:00
|
|
|
extern int cio_enable_subchannel(struct subchannel *, u32);
|
2005-04-16 22:20:36 +00:00
|
|
|
extern int cio_disable_subchannel (struct subchannel *);
|
|
|
|
extern int cio_cancel (struct subchannel *);
|
|
|
|
extern int cio_clear (struct subchannel *);
|
2017-03-17 03:17:28 +00:00
|
|
|
extern int cio_cancel_halt_clear(struct subchannel *, int *);
|
2005-04-16 22:20:36 +00:00
|
|
|
extern int cio_resume (struct subchannel *);
|
|
|
|
extern int cio_halt (struct subchannel *);
|
|
|
|
extern int cio_start (struct subchannel *, struct ccw1 *, __u8);
|
|
|
|
extern int cio_start_key (struct subchannel *, struct ccw1 *, __u8, __u8);
|
|
|
|
extern int cio_set_options (struct subchannel *, int);
|
2008-12-25 12:39:12 +00:00
|
|
|
extern int cio_update_schib(struct subchannel *sch);
|
2008-12-25 12:39:13 +00:00
|
|
|
extern int cio_commit_config(struct subchannel *sch);
|
2006-01-06 08:19:21 +00:00
|
|
|
|
2008-07-14 07:58:51 +00:00
|
|
|
int cio_tm_start_key(struct subchannel *sch, struct tcw *tcw, u8 lpm, u8 key);
|
|
|
|
int cio_tm_intrg(struct subchannel *sch);
|
|
|
|
|
2018-09-13 16:57:16 +00:00
|
|
|
extern int __init airq_init(void);
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
/* Use with care. */
|
|
|
|
#ifdef CONFIG_CCW_CONSOLE
|
|
|
|
extern struct subchannel *cio_probe_console(void);
|
2006-01-06 08:19:21 +00:00
|
|
|
extern int cio_is_console(struct subchannel_id);
|
2013-04-13 11:03:54 +00:00
|
|
|
extern void cio_register_early_subchannels(void);
|
2013-04-13 10:53:21 +00:00
|
|
|
extern void cio_tsch(struct subchannel *sch);
|
2005-04-16 22:20:36 +00:00
|
|
|
#else
|
2006-01-06 08:19:21 +00:00
|
|
|
#define cio_is_console(schid) 0
|
2013-04-13 11:03:54 +00:00
|
|
|
static inline void cio_register_early_subchannels(void) {}
|
2005-04-16 22:20:36 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|