History log of /linux-master/arch/sh/kernel/sh_ksyms_32.c
Revision Date Author Comments
# 6410607b 19-Jan-2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

sh: Add missing DECLARE_EXPORT() for __ashiftrt_r4_xx

__ashiftrt_r4_xx might be used from kernel module.
We need DECLARE_EXPORT() for them, otherwise we will get compile error.
This patch adds missing DECLARE_EXPORT()

ERROR: "__ashiftrt_r4_25" [drivers/iio/pressure/bmp280.ko] undefined!
ERROR: "__ashiftrt_r4_26" [drivers/iio/dac/ad5764.ko] undefined!
ERROR: "__ashiftrt_r4_26" [drivers/iio/accel/mma7660.ko] undefined!
ERROR: "__ashiftrt_r4_25" [drivers/iio/accel/dmard06.ko] undefined!
ERROR: "__ashiftrt_r4_26" [drivers/iio/accel/bma220_spi.ko] undefined!
ERROR: "__ashiftrt_r4_25" [drivers/crypto/hisilicon/sec/hisi_sec.ko] undefined!
ERROR: "__ashiftrt_r4_26" [drivers/rtc/rtc-x1205.ko] undefined!
ERROR: "__ashiftrt_r4_25" [drivers/rtc/rtc-pcf85063.ko] undefined!
ERROR: "__ashiftrt_r4_25" [drivers/rtc/rtc-pcf2123.ko] undefined!
ERROR: "__ashiftrt_r4_25" [drivers/input/tablet/gtco.ko] undefined!
ERROR: "__ashiftrt_r4_26" [drivers/input/mouse/psmouse.ko] undefined!
ERROR: "__ashiftrt_r4_28" [drivers/input/mouse/psmouse.ko] undefined!
ERROR: "__ashiftrt_r4_28" [drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.ko] undefined!
ERROR: "__ashiftrt_r4_28" [fs/udf/udf.ko] undefined!

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Rich Felker <dalias@libc.org>


# b2441318 01-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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>


# 940d4113 19-Jun-2015 Yoshinori Sato <ysato@users.sourceforge.jp>

sh: New gcc support

New gcc (4.8 or later) used new shift helper functions.
So we need added new helper to private libgcc.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Rich Felker <dalias@libc.org>


# ad70b029 02-Jan-2014 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>

sh: add EXPORT_SYMBOL(min_low_pfn) and EXPORT_SYMBOL(max_low_pfn) to sh_ksyms_32.c

Min_low_pfn and max_low_pfn were used in pfn_valid macro if defined
CONFIG_FLATMEM. When the functions that use the pfn_valid is used in
driver module, max_low_pfn and min_low_pfn is to undefined, and fail to
build.

ERROR: "min_low_pfn" [drivers/block/aoe/aoe.ko] undefined!
ERROR: "max_low_pfn" [drivers/block/aoe/aoe.ko] undefined!
make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2

This patch fix this problem.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 363737d6 31-May-2012 Geert Uytterhoeven <geert@linux-m68k.org>

mtd/uclinux: Use generic __bss_stop instead of _ebss

The standard (see BSS_SECTION() in <asm-generic/vmlinux.lds.h> and
<asm-generic/sections.h>) symbol for the end of BSS is __bss_stop.
This allows to remove all local declarations that have been added to
several architectures just to please CONFIG_MTD_UCLINUX.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Michal Simek <monstr@monstr.eu>
Acked-by: Greg Ungerer <gerg@uclinux.org>


# 4c978ca3 26-Oct-2009 Paul Mundt <lethal@linux-sh.org>

sh: Clean up more superfluous symbol exports.

Many of these symbols went away completely, or we just never cared about
them in the first place. Trim the exports down to the essential set.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 0a993b0a 26-Oct-2009 Paul Mundt <lethal@linux-sh.org>

sh64: cache flush symbol exports.

These were previously hidden in sh_ksyms_32, despite also being needed
for sh64 now that the cache.c code is shared.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 26fadd36 22-Oct-2009 Lubomir Rintel <lkundrak@v3.sk>

sh: Build fix: define more __movmem* symbols

ERROR: "__movmemSI12" [net/unix/unix.ko] undefined!
ERROR: "__movmemSI52" [net/ipv6/sit.ko] undefined!
ERROR: "__movmemSI24" [net/ipv6/ipv6.ko] undefined!
ERROR: "__movmemSI60" [net/ipv6/ipv6.ko] undefined!
ERROR: "__movmemSI16" [net/ipv6/ipv6.ko] undefined!
ERROR: "__movmemSI20" [net/ipv6/ipv6.ko] undefined!
ERROR: "__movmemSI32" [net/ipv6/ipv6.ko] undefined!

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 14c011de 19-Oct-2009 Paul Mundt <lethal@linux-sh.org>

sh: Fix up cacheflush routine symbol exports.

Fixes up flush_dcache_page() references by modules with run-time cache
disabling.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# f16bf3e2 30-Sep-2009 Lubomir Rintel <lkundrak@v3.sk>

sh: Build fix: export __movmem

ERROR: "__movmem" [net/irda/irda.ko] undefined!
ERROR: "__movmem" [fs/nfsd/nfsd.ko] undefined!
ERROR: "__movmem" [fs/lockd/lockd.ko] undefined!
ERROR: "__movmem" [crypto/sha1_generic.ko] undefined!

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# dfff0fa6 27-Jul-2009 Paul Mundt <lethal@linux-sh.org>

sh: wire up clear_user_highpage() for sh4, convert sh7705.

This wires up clear_user_highpage() on SH-4 and subsequently converts the
SH7705 32kB cache mode over to using it. Now that the SH-4 implementation
handles all of the dcache purging directly in the aliasing case, there is
no need to do this in the default clear_page() implementation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# fe279320 11-Jul-2009 Paul Mundt <lethal@linux-sh.org>

sh: Use DECLARE_EXPORT() for mcount symbol export.

The function prototype for mcount is not defined if we are not building
with ftrace support enabled, so use DECLARE_EXPORT() to stub one in.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 473d1cf4 11-Jul-2009 Paul Mundt <lethal@linux-sh.org>

sh: Decouple mcount from ftrace.

This adds a general CONFIG_MCOUNT in order to permit mcount generation
without ftrace support. This is primarily for allowing platforms to
enable aggressive stack overflow checking without having to enable ftrace
support. Based on the sparc64 implementation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# fa1d43ab 21-May-2009 Paul Mundt <lethal@linux-sh.org>

sh: irq: Convert from irq_desc[] to irq_to_desc().

This converts a few places that were using the old irq_desc[] array over
to the shiny new irq_to_desc() helper. Preperatory work for sparse irq
support.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 0cd5f7b0 02-May-2009 Thomas Gleixner <tglx@linutronix.de>

sh: remove obsolete no_irq_type

Impact: cleanup

convert the last remaining users to no_irq_chip

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 624c6a67 25-Nov-2008 Paul Mundt <lethal@linux-sh.org>

sh: More movmem alias symbol exports for older compilers.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 9ef10028 19-Nov-2008 Paul Mundt <lethal@linux-sh.org>

sh: Add exports for __udivsi3/__sdivsi3 and the _i4 versions.

Needed by older compilers.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 1aad54a9 18-Nov-2008 Paul Mundt <lethal@linux-sh.org>

sh: Migrate necessary libgcc bits in to arch/sh/lib for SUPERH32.

This moves in the necessary libgcc bits for SUPERH32 and drops the
libgcc linking for the regular targets. This in turn allows us to rip
out quite a few hacks both in sh_ksyms_32 and arch/sh/Makefile.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 694f94f2 31-Oct-2008 Paul Mundt <lethal@linux-sh.org>

sh: FTRACE renamed to FUNCTION_TRACER.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 8a2fd5f3 28-Oct-2008 Paul Mundt <lethal@linux-sh.org>

sh: Fix FPU tuning on toolchains with mismatched multilib targets.

Presently there is very little standing in the way of using an SH-4
toolchain for building an SH-2 kernel, and vice versa. Binutils itself
has no limitations whatsoever and supports explicit ISA hinting, which
we already use with varying degrees of success today.

This leaves GCC as the odd one out, due to a rather dubious policy
decision by the GCC folks to not include all of the CPU family variants
in the default list of multilib targets in GCC4. Despite best efforts to
the contrary, libgcc itself already contains awareness of the various CPU
types and remains generally usable, allowing it to safely be referenced
even on a mismatched target (and indeed, explicit ISA tuning by binutils
keeps us honest in terms of ensuring that we do not link incompatible
objects in).

In order to support this, a couple of changes had to be made. Firstly,
the introduction of MAYBE_DECLARE_EXPORT(), which provides a __weak
extern reference for libgcc resident routines when finer-grained
-m<cpu-family> based tuning is not supported by the toolchain. This
fixes up the __sdivsi3_i4i and __udivsi3_i4i references when dealing
with SH-2 kernels linked with an SH-4 libgcc. Secondly, in case where we
are unable to find a suitable match for CPU family tuning but still
have a toolchain that defaults to FP instruction generation, a suitable
nofpu target must be selected. This is accomplished by selecting the
first nofpu multilib target supported by the toolchain, which is
also necessary for selecting the proper libgcc to link against.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 2bba37e6 21-Oct-2008 Paul Mundt <lethal@linux-sh.org>

sh: Export cache flush routines needed by sh_eth on SH7619.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 9d2b1f81 21-Sep-2008 Paul Mundt <lethal@linux-sh.org>

sh: ftrace support.

This adds support for ftrace to SH. This only includes CONFIG_FTRACE,
and does not handle dynamic ftrace presently.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# d09d328c 05-Aug-2008 Yoshinori Sato <ysato@users.sourceforge.jp>

sh: Don't export __{s,u}divsi3_i4i from SH-2 libgcc.

rsk7203_defconfig fails to build with the following error:

<-- snip -->

...
LD .tmp_vmlinux1
arch/sh/kernel/built-in.o:(__ksymtab+0xb8): undefined reference to `__udivsi3_i4i'
arch/sh/kernel/built-in.o:(__ksymtab+0xc8): undefined reference to `__sdivsi3_i4i'
make[1]: *** [.tmp_vmlinux1] Error 1

<-- snip -->

That worked with 2.6.26, and these are far less undefined references
than in the cases where libgcc was missing.

[ These symbols are not defined on SH-2 versions of libgcc, so we have to
special case the export there. - Paul ]

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 971ac16d 25-Apr-2008 Paul Mundt <lethal@linux-sh.org>

sh64: Some symbol exports to make the allmodconfig happier.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 64ac24e7 07-Mar-2008 Matthew Wilcox <willy@infradead.org>

Generic semaphore implementation

Semaphores are no longer performance-critical, so a generic C
implementation is better for maintainability, debuggability and
extensibility. Thanks to Peter Zijlstra for fixing the lockdep
warning. Thanks to Harvey Harrison for pointing out that the
unlikely() was unnecessary.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu>


# fd785d6b 15-Apr-2008 Andrew Morton <akpm@linux-foundation.org>

sh: export empty_zero_page

ERROR: "empty_zero_page" [fs/ext4/ext4dev.ko] undefined!

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# ad0caae0 04-Mar-2008 Andrew Morton <akpm@linux-foundation.org>

sh: export copy-page() to modules

ERROR: "copy_page" [fs/unionfs/unionfs.ko] undefined!

like all the other architectures.

Cc: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 4bee4ca2 04-Mar-2008 Adrian Bunk <adrian.bunk@movial.fi>

sh_ksyms_32.c update for gcc 4.3

This patch fixes the following build error with landisk_defconfig when
using gcc 4.3:

<-- snip -->

...
MODPOST 50 modules
ERROR: "__udivsi3_i4i" [net/sunrpc/sunrpc.ko] undefined!
ERROR: "__udivsi3_i4i" [net/appletalk/appletalk.ko] undefined!
ERROR: "__udivsi3_i4i" [fs/ufs/ufs.ko] undefined!
ERROR: "__udivsi3_i4i" [fs/ntfs/ntfs.ko] undefined!
ERROR: "__sdivsi3_i4i" [fs/ntfs/ntfs.ko] undefined!
ERROR: "__udivsi3_i4i" [fs/nfsd/nfsd.ko] undefined!
ERROR: "__sdivsi3_i4i" [fs/nfsd/nfsd.ko] undefined!
ERROR: "__udivsi3_i4i" [fs/nfs/nfs.ko] undefined!
ERROR: "__udivsi3_i4i" [fs/lockd/lockd.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/usb/storage/usb-storage.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/usb/serial/pl2303.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/usb/serial/pl2303.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/usb/serial/ftdi_sio.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/usb/misc/sisusbvga/sisusbvga.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/usb/misc/sisusbvga/sisusbvga.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/media/video/v4l1-compat.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/media/video/v4l1-compat.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/media/video/usbvideo/vicam.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/media/video/usbvideo/usbvideo.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/media/video/usbvideo/usbvideo.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/media/video/sn9c102/sn9c102.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/media/video/sn9c102/sn9c102.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/media/video/se401.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/media/video/pwc/pwc.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/md/raid0.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/md/md-mod.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/md/md-mod.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/md/linear.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/hid/usbhid/usbhid.ko] undefined!
make[2]: *** [__modpost] Error 1

<-- snip -->

Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>


# 4b7be4f2 11-Nov-2007 Paul Mundt <lethal@linux-sh.org>

sh: Split out sh_ksyms.c in to _32 and _64 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>