mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 06:05:03 +07:00
b668970e61
kernelci.org reports tons of build warnings for linux-next:
35 WARNING: "memcpy" [fs/fat/msdos.ko] has no CRC!
35 WARNING: "__copy_user" [fs/fat/fat.ko] has no CRC!
32 WARNING: EXPORT symbol "memset" [vmlinux] version generation failed, symbol will not be versioned.
32 WARNING: EXPORT symbol "copy_page" [vmlinux] version generation failed, symbol will not be versioned.
32 WARNING: EXPORT symbol "clear_page" [vmlinux] version generation failed, symbol will not be versioned.
32 WARNING: EXPORT symbol "__strncpy_from_user_nocheck_asm" [vmlinux] version generation failed, symbol will not be versioned.
The problem here is mainly the missing asm/asm-prototypes.h header file
that is supposed to include the prototypes for each symbol that is exported
from an assembler file.
A second problem is that the asm/uaccess.h header contains some but not
all the necessary declarations for the user access helpers.
Finally, the vdso build is broken once we add asm/asm-prototypes.h, so
we have to fix this at the same time by changing the vdso header. My
approach here is to just not look for exported symbols in the VDSO
assembler files, as the symbols cannot be exported anyway.
Fixes: 576a2f0c5c
("MIPS: Export memcpy & memset functions alongside their definitions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Maciej W. Rozycki <macro@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15038/
Patchwork: https://patchwork.linux-mips.org/patch/15069/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
66 lines
1.3 KiB
ArmAsm
66 lines
1.3 KiB
ArmAsm
/*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
* Copyright (C) 1996, 1998, 1999, 2004 by Ralf Baechle
|
|
* Copyright (C) 1999 Silicon Graphics, Inc.
|
|
* Copyright (C) 2011 MIPS Technologies, Inc.
|
|
*/
|
|
#include <asm/asm.h>
|
|
#include <asm/asm-offsets.h>
|
|
#include <asm/export.h>
|
|
#include <asm/regdef.h>
|
|
|
|
#define EX(insn,reg,addr,handler) \
|
|
9: insn reg, addr; \
|
|
.section __ex_table,"a"; \
|
|
PTR 9b, handler; \
|
|
.previous
|
|
|
|
/*
|
|
* Return the size of a string (including the ending 0)
|
|
*
|
|
* Return 0 for error
|
|
*/
|
|
.macro __BUILD_STRLEN_ASM func
|
|
LEAF(__strlen_\func\()_asm)
|
|
LONG_L v0, TI_ADDR_LIMIT($28) # pointer ok?
|
|
and v0, a0
|
|
bnez v0, .Lfault\@
|
|
|
|
move v0, a0
|
|
.ifeqs "\func", "kernel"
|
|
1: EX(lbu, v1, (v0), .Lfault\@)
|
|
.else
|
|
1: EX(lbue, v1, (v0), .Lfault\@)
|
|
.endif
|
|
PTR_ADDIU v0, 1
|
|
bnez v1, 1b
|
|
PTR_SUBU v0, a0
|
|
jr ra
|
|
END(__strlen_\func\()_asm)
|
|
|
|
.Lfault\@: move v0, zero
|
|
jr ra
|
|
.endm
|
|
|
|
#ifndef CONFIG_EVA
|
|
/* Set aliases */
|
|
.global __strlen_user_asm
|
|
.set __strlen_user_asm, __strlen_kernel_asm
|
|
EXPORT_SYMBOL(__strlen_user_asm)
|
|
#endif
|
|
|
|
__BUILD_STRLEN_ASM kernel
|
|
EXPORT_SYMBOL(__strlen_kernel_asm)
|
|
|
|
#ifdef CONFIG_EVA
|
|
|
|
.set push
|
|
.set eva
|
|
__BUILD_STRLEN_ASM user
|
|
.set pop
|
|
EXPORT_SYMBOL(__strlen_user_asm)
|
|
#endif
|