diff options
-rw-r--r-- | arch/s390/Makefile | 3 | ||||
-rw-r--r-- | arch/s390/include/asm/Kbuild | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/dis.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/facility.h | 2 | ||||
-rw-r--r-- | arch/s390/tools/Makefile | 23 | ||||
-rw-r--r-- | arch/s390/tools/gen_facilities.c | 4 | ||||
-rw-r--r-- | arch/s390/tools/gen_opcode_table.c | 4 |
7 files changed, 26 insertions, 14 deletions
diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 7b31e0626f08..fd691c4ff89e 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile | |||
@@ -138,8 +138,7 @@ archheaders: | |||
138 | 138 | ||
139 | archprepare: | 139 | archprepare: |
140 | $(Q)$(MAKE) $(build)=$(syscalls) kapi | 140 | $(Q)$(MAKE) $(build)=$(syscalls) kapi |
141 | $(Q)$(MAKE) $(build)=$(tools) include/generated/facilities.h | 141 | $(Q)$(MAKE) $(build)=$(tools) kapi |
142 | $(Q)$(MAKE) $(build)=$(tools) include/generated/dis.h | ||
143 | 142 | ||
144 | # Don't use tabs in echo arguments | 143 | # Don't use tabs in echo arguments |
145 | define archhelp | 144 | define archhelp |
diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild index 7b059510bed3..c7afbac38761 100644 --- a/arch/s390/include/asm/Kbuild +++ b/arch/s390/include/asm/Kbuild | |||
@@ -1,4 +1,6 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | 1 | # SPDX-License-Identifier: GPL-2.0 |
2 | generated-y += dis-defs.h | ||
3 | generated-y += facility-defs.h | ||
2 | generated-y += syscall_table.h | 4 | generated-y += syscall_table.h |
3 | generated-y += unistd_nr.h | 5 | generated-y += unistd_nr.h |
4 | 6 | ||
diff --git a/arch/s390/include/asm/dis.h b/arch/s390/include/asm/dis.h index b0480c60a8e1..c18ed6091914 100644 --- a/arch/s390/include/asm/dis.h +++ b/arch/s390/include/asm/dis.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #ifndef __ASM_S390_DIS_H__ | 9 | #ifndef __ASM_S390_DIS_H__ |
10 | #define __ASM_S390_DIS_H__ | 10 | #define __ASM_S390_DIS_H__ |
11 | 11 | ||
12 | #include <generated/dis.h> | 12 | #include <asm/dis-defs.h> |
13 | 13 | ||
14 | static inline int insn_length(unsigned char code) | 14 | static inline int insn_length(unsigned char code) |
15 | { | 15 | { |
diff --git a/arch/s390/include/asm/facility.h b/arch/s390/include/asm/facility.h index f040644575b7..fbe0c4be3cd8 100644 --- a/arch/s390/include/asm/facility.h +++ b/arch/s390/include/asm/facility.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #ifndef __ASM_FACILITY_H | 8 | #ifndef __ASM_FACILITY_H |
9 | #define __ASM_FACILITY_H | 9 | #define __ASM_FACILITY_H |
10 | 10 | ||
11 | #include <generated/facilities.h> | 11 | #include <asm/facility-defs.h> |
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/preempt.h> | 13 | #include <linux/preempt.h> |
14 | #include <asm/lowcore.h> | 14 | #include <asm/lowcore.h> |
diff --git a/arch/s390/tools/Makefile b/arch/s390/tools/Makefile index 2e70e25de07a..48cdac1143a9 100644 --- a/arch/s390/tools/Makefile +++ b/arch/s390/tools/Makefile | |||
@@ -3,22 +3,33 @@ | |||
3 | # Makefile for s390 specific build tools | 3 | # Makefile for s390 specific build tools |
4 | # | 4 | # |
5 | 5 | ||
6 | kapi := arch/$(ARCH)/include/generated/asm | ||
7 | kapi-hdrs-y := $(kapi)/facility-defs.h $(kapi)/dis-defs.h | ||
8 | |||
9 | targets += $(addprefix ../../../,$(kapi-hdrs-y)) | ||
10 | PHONY += kapi | ||
11 | |||
12 | kapi: $(kapi-hdrs-y) | ||
13 | |||
6 | hostprogs-y += gen_facilities | 14 | hostprogs-y += gen_facilities |
7 | hostprogs-y += gen_opcode_table | 15 | hostprogs-y += gen_opcode_table |
8 | 16 | ||
9 | HOSTCFLAGS_gen_facilities.o += -Wall $(LINUXINCLUDE) | 17 | HOSTCFLAGS_gen_facilities.o += -Wall $(LINUXINCLUDE) |
10 | HOSTCFLAGS_gen_opcode_table.o += -Wall $(LINUXINCLUDE) | 18 | HOSTCFLAGS_gen_opcode_table.o += -Wall $(LINUXINCLUDE) |
11 | 19 | ||
12 | define filechk_facilities.h | 20 | # Ensure output directory exists |
21 | _dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') | ||
22 | |||
23 | define filechk_facility-defs.h | ||
13 | $(obj)/gen_facilities | 24 | $(obj)/gen_facilities |
14 | endef | 25 | endef |
15 | 26 | ||
16 | define filechk_dis.h | 27 | define filechk_dis-defs.h |
17 | ( $(obj)/gen_opcode_table < $(srctree)/arch/$(ARCH)/tools/opcodes.txt ) | 28 | ( $(obj)/gen_opcode_table < $(srctree)/arch/$(ARCH)/tools/opcodes.txt ) |
18 | endef | 29 | endef |
19 | 30 | ||
20 | include/generated/facilities.h: $(obj)/gen_facilities FORCE | 31 | $(kapi)/facility-defs.h: $(obj)/gen_facilities FORCE |
21 | $(call filechk,facilities.h) | 32 | $(call filechk,facility-defs.h) |
22 | 33 | ||
23 | include/generated/dis.h: $(obj)/gen_opcode_table FORCE | 34 | $(kapi)/dis-defs.h: $(obj)/gen_opcode_table FORCE |
24 | $(call filechk,dis.h) | 35 | $(call filechk,dis-defs.h) |
diff --git a/arch/s390/tools/gen_facilities.c b/arch/s390/tools/gen_facilities.c index 0373801d9860..424a1ba4f874 100644 --- a/arch/s390/tools/gen_facilities.c +++ b/arch/s390/tools/gen_facilities.c | |||
@@ -128,8 +128,8 @@ static void print_facility_lists(void) | |||
128 | 128 | ||
129 | int main(int argc, char **argv) | 129 | int main(int argc, char **argv) |
130 | { | 130 | { |
131 | printf("#ifndef __ASM_S390_FACILITIES__\n"); | 131 | printf("#ifndef __ASM_S390_FACILITY_DEFS__\n"); |
132 | printf("#define __ASM_S390_FACILITIES__\n"); | 132 | printf("#define __ASM_S390_FACILITY_DEFS__\n"); |
133 | printf("/*\n"); | 133 | printf("/*\n"); |
134 | printf(" * DO NOT MODIFY.\n"); | 134 | printf(" * DO NOT MODIFY.\n"); |
135 | printf(" *\n"); | 135 | printf(" *\n"); |
diff --git a/arch/s390/tools/gen_opcode_table.c b/arch/s390/tools/gen_opcode_table.c index 357d42681cef..259aa0680d1a 100644 --- a/arch/s390/tools/gen_opcode_table.c +++ b/arch/s390/tools/gen_opcode_table.c | |||
@@ -321,8 +321,8 @@ int main(int argc, char **argv) | |||
321 | struct gen_opcode *desc = &_desc; | 321 | struct gen_opcode *desc = &_desc; |
322 | 322 | ||
323 | read_instructions(desc); | 323 | read_instructions(desc); |
324 | printf("#ifndef __S390_GENERATED_DIS_H__\n"); | 324 | printf("#ifndef __S390_GENERATED_DIS_DEFS_H__\n"); |
325 | printf("#define __S390_GENERATED_DIS_H__\n"); | 325 | printf("#define __S390_GENERATED_DIS_DEFS_H__\n"); |
326 | printf("/*\n"); | 326 | printf("/*\n"); |
327 | printf(" * DO NOT MODIFY.\n"); | 327 | printf(" * DO NOT MODIFY.\n"); |
328 | printf(" *\n"); | 328 | printf(" *\n"); |