VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
b24413180f560 (Greg Kroah-Hartman             2017-11-01 15:07:57 +0100   1) // SPDX-License-Identifier: GPL-2.0
37185b3324087 (Al Viro                        2012-10-08 03:27:32 +0100   2) #include <linux/types.h>
37185b3324087 (Al Viro                        2012-10-08 03:27:32 +0100   3) #include <linux/module.h>
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700   4) 
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700   5) /* Some of this are builtin function (some are not but could in the future),
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700   6)  * so I *must* declare good prototypes for them and then EXPORT them.
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700   7)  * The kernel code uses the macro defined by include/linux/string.h,
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700   8)  * so I undef macros; the userspace code does not include that and I
e8234483e7545 (Jeff Dike                      2007-07-15 23:38:57 -0700   9)  * add an EXPORT for the glibc one.
e8234483e7545 (Jeff Dike                      2007-07-15 23:38:57 -0700  10)  */
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  11) 
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  12) #undef strlen
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  13) #undef strstr
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  14) #undef memcpy
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  15) #undef memset
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  16) 
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  17) extern size_t strlen(const char *);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  18) extern void *memmove(void *, const void *, size_t);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  19) extern void *memset(void *, int, size_t);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  20) extern int printf(const char *, ...);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  21) 
1a65f493c335a (Jeff Dike                      2007-07-23 18:43:46 -0700  22) /* If it's not defined, the export is included in lib/string.c.*/
7c45ad16f0b64 (Paolo 'Blaisorblade' Giarrusso 2006-04-10 22:53:33 -0700  23) #ifdef __HAVE_ARCH_STRSTR
7c45ad16f0b64 (Paolo 'Blaisorblade' Giarrusso 2006-04-10 22:53:33 -0700  24) EXPORT_SYMBOL(strstr);
7c45ad16f0b64 (Paolo 'Blaisorblade' Giarrusso 2006-04-10 22:53:33 -0700  25) #endif
7c45ad16f0b64 (Paolo 'Blaisorblade' Giarrusso 2006-04-10 22:53:33 -0700  26) 
00699e8472cc0 (Andrew Morton                  2009-03-12 14:31:24 -0700  27) #ifndef __x86_64__
00699e8472cc0 (Andrew Morton                  2009-03-12 14:31:24 -0700  28) extern void *memcpy(void *, const void *, size_t);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  29) EXPORT_SYMBOL(memcpy);
00699e8472cc0 (Andrew Morton                  2009-03-12 14:31:24 -0700  30) #endif
00699e8472cc0 (Andrew Morton                  2009-03-12 14:31:24 -0700  31) 
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  32) EXPORT_SYMBOL(memmove);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  33) EXPORT_SYMBOL(memset);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  34) EXPORT_SYMBOL(printf);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  35) 
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  36) /* Here, instead, I can provide a fake prototype. Yes, someone cares: genksyms.
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  37)  * However, the modules will use the CRC defined *here*, no matter if it is
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  38)  * good; so the versions of these symbols will always match
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  39)  */
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  40) #define EXPORT_SYMBOL_PROTO(sym)       \
5134d8fea06ab (Jeff Dike                      2008-02-08 04:22:08 -0800  41) 	int sym(void);                  \
5134d8fea06ab (Jeff Dike                      2008-02-08 04:22:08 -0800  42) 	EXPORT_SYMBOL(sym);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  43) 
74433c0fe105f (Paolo 'Blaisorblade' Giarrusso 2005-12-29 17:39:59 +0100  44) extern void readdir64(void) __attribute__((weak));
74433c0fe105f (Paolo 'Blaisorblade' Giarrusso 2005-12-29 17:39:59 +0100  45) EXPORT_SYMBOL(readdir64);
74433c0fe105f (Paolo 'Blaisorblade' Giarrusso 2005-12-29 17:39:59 +0100  46) extern void truncate64(void) __attribute__((weak));
74433c0fe105f (Paolo 'Blaisorblade' Giarrusso 2005-12-29 17:39:59 +0100  47) EXPORT_SYMBOL(truncate64);
74433c0fe105f (Paolo 'Blaisorblade' Giarrusso 2005-12-29 17:39:59 +0100  48) 
c6b17bbd39bdb (Al Viro                        2012-02-10 19:02:28 -0500  49) #ifdef CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  50) EXPORT_SYMBOL(vsyscall_ehdr);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  51) EXPORT_SYMBOL(vsyscall_end);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  52) #endif
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  53) 
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  54) EXPORT_SYMBOL_PROTO(__errno_location);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  55) 
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  56) EXPORT_SYMBOL_PROTO(access);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  57) EXPORT_SYMBOL_PROTO(open);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  58) EXPORT_SYMBOL_PROTO(open64);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  59) EXPORT_SYMBOL_PROTO(close);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  60) EXPORT_SYMBOL_PROTO(read);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  61) EXPORT_SYMBOL_PROTO(write);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  62) EXPORT_SYMBOL_PROTO(dup2);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  63) EXPORT_SYMBOL_PROTO(__xstat);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  64) EXPORT_SYMBOL_PROTO(__lxstat);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  65) EXPORT_SYMBOL_PROTO(__lxstat64);
e8234483e7545 (Jeff Dike                      2007-07-15 23:38:57 -0700  66) EXPORT_SYMBOL_PROTO(__fxstat64);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  67) EXPORT_SYMBOL_PROTO(lseek);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  68) EXPORT_SYMBOL_PROTO(lseek64);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  69) EXPORT_SYMBOL_PROTO(chown);
e8234483e7545 (Jeff Dike                      2007-07-15 23:38:57 -0700  70) EXPORT_SYMBOL_PROTO(fchown);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  71) EXPORT_SYMBOL_PROTO(truncate);
e8234483e7545 (Jeff Dike                      2007-07-15 23:38:57 -0700  72) EXPORT_SYMBOL_PROTO(ftruncate64);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  73) EXPORT_SYMBOL_PROTO(utime);
e8234483e7545 (Jeff Dike                      2007-07-15 23:38:57 -0700  74) EXPORT_SYMBOL_PROTO(utimes);
e8234483e7545 (Jeff Dike                      2007-07-15 23:38:57 -0700  75) EXPORT_SYMBOL_PROTO(futimes);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  76) EXPORT_SYMBOL_PROTO(chmod);
e8234483e7545 (Jeff Dike                      2007-07-15 23:38:57 -0700  77) EXPORT_SYMBOL_PROTO(fchmod);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  78) EXPORT_SYMBOL_PROTO(rename);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  79) EXPORT_SYMBOL_PROTO(__xmknod);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  80) 
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  81) EXPORT_SYMBOL_PROTO(symlink);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  82) EXPORT_SYMBOL_PROTO(link);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  83) EXPORT_SYMBOL_PROTO(unlink);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  84) EXPORT_SYMBOL_PROTO(readlink);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  85) 
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  86) EXPORT_SYMBOL_PROTO(mkdir);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  87) EXPORT_SYMBOL_PROTO(rmdir);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  88) EXPORT_SYMBOL_PROTO(opendir);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  89) EXPORT_SYMBOL_PROTO(readdir);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  90) EXPORT_SYMBOL_PROTO(closedir);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  91) EXPORT_SYMBOL_PROTO(seekdir);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  92) EXPORT_SYMBOL_PROTO(telldir);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  93) 
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  94) EXPORT_SYMBOL_PROTO(ioctl);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  95) 
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  96) EXPORT_SYMBOL_PROTO(pread64);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  97) EXPORT_SYMBOL_PROTO(pwrite64);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  98) 
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700  99) EXPORT_SYMBOL_PROTO(statfs);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700 100) EXPORT_SYMBOL_PROTO(statfs64);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700 101) 
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700 102) EXPORT_SYMBOL_PROTO(getuid);
^1da177e4c3f4 (Linus Torvalds                 2005-04-16 15:20:36 -0700 103) 
a2d76bd8fa29f (Paolo 'Blaisorblade' Giarrusso 2005-07-28 21:16:15 -0700 104) EXPORT_SYMBOL_PROTO(fsync);
a2d76bd8fa29f (Paolo 'Blaisorblade' Giarrusso 2005-07-28 21:16:15 -0700 105) EXPORT_SYMBOL_PROTO(fdatasync);
a2d76bd8fa29f (Paolo 'Blaisorblade' Giarrusso 2005-07-28 21:16:15 -0700 106) 
005a59ec745d2 (Al Viro                        2009-04-21 01:27:08 -0400 107) EXPORT_SYMBOL_PROTO(lstat64);
005a59ec745d2 (Al Viro                        2009-04-21 01:27:08 -0400 108) EXPORT_SYMBOL_PROTO(fstat64);
005a59ec745d2 (Al Viro                        2009-04-21 01:27:08 -0400 109) EXPORT_SYMBOL_PROTO(mknod);
005a59ec745d2 (Al Viro                        2009-04-21 01:27:08 -0400 110) 
cead61a6717a9 (Paolo 'Blaisorblade' Giarrusso 2006-05-01 12:16:06 -0700 111) /* Export symbols used by GCC for the stack protector. */
cead61a6717a9 (Paolo 'Blaisorblade' Giarrusso 2006-05-01 12:16:06 -0700 112) extern void __stack_smash_handler(void *) __attribute__((weak));
cead61a6717a9 (Paolo 'Blaisorblade' Giarrusso 2006-05-01 12:16:06 -0700 113) EXPORT_SYMBOL(__stack_smash_handler);
cead61a6717a9 (Paolo 'Blaisorblade' Giarrusso 2006-05-01 12:16:06 -0700 114) 
cead61a6717a9 (Paolo 'Blaisorblade' Giarrusso 2006-05-01 12:16:06 -0700 115) extern long __guard __attribute__((weak));
cead61a6717a9 (Paolo 'Blaisorblade' Giarrusso 2006-05-01 12:16:06 -0700 116) EXPORT_SYMBOL(__guard);
f956b3e40ad7b (Richard Weinberger             2011-07-25 17:12:47 -0700 117) 
f956b3e40ad7b (Richard Weinberger             2011-07-25 17:12:47 -0700 118) #ifdef _FORTIFY_SOURCE
f956b3e40ad7b (Richard Weinberger             2011-07-25 17:12:47 -0700 119) extern int __sprintf_chk(char *str, int flag, size_t strlen, const char *format);
f956b3e40ad7b (Richard Weinberger             2011-07-25 17:12:47 -0700 120) EXPORT_SYMBOL(__sprintf_chk);
f956b3e40ad7b (Richard Weinberger             2011-07-25 17:12:47 -0700 121) #endif