summaryrefslogtreecommitdiff
path: root/arch/sh/oprofile
AgeCommit message (Collapse)Author
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman
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>
2016-12-24Replace <asm/uaccess.h> with <linux/uaccess.h> globallyLinus Torvalds
This was entirely automated, using the script by Al: PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*<asm/uaccess.h>' sed -i -e "s!$PATT!#include <linux/uaccess.h>!" \ $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h) to do the replacement at the end of the merge window. Requested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-12-23oprofile, arm/sh: Fix oprofile_arch_exit() linkage issueVladimir Zapolskiy
This change fixes a linking problem, which happens if oprofile is selected to be compiled as built-in: `oprofile_arch_exit' referenced in section `.init.text' of arch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' of arch/arm/oprofile/built-in.o The problem is appeared after commit 87121ca504, which introduced oprofile_arch_exit() calls from __init function. Note that the aforementioned commit has been backported to stable branches, and the problem is known to be reproduced at least with 3.0.13 and 3.1.5 kernels. Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@nokia.com> Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: Will Deacon <will.deacon@arm.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Cc: <stable@kernel.org> Link: http://lkml.kernel.org/r/20111222151540.GB16765@erda.amd.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-05-23sh: remove warning and warning_symbol from struct stacktrace_opsRichard Weinberger
Both warning and warning_symbol are nowhere used. Let's get rid of them. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-27sh: oprofile: Make sure the backtrace op is available for timer-fallback.Paul Mundt
Presently with hardware counter support disabled the backtrace op never gets initialized. This is a regression over the previous behaviour, so simply add it back in. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-27sh64: oprofile: Fix up kernel stack pointer size mismatch.Paul Mundt
For the backtrace code its assumed that the stack pointer is 32-bits, which is not the case with the sh64 registers. Use the shared kernel_stack_pointer() helper to get at the actual register, which already takes care of the necessary typecasting. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-27sh: oprofile: Fix up and extend op_name_from_perf_id().Paul Mundt
op_name_from_perf_id() currently returns a local variable, which isn't terribly productive. As we only handle a single PMU case for now, simply allocate and free the string from the arch init/exit context and have op_name_from_perf_id() hand back the cached string. This also takes UTS_MACHINE in to account, given that we build for multiple architectures. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-11sh: oprofile: Use perf-events oprofile backendMatt Fleming
Now that we've got a generic perf-events based oprofile backend we might as well make use of it seeing as SH doesn't do anything special with its oprofile backend. Also introduce a new CONFIG_HW_PERF_EVENTS symbol so that we can fallback to using the timer interrupt for oprofile if the CPU doesn't support perf events. Also, to avoid a section mismatch warning we need to annotate oprofile_arch_exit() with an __exit marker. Signed-off-by: Matt Fleming <matt@console-pimps.org> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-11-05sh: oprofile: Fix up count size mismatch for common impl.Paul Mundt
This reduces the 'count' size in the common support structure to 32-bits so that it matches up with what oprofile is expecting. The SH7750 code was using a nasty oprofilefs hack to expose the 48-bit counter, although no other implementations were. Now that the offending driver has been killed off, it's possible to restore some semblance of sanity. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-11-05sh: oprofile: Kill off bitrotted SH7750 driver.Paul Mundt
This kills off the old SH7750 oprofile driver, preferring perf instead. As this driver has a number of bugs that no one seems to have noticed, it's safe to kill this off now rather than providing an extended transition period. The old oprofile framework is still kept in place for now, primarily to give out-of-tree drivers a chance to transition off. But this too will be killed off in short order. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-08-14sh: oprofile: Kill off dead valid_kernel_stack().Paul Mundt
This is no longer used, kill it off. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-08-13sh: Use the new stack unwinder APIMatt Fleming
Instead of implementing our own stack unwinder via dump_trace() we should use the new stack unwinder API because it is more modular. This change allows us to decouple the interface for generating stacktraces from the implementation of a stack unwinder. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-08-13sh: Use the generalized stacktrace opsMatt Fleming
Copy the stacktrace ops code from x86 and provide a central function for use by functions that need to dump a callstack. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16sh: Add support for SH7724 (SH-Mobile R2R) CPU subtype.Kuninori Morimoto
This implements initial support for the SH-Mobile R2R CPU. Based on Rev 0.11 of the initial SH7724 hardware manual. Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-03sh: Add support for SH7786 CPU subtype.Kuninori Morimoto
This adds preliminary support for the SH7786 CPU subtype. While this is a dual-core CPU, only UP is supported for now. L2 cache support is likewise not yet implemented. More information on this particular CPU subtype is available at: http://www.renesas.com/fmwk.jsp?cnt=sh7786_root.jsp&fp=/products/mpumcu/superh_family/sh7780_series/sh7786_group/ Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22sh: oprofile: Fix up the module build.Paul Mundt
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22sh: oprofile: Convert op_model_sh7750 to new common interface.Paul Mundt
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22sh: oprofile: Backtrace support.Dave Peverley
This patch improves the oprofile support on sh and adds backtrace support. Signed-off-by: Dave Peverley <dpeverley@mpc-data.co.uk> Signed-off-by: Chris Smith <chris.smith@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22sh: oprofile: Refactor common setup code for multiple driver support.Paul Mundt
This re-implements the old op_model_null code in to something more generic, where multiple drivers, backtrace, etc. can all be interfaced. Based largely on arch/mips/oprofile/common.c. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22sh: Disable -Werror for arch/sh/oprofile/.Paul Mundt
drivers/oprofile/ objects have proven to be problematic in this regard, so simply disable -Werror for now. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-27sh: oprofile: Fix up the SH7750 performance counter name.Paul Mundt
Rather than varying this on a subtype level, we use the counter type as a generic identifier. This simplifies logic in the userspace tools where no fundamental difference exists across the various subtypes. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07sh: Add -Werror for clean directories.Paul Mundt
Follow the MIPS and sparc64 changes for -Werror instrumentation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30sh: Make SH7750 oprofile compile again.Paul Mundt
Converts from the profile notifier to the timer hook. Follows the generic timer interrupt-based change. This really wants to be converted to perfmon.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-19Combine instrumentation menus in kernel/Kconfig.instrumentationMathieu Desnoyers
Quoting Randy: "It seems sad that this patch sources Kconfig.marker, a 7-line file, 20-something times. Yes, you (we) don't want to put those 7 lines into 20-something different files, so sourcing is the right thing. However, what you did for avr32 seems more on the right track to me: make _one_ Instrumentation support menu that includes PROFILING, OPROFILE, KPROBES, and MARKERS and then use (source) that in all of the arches." Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-13sh: Fixup cpu_data references for the non-boot CPUs.Paul Mundt
There are a lot of bogus cpu_data-> references that only end up working for the boot CPU, convert these to current_cpu_data to fixup SMP. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-12[PATCH] mark struct file_operations const 2Arjan van de Ven
Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. [akpm@osdl.org: sparc64 fix] Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-12-08[PATCH] struct path: convert shJosef Sipek
Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27sh: Add SH7750S/SH7091 rules for SH7750 oprofile driver.Paul Mundt
Update oprofile build rules for additional subtypes, particularly SH7750S/SH7091. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-06-26[PATCH] oprofile: Fix unnecessary clevernessMarkus Armbruster
nmi_create_files() in arch/i386/oprofile/nmi_int.c depends on model->num_counters (number of performance counters) being less than 10. While this is currently the case, it's too clever by half. Other archs aren't quite as clever: they assume 100. I suggest to normalize them all to 1000. Cc: Philippe Elie <phil.el@wanadoo.fr> Cc: John Levon <levon@movementarian.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16Linux-2.6.12-rc2Linus Torvalds
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!