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 17:07:57 +03:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2005-04-17 02:20:36 +04:00
|
|
|
/*
|
|
|
|
* linux/arch/m68knommu/kernel/setup.c
|
|
|
|
*
|
2007-07-16 10:38:33 +04:00
|
|
|
* Copyright (C) 1999-2007 Greg Ungerer (gerg@snapgear.com)
|
|
|
|
* Copyright (C) 1998,1999 D. Jeff Dionne <jeff@uClinux.org>
|
2005-04-17 02:20:36 +04:00
|
|
|
* Copyleft ()) 2000 James D. Schettine {james@telos-systems.com}
|
|
|
|
* Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>
|
|
|
|
* Copyright (C) 1995 Hamish Macdonald
|
2005-09-02 04:42:52 +04:00
|
|
|
* Copyright (C) 2000 Lineo Inc. (www.lineo.com)
|
2005-04-17 02:20:36 +04:00
|
|
|
* Copyright (C) 2001 Lineo, Inc. <www.lineo.com>
|
|
|
|
*
|
|
|
|
* 68VZ328 Fixes/support Evan Stawnyczy <e@lineo.ca>
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file handles the architecture-dependent parts of system setup
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/sched.h>
|
|
|
|
#include <linux/delay.h>
|
|
|
|
#include <linux/interrupt.h>
|
|
|
|
#include <linux/fb.h>
|
2005-09-02 04:42:52 +04:00
|
|
|
#include <linux/module.h>
|
2008-07-24 08:28:13 +04:00
|
|
|
#include <linux/mm.h>
|
2005-04-17 02:20:36 +04:00
|
|
|
#include <linux/console.h>
|
|
|
|
#include <linux/errno.h>
|
|
|
|
#include <linux/string.h>
|
2018-07-04 09:28:16 +03:00
|
|
|
#include <linux/memblock.h>
|
2005-04-17 02:20:36 +04:00
|
|
|
#include <linux/seq_file.h>
|
|
|
|
#include <linux/init.h>
|
2009-09-18 21:49:36 +04:00
|
|
|
#include <linux/initrd.h>
|
|
|
|
#include <linux/root_dev.h>
|
2012-01-23 07:25:56 +04:00
|
|
|
#include <linux/rtc.h>
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
#include <asm/setup.h>
|
2016-09-05 08:23:50 +03:00
|
|
|
#include <asm/bootinfo.h>
|
2005-04-17 02:20:36 +04:00
|
|
|
#include <asm/irq.h>
|
|
|
|
#include <asm/machdep.h>
|
2011-08-22 11:07:40 +04:00
|
|
|
#include <asm/sections.h>
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
unsigned long memory_start;
|
|
|
|
unsigned long memory_end;
|
|
|
|
|
2005-09-02 04:42:52 +04:00
|
|
|
EXPORT_SYMBOL(memory_start);
|
|
|
|
EXPORT_SYMBOL(memory_end);
|
|
|
|
|
2007-02-12 11:54:14 +03:00
|
|
|
char __initdata command_line[COMMAND_LINE_SIZE];
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
/* machine dependent timer functions */
|
2020-09-24 18:29:17 +03:00
|
|
|
void (*mach_sched_init)(void) __initdata = NULL;
|
2012-01-23 07:25:56 +04:00
|
|
|
int (*mach_hwclk) (int, struct rtc_time*);
|
2007-07-16 10:38:33 +04:00
|
|
|
|
|
|
|
/* machine dependent reboot functions */
|
|
|
|
void (*mach_reset)(void);
|
|
|
|
void (*mach_halt)(void);
|
|
|
|
void (*mach_power_off)(void);
|
2005-04-17 02:20:36 +04:00
|
|
|
|
2013-02-15 01:18:34 +04:00
|
|
|
#ifdef CONFIG_M68000
|
2014-04-05 12:05:45 +04:00
|
|
|
#if defined(CONFIG_M68328)
|
2010-11-02 10:13:27 +03:00
|
|
|
#define CPU_NAME "MC68328"
|
2014-04-05 12:05:45 +04:00
|
|
|
#elif defined(CONFIG_M68EZ328)
|
2010-11-02 10:13:27 +03:00
|
|
|
#define CPU_NAME "MC68EZ328"
|
2014-04-05 12:05:45 +04:00
|
|
|
#elif defined(CONFIG_M68VZ328)
|
2010-11-02 10:13:27 +03:00
|
|
|
#define CPU_NAME "MC68VZ328"
|
2014-04-05 12:05:45 +04:00
|
|
|
#else
|
|
|
|
#define CPU_NAME "MC68000"
|
2005-04-17 02:20:36 +04:00
|
|
|
#endif
|
2014-04-05 12:05:45 +04:00
|
|
|
#endif /* CONFIG_M68000 */
|
2010-11-02 10:13:27 +03:00
|
|
|
#ifndef CPU_NAME
|
|
|
|
#define CPU_NAME "UNKNOWN"
|
2005-04-17 02:20:36 +04:00
|
|
|
#endif
|
|
|
|
|
2010-11-02 10:40:37 +03:00
|
|
|
/*
|
|
|
|
* Different cores have different instruction execution timings.
|
|
|
|
* The old/traditional 68000 cores are basically all the same, at 16.
|
|
|
|
* The ColdFire cores vary a little, their values are defined in their
|
|
|
|
* headers. We default to the standard 68000 value here.
|
|
|
|
*/
|
|
|
|
#ifndef CPU_INSTR_PER_JIFFY
|
|
|
|
#define CPU_INSTR_PER_JIFFY 16
|
|
|
|
#endif
|
|
|
|
|
2007-10-24 06:03:41 +04:00
|
|
|
void __init setup_arch(char **cmdline_p)
|
2005-04-17 02:20:36 +04:00
|
|
|
{
|
|
|
|
memory_start = PAGE_ALIGN(_ramstart);
|
2007-07-16 10:38:33 +04:00
|
|
|
memory_end = _ramend;
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
init_mm.start_code = (unsigned long) &_stext;
|
|
|
|
init_mm.end_code = (unsigned long) &_etext;
|
|
|
|
init_mm.end_data = (unsigned long) &_edata;
|
2005-09-02 04:42:52 +04:00
|
|
|
init_mm.brk = (unsigned long) 0;
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
config_BSP(&command_line[0], sizeof(command_line));
|
|
|
|
|
2007-07-25 16:07:20 +04:00
|
|
|
#if defined(CONFIG_BOOTPARAM)
|
|
|
|
strncpy(&command_line[0], CONFIG_BOOTPARAM_STRING, sizeof(command_line));
|
|
|
|
command_line[sizeof(command_line) - 1] = 0;
|
2009-09-18 21:49:36 +04:00
|
|
|
#endif /* CONFIG_BOOTPARAM */
|
|
|
|
|
2016-09-05 08:23:50 +03:00
|
|
|
process_uboot_commandline(&command_line[0], sizeof(command_line));
|
2007-07-25 16:07:20 +04:00
|
|
|
|
2016-09-09 10:01:06 +03:00
|
|
|
pr_info("uClinux with CPU " CPU_NAME "\n");
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
#ifdef CONFIG_UCDIMM
|
2016-09-09 10:01:06 +03:00
|
|
|
pr_info("uCdimm by Lineo, Inc. <www.lineo.com>\n");
|
2005-04-17 02:20:36 +04:00
|
|
|
#endif
|
2020-10-30 17:26:24 +03:00
|
|
|
#ifdef CONFIG_M68328
|
|
|
|
pr_info("68328 support D. Jeff Dionne <jeff@uclinux.org>\n");
|
|
|
|
pr_info("68328 support Kenneth Albanowski <kjahds@kjshds.com>\n");
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_M68EZ328
|
|
|
|
pr_info("68EZ328 DragonBallEZ support (C) 1999 Rt-Control, Inc\n");
|
|
|
|
#endif
|
2005-04-17 02:20:36 +04:00
|
|
|
#ifdef CONFIG_M68VZ328
|
2016-09-09 10:01:06 +03:00
|
|
|
pr_info("M68VZ328 support by Evan Stawnyczy <e@lineo.ca>\n");
|
2020-10-30 17:26:24 +03:00
|
|
|
pr_info("68VZ328 DragonBallVZ support (c) 2001 Lineo, Inc.\n");
|
2005-04-17 02:20:36 +04:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_COLDFIRE
|
2016-09-09 10:01:06 +03:00
|
|
|
pr_info("COLDFIRE port done by Greg Ungerer, gerg@snapgear.com\n");
|
2005-04-17 02:20:36 +04:00
|
|
|
#ifdef CONFIG_M5307
|
2016-09-09 10:01:06 +03:00
|
|
|
pr_info("Modified for M5307 by Dave Miller, dmiller@intellistor.com\n");
|
2005-04-17 02:20:36 +04:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_ELITE
|
2016-09-09 10:01:06 +03:00
|
|
|
pr_info("Modified for M5206eLITE by Rob Scott, rscott@mtrob.fdns.net\n");
|
2005-09-02 04:42:52 +04:00
|
|
|
#endif
|
2005-04-17 02:20:36 +04:00
|
|
|
#endif
|
2016-09-09 10:01:06 +03:00
|
|
|
pr_info("Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne\n");
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
#if defined( CONFIG_PILOT ) && defined( CONFIG_M68328 )
|
2020-10-30 17:26:24 +03:00
|
|
|
pr_info("68328/Pilot support Bernhard Kuhn <kuhn@lpr.e-technik.tu-muenchen.de>\n");
|
2016-09-09 10:01:06 +03:00
|
|
|
pr_info("TRG SuperPilot FLASH card support <info@trgnet.com>\n");
|
2005-04-17 02:20:36 +04:00
|
|
|
#endif
|
|
|
|
#if defined( CONFIG_PILOT ) && defined( CONFIG_M68EZ328 )
|
2016-09-09 10:01:06 +03:00
|
|
|
pr_info("PalmV support by Lineo Inc. <jeff@uclinux.com>\n");
|
2005-04-17 02:20:36 +04:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_DRAGEN2
|
2016-09-09 10:01:06 +03:00
|
|
|
pr_info("DragonEngine II board support by Georges Menie\n");
|
2005-04-17 02:20:36 +04:00
|
|
|
#endif
|
2005-09-02 04:42:52 +04:00
|
|
|
#ifdef CONFIG_M5235EVB
|
2016-09-09 10:01:06 +03:00
|
|
|
pr_info("Motorola M5235EVB support (C)2005 Syn-tech Systems, Inc. (Jate Sujjavanich)\n");
|
2005-09-02 04:42:52 +04:00
|
|
|
#endif
|
2005-04-17 02:20:36 +04:00
|
|
|
|
2012-05-31 23:39:13 +04:00
|
|
|
pr_debug("KERNEL -> TEXT=0x%p-0x%p DATA=0x%p-0x%p BSS=0x%p-0x%p\n",
|
2012-05-31 23:46:03 +04:00
|
|
|
_stext, _etext, _sdata, _edata, __bss_start, __bss_stop);
|
2012-05-31 23:39:13 +04:00
|
|
|
pr_debug("MEMORY -> ROMFS=0x%p-0x%06lx MEM=0x%06lx-0x%06lx\n ",
|
2012-05-31 23:46:03 +04:00
|
|
|
__bss_stop, memory_start, memory_start, memory_end);
|
2005-04-17 02:20:36 +04:00
|
|
|
|
2020-06-17 09:53:40 +03:00
|
|
|
memblock_add(_rambase, memory_end - _rambase);
|
|
|
|
memblock_reserve(_rambase, memory_start - _rambase);
|
2018-07-04 09:28:16 +03:00
|
|
|
|
2005-04-17 02:20:36 +04:00
|
|
|
/* Keep a copy of command line */
|
|
|
|
*cmdline_p = &command_line[0];
|
2007-02-12 11:54:14 +03:00
|
|
|
memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
|
|
|
|
boot_command_line[COMMAND_LINE_SIZE-1] = 0;
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Give all the memory to the bootmap allocator, tell it to put the
|
|
|
|
* boot mem_map at the start of memory.
|
|
|
|
*/
|
2015-11-15 13:46:55 +03:00
|
|
|
min_low_pfn = PFN_DOWN(memory_start);
|
|
|
|
max_pfn = max_low_pfn = PFN_DOWN(memory_end);
|
|
|
|
|
2009-09-18 21:49:36 +04:00
|
|
|
#if defined(CONFIG_UBOOT) && defined(CONFIG_BLK_DEV_INITRD)
|
|
|
|
if ((initrd_start > 0) && (initrd_start < initrd_end) &&
|
|
|
|
(initrd_end < memory_end))
|
2018-07-04 09:28:16 +03:00
|
|
|
memblock_reserve(initrd_start, initrd_end - initrd_start);
|
2009-09-18 21:49:36 +04:00
|
|
|
#endif /* if defined(CONFIG_BLK_DEV_INITRD) */
|
|
|
|
|
2005-04-17 02:20:36 +04:00
|
|
|
/*
|
|
|
|
* Get kmalloc into gear.
|
|
|
|
*/
|
|
|
|
paging_init();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Get CPU information for use by the procfs.
|
|
|
|
*/
|
|
|
|
static int show_cpuinfo(struct seq_file *m, void *v)
|
|
|
|
{
|
2007-07-20 11:31:47 +04:00
|
|
|
char *cpu, *mmu, *fpu;
|
|
|
|
u_long clockfreq;
|
2005-04-17 02:20:36 +04:00
|
|
|
|
2010-11-02 10:13:27 +03:00
|
|
|
cpu = CPU_NAME;
|
2007-07-20 11:31:47 +04:00
|
|
|
mmu = "none";
|
|
|
|
fpu = "none";
|
2010-11-02 10:40:37 +03:00
|
|
|
clockfreq = (loops_per_jiffy * HZ) * CPU_INSTR_PER_JIFFY;
|
2007-07-20 11:31:47 +04:00
|
|
|
|
|
|
|
seq_printf(m, "CPU:\t\t%s\n"
|
|
|
|
"MMU:\t\t%s\n"
|
|
|
|
"FPU:\t\t%s\n"
|
|
|
|
"Clocking:\t%lu.%1luMHz\n"
|
|
|
|
"BogoMips:\t%lu.%02lu\n"
|
|
|
|
"Calibration:\t%lu loops\n",
|
|
|
|
cpu, mmu, fpu,
|
|
|
|
clockfreq / 1000000,
|
|
|
|
(clockfreq / 100000) % 10,
|
|
|
|
(loops_per_jiffy * HZ) / 500000,
|
|
|
|
((loops_per_jiffy * HZ) / 5000) % 100,
|
|
|
|
(loops_per_jiffy * HZ));
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void *c_start(struct seq_file *m, loff_t *pos)
|
|
|
|
{
|
|
|
|
return *pos < NR_CPUS ? ((void *) 0x12345678) : NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void *c_next(struct seq_file *m, void *v, loff_t *pos)
|
|
|
|
{
|
|
|
|
++*pos;
|
|
|
|
return c_start(m, pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void c_stop(struct seq_file *m, void *v)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-02-08 15:21:19 +03:00
|
|
|
const struct seq_operations cpuinfo_op = {
|
2005-04-17 02:20:36 +04:00
|
|
|
.start = c_start,
|
|
|
|
.next = c_next,
|
|
|
|
.stop = c_stop,
|
|
|
|
.show = show_cpuinfo,
|
|
|
|
};
|
|
|
|
|