s390: remove unneeded 'select BUILD_BIN2C'
PATCH 1/3 s390: remove unneeded 'select BUILD_BIN2C'
Since commit 4c0f032d4963 ("s390/purgatory: Omit use of bin2c"), s390 builds the purgatory without using bin2c.
Remove 'select BUILD_BIN2C' to avoid the unneeded build of bin2c.
---
arch/s390/Kconfig | 1 - 1 file changed, 1 deletion(-)
arch/s390/Kconfig +0 -1
@@ -484,7 +484,6 @@ config KEXEC config KEXEC_FILE bool "kexec file based system call" select KEXEC_CORE - select BUILD_BIN2C depends on CRYPTO depends on CRYPTO_SHA256 depends on CRYPTO_SHA256_S390
Signature · 1 line
2.32.0
PATCH 2/3 s390/purgatory: hard-code obj-y in Makefile
The purgatory/ directory is entirely guarded in arch/s390/Kbuild. CONFIG_ARCH_HAS_KEXEC_PURGATORY is bool type.
$(CONFIG_ARCH_HAS_KEXEC_PURGATORY) is always 'y' when Kbuild visits this Makefile for building.
---
arch/s390/purgatory/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/purgatory/Makefile +1 -1
@@ -51,4 +51,4 @@ $(obj)/purgatory.ro: $(obj)/purgatory $(obj)/purgatory.chk FORCE $(obj)/kexec-purgatory.o: $(obj)/kexec-purgatory.S $(obj)/purgatory.ro FORCE $(call if_changed_rule,as_o_S) -obj-$(CONFIG_ARCH_HAS_KEXEC_PURGATORY) += kexec-purgatory.o +obj-y += kexec-purgatory.o
Signature · 1 line
2.32.0
Re: [PATCH 2/3] s390/purgatory: hard-code obj-y in Makefile
Quoted 17 lines · Masahiro Yamada
The purgatory/ directory is entirely guarded in
arch/s390/Kbuild.CONFIG_ARCH_HAS_KEXEC_PURGATORYis bool type.$(CONFIG_ARCH_HAS_KEXEC_PURGATORY) is always 'y' when
Kbuildvisits thisMakefilefor building.Signed-off-by Masahiro Yamada <[email protected]>---
arch/s390/purgatory/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/s390/purgatory/Makefile +0
-0
arch/s390/purgatory/Makefile $(obj)/purgatory.ro: $(obj)/purgatory $(obj)/purgatory.chk FORCE · line 54
Quoted 5 lines
arch/s390/purgatory/Makefile +1
-1@@ -51,4 +51,4 @@ $(obj)/purgatory.ro: $(obj)/purgatory $(obj)/purgatory.chk FORCE $(obj)/kexec-purgatory.o: $(obj)/kexec-purgatory.S $(obj)/purgatory.ro FORCE $(call if_changed_rule,as_o_S) -obj-$(CONFIG_ARCH_HAS_KEXEC_PURGATORY) += kexec-purgatory.o +obj-y += kexec-purgatory.o
Applied, thanks!
BTW, it looks like x86 and riscv also need similar change.
In addition, x86 use of CONFIG_ARCH_HAS_KEXEC_PURGATORY vs CONFIG_KEXEC_FILE is not consistent with other architectures (may be even incorrect?).
Quoted 3 lines
Signature · 1 line
2.32.0
Re: [PATCH 2/3] s390/purgatory: hard-code obj-y in Makefile
Quoted 22 lines · Alexander Gordeev
Quoted 20 lines · Masahiro Yamada
The purgatory/ directory is entirely guarded in
arch/s390/Kbuild.CONFIG_ARCH_HAS_KEXEC_PURGATORYis bool type.$(CONFIG_ARCH_HAS_KEXEC_PURGATORY) is always 'y' when
Kbuildvisits thisMakefilefor building.Signed-off-by Masahiro Yamada <[email protected]>---
arch/s390/purgatory/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/s390/purgatory/Makefile +0
-0@@ -51,4 +51,4 @@ $(obj)/purgatory.ro: $(obj)/purgatory $(obj)/purgatory.chk FORCE $(obj)/kexec-purgatory.o: $(obj)/kexec-purgatory.S $(obj)/purgatory.ro FORCE $(call if_changed_rule,as_o_S)
Quoted 6 lines
arch/s390/purgatory/Makefile $(obj)/purgatory.ro: $(obj)/purgatory $(obj)/purgatory.chk FORCE · line 54
Quoted 2 lines
arch/s390/purgatory/Makefile +1
-1-obj-$(CONFIG_ARCH_HAS_KEXEC_PURGATORY) += kexec-purgatory.o +obj-y += kexec-purgatory.oApplied, thanks!
BTW, it looks like x86 and riscv also need similar change.
A patch for x86 exists:
https://lore.kernel.org/all/[email protected]/
I will send riscv patches later.
Quoted 2 lines
In addition, x86 use of
CONFIG_ARCH_HAS_KEXEC_PURGATORYvsCONFIG_KEXEC_FILEis not consistent with other architectures (may be even incorrect?).
I thought of this when I reworked Makefiles,
but did not touch this part.
Quoted 4 lines
Quoted 4 lines
--
2.32.0
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 3/3 s390/purgatory: remove duplicated build rule of kexec-purgatory.o
In reply to Masahiro YamadaThis is equivalent to the pattern rule in scripts/Makefile.build.
Having the dependency on $(obj)/purgatory.ro is enough.
---
arch/s390/purgatory/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/s390/purgatory/Makefile +1 -2
@@ -48,7 +48,6 @@ OBJCOPYFLAGS_purgatory.ro += --remove-section='.note.*' $(obj)/purgatory.ro: $(obj)/purgatory $(obj)/purgatory.chk FORCE $(call if_changed,objcopy) -$(obj)/kexec-purgatory.o: $(obj)/kexec-purgatory.S $(obj)/purgatory.ro FORCE - $(call if_changed_rule,as_o_S) +$(obj)/kexec-purgatory.o: $(obj)/purgatory.ro obj-y += kexec-purgatory.o
Signature · 1 line
2.32.0
Re: [PATCH 3/3] s390/purgatory: remove duplicated build rule of kexec-purgatory.o
Quoted 15 lines · Masahiro Yamada
This is equivalent to the pattern rule in
scripts/Makefile.build.Having the dependency on $(obj)/purgatory.ro is enough.
Signed-off-by Masahiro Yamada <[email protected]>---
arch/s390/purgatory/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)arch/s390/purgatory/Makefile +0
-0
arch/s390/purgatory/Makefile OBJCOPYFLAGS_purgatory.ro += --remove-section='.note.*' · line 53
Quoted 8 lines
arch/s390/purgatory/Makefile +1
-2@@ -48,7 +48,6 @@ OBJCOPYFLAGS_purgatory.ro += --remove-section='.note.*' $(obj)/purgatory.ro: $(obj)/purgatory $(obj)/purgatory.chk FORCE $(call if_changed,objcopy) -$(obj)/kexec-purgatory.o: $(obj)/kexec-purgatory.S $(obj)/purgatory.ro FORCE - $(call if_changed_rule,as_o_S) +$(obj)/kexec-purgatory.o: $(obj)/purgatory.ro obj-y += kexec-purgatory.o
Applied, thanks!
Quoted 3 lines
Signature · 1 line
2.32.0
Quoted 17 lines · Masahiro Yamada
Since commit
4c0f032d4963("s390/purgatory: Omit use of bin2c"), s390 builds the purgatory without using bin2c.Remove 'select
BUILD_BIN2C' to avoid the unneeded build of bin2c.Fixes 4c0f032d4963 ("s390/purgatory: Omit use of bin2c")Signed-off-by Masahiro Yamada <[email protected]>---
arch/s390/Kconfig | 1 - 1 file changed, 1 deletion(-)arch/s390/Kconfig +0
-0
arch/s390/Kconfig config KEXEC · line 489
Quoted 7 lines
arch/s390/Kconfig +0
-1@@ -484,7 +484,6 @@ config KEXEC config KEXEC_FILE bool "kexec file based system call" select KEXEC_CORE - select BUILD_BIN2C depends on CRYPTO depends on CRYPTO_SHA256 depends on CRYPTO_SHA256_S390
Applied, thanks!
Quoted 3 lines
Signature · 1 line
2.32.0