mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
706f2ada82
The vector instruction macros can also be used in inline assemblies. For this the magic asm(".include \"asm/vx-insn.h\"\n"); must be added to C files in order to avoid that the pre-processor eliminates the __ASSEMBLY__ guarded macros. This however comes with the problem that changes to asm/vx-insn.h do not cause a recompile of C files which have only this magic statement instead of a proper include statement. This can be observed with the arch/s390/kernel/fpu.c file. In order to fix this problem and also to avoid that the include must be specified twice, add a wrapper include header file which will do all necessary steps. This way only the vx-insn.h header file needs to be included and changes to the new vx-insn-asm.h header file cause a recompile of all dependent files like it should. Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
20 lines
441 B
C
20 lines
441 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Support for Vector Instructions
|
|
*
|
|
* This wrapper header file allows to use the vector instruction macros in
|
|
* both assembler files as well as in inline assemblies in C files.
|
|
*/
|
|
|
|
#ifndef __ASM_S390_VX_INSN_H
|
|
#define __ASM_S390_VX_INSN_H
|
|
|
|
#include <asm/vx-insn-asm.h>
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
asm(".include \"asm/vx-insn-asm.h\"\n");
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
#endif /* __ASM_S390_VX_INSN_H */
|