Skip to content

Commit 697b373

Browse files
committed
s390: Provide MARCH_HAS_*_FEATURES defines
Provide MARCH_HAS_*_FEATURES defines which are supposed to be used everywhere instead of the CONFIG_HAVE_MARCH_*_FEATURES defines. Various header files contain code which depend on the CONFIG_HAVE_MARCH_*_FEATURES defines, allowing for compile time optimizations. If such code is used within the decompressor wrong code may be generated (the compiler may generate instructions which are not available for the minimum architecture level of the decompressor). Therefore provide a new header file with MARCH_HAS_*_FEATURES defines, which are only available if __DECOMPRESSOR is not defined. This way code generation for the kernel image is still optimized depending on CONFIG_HAVE_MARCH_*_FEATURES, while code generated for the decompressor is compiled for the minimum architecture level. Reviewed-by: Sven Schnelle <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent 0147add commit 697b373

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

arch/s390/include/asm/march.h

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
3+
#ifndef __ASM_S390_MARCH_H
4+
#define __ASM_S390_MARCH_H
5+
6+
#include <linux/kconfig.h>
7+
8+
#define MARCH_HAS_Z10_FEATURES 1
9+
10+
#ifndef __DECOMPRESSOR
11+
12+
#ifdef CONFIG_HAVE_MARCH_Z196_FEATURES
13+
#define MARCH_HAS_Z196_FEATURES 1
14+
#endif
15+
16+
#ifdef CONFIG_HAVE_MARCH_ZEC12_FEATURES
17+
#define MARCH_HAS_ZEC12_FEATURES 1
18+
#endif
19+
20+
#ifdef CONFIG_HAVE_MARCH_Z13_FEATURES
21+
#define MARCH_HAS_Z13_FEATURES 1
22+
#endif
23+
24+
#ifdef CONFIG_HAVE_MARCH_Z14_FEATURES
25+
#define MARCH_HAS_Z14_FEATURES 1
26+
#endif
27+
28+
#ifdef CONFIG_HAVE_MARCH_Z15_FEATURES
29+
#define MARCH_HAS_Z15_FEATURES 1
30+
#endif
31+
32+
#ifdef CONFIG_HAVE_MARCH_Z16_FEATURES
33+
#define MARCH_HAS_Z16_FEATURES 1
34+
#endif
35+
36+
#endif /* __DECOMPRESSOR */
37+
38+
#endif /* __ASM_S390_MARCH_H */

0 commit comments

Comments
 (0)