All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] s390: remove unneeded 'select BUILD_BIN2C'
@ 2022-06-13 17:09 Masahiro Yamada
  2022-06-13 17:09 ` [PATCH 2/3] s390/purgatory: hard-code obj-y in Makefile Masahiro Yamada
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Masahiro Yamada @ 2022-06-13 17:09 UTC (permalink / raw)
  To: Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, linux-s390
  Cc: Masahiro Yamada, Martin Schwidefsky, Philipp Rudo, linux-kernel

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 <masahiroy@kernel.org>
---

 arch/s390/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 91c0b80a8bf0..8cd9e56c629b 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -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
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] s390/purgatory: hard-code obj-y in Makefile
  2022-06-13 17:09 [PATCH 1/3] s390: remove unneeded 'select BUILD_BIN2C' Masahiro Yamada
@ 2022-06-13 17:09 ` Masahiro Yamada
  2022-06-22 13:48   ` Alexander Gordeev
  2022-06-13 17:09 ` [PATCH 3/3] s390/purgatory: remove duplicated build rule of kexec-purgatory.o Masahiro Yamada
  2022-06-22 13:39 ` [PATCH 1/3] s390: remove unneeded 'select BUILD_BIN2C' Alexander Gordeev
  2 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2022-06-13 17:09 UTC (permalink / raw)
  To: Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, linux-s390
  Cc: Masahiro Yamada, Ilya Leoshkevich, linux-kernel

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.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/s390/purgatory/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile
index 360ada80d20c..3e2c17ba04de 100644
--- a/arch/s390/purgatory/Makefile
+++ b/arch/s390/purgatory/Makefile
@@ -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
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] s390/purgatory: remove duplicated build rule of kexec-purgatory.o
  2022-06-13 17:09 [PATCH 1/3] s390: remove unneeded 'select BUILD_BIN2C' Masahiro Yamada
  2022-06-13 17:09 ` [PATCH 2/3] s390/purgatory: hard-code obj-y in Makefile Masahiro Yamada
@ 2022-06-13 17:09 ` Masahiro Yamada
  2022-06-22 13:48   ` Alexander Gordeev
  2022-06-22 13:39 ` [PATCH 1/3] s390: remove unneeded 'select BUILD_BIN2C' Alexander Gordeev
  2 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2022-06-13 17:09 UTC (permalink / raw)
  To: Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, linux-s390
  Cc: Masahiro Yamada, Ilya Leoshkevich, linux-kernel

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 <masahiroy@kernel.org>
---

 arch/s390/purgatory/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile
index 3e2c17ba04de..d237bc6841cb 100644
--- a/arch/s390/purgatory/Makefile
+++ b/arch/s390/purgatory/Makefile
@@ -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
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] s390: remove unneeded 'select BUILD_BIN2C'
  2022-06-13 17:09 [PATCH 1/3] s390: remove unneeded 'select BUILD_BIN2C' Masahiro Yamada
  2022-06-13 17:09 ` [PATCH 2/3] s390/purgatory: hard-code obj-y in Makefile Masahiro Yamada
  2022-06-13 17:09 ` [PATCH 3/3] s390/purgatory: remove duplicated build rule of kexec-purgatory.o Masahiro Yamada
@ 2022-06-22 13:39 ` Alexander Gordeev
  2 siblings, 0 replies; 7+ messages in thread
From: Alexander Gordeev @ 2022-06-22 13:39 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Heiko Carstens, Vasily Gorbik, Christian Borntraeger,
	Sven Schnelle, linux-s390, Martin Schwidefsky, Philipp Rudo,
	linux-kernel

On Tue, Jun 14, 2022 at 02:09:00AM +0900, Masahiro Yamada wrote:
> 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 <masahiroy@kernel.org>
> ---
> 
>  arch/s390/Kconfig | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
> index 91c0b80a8bf0..8cd9e56c629b 100644
> --- a/arch/s390/Kconfig
> +++ b/arch/s390/Kconfig
> @@ -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!

> -- 
> 2.32.0
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] s390/purgatory: hard-code obj-y in Makefile
  2022-06-13 17:09 ` [PATCH 2/3] s390/purgatory: hard-code obj-y in Makefile Masahiro Yamada
@ 2022-06-22 13:48   ` Alexander Gordeev
  2022-06-23 10:08     ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Gordeev @ 2022-06-22 13:48 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Heiko Carstens, Vasily Gorbik, Christian Borntraeger,
	Sven Schnelle, linux-s390, Ilya Leoshkevich, linux-kernel

On Tue, Jun 14, 2022 at 02:09:01AM +0900, Masahiro Yamada wrote:
> 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.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  arch/s390/purgatory/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile
> index 360ada80d20c..3e2c17ba04de 100644
> --- a/arch/s390/purgatory/Makefile
> +++ b/arch/s390/purgatory/Makefile
> @@ -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?).

> -- 
> 2.32.0
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] s390/purgatory: remove duplicated build rule of kexec-purgatory.o
  2022-06-13 17:09 ` [PATCH 3/3] s390/purgatory: remove duplicated build rule of kexec-purgatory.o Masahiro Yamada
@ 2022-06-22 13:48   ` Alexander Gordeev
  0 siblings, 0 replies; 7+ messages in thread
From: Alexander Gordeev @ 2022-06-22 13:48 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Heiko Carstens, Vasily Gorbik, Christian Borntraeger,
	Sven Schnelle, linux-s390, Ilya Leoshkevich, linux-kernel

On Tue, Jun 14, 2022 at 02:09:02AM +0900, Masahiro Yamada wrote:
> 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 <masahiroy@kernel.org>
> ---
> 
>  arch/s390/purgatory/Makefile | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile
> index 3e2c17ba04de..d237bc6841cb 100644
> --- a/arch/s390/purgatory/Makefile
> +++ b/arch/s390/purgatory/Makefile
> @@ -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!

> -- 
> 2.32.0
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] s390/purgatory: hard-code obj-y in Makefile
  2022-06-22 13:48   ` Alexander Gordeev
@ 2022-06-23 10:08     ` Masahiro Yamada
  0 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2022-06-23 10:08 UTC (permalink / raw)
  To: Alexander Gordeev
  Cc: Heiko Carstens, Vasily Gorbik, Christian Borntraeger,
	Sven Schnelle, linux-s390, Ilya Leoshkevich,
	Linux Kernel Mailing List

On Wed, Jun 22, 2022 at 10:48 PM Alexander Gordeev
<agordeev@linux.ibm.com> wrote:
>
> On Tue, Jun 14, 2022 at 02:09:01AM +0900, Masahiro Yamada wrote:
> > 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.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> >  arch/s390/purgatory/Makefile | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile
> > index 360ada80d20c..3e2c17ba04de 100644
> > --- a/arch/s390/purgatory/Makefile
> > +++ b/arch/s390/purgatory/Makefile
> > @@ -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.

A patch for x86 exists:

https://lore.kernel.org/all/20220616072407.2317131-1-masahiroy@kernel.org/


I will send riscv patches later.


> In addition, x86 use of CONFIG_ARCH_HAS_KEXEC_PURGATORY vs CONFIG_KEXEC_FILE
> is not consistent with other architectures (may be even incorrect?).

I thought of this when I reworked Makefiles,
but did not touch this part.


>
> > --
> > 2.32.0
> >



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-06-23 10:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-13 17:09 [PATCH 1/3] s390: remove unneeded 'select BUILD_BIN2C' Masahiro Yamada
2022-06-13 17:09 ` [PATCH 2/3] s390/purgatory: hard-code obj-y in Makefile Masahiro Yamada
2022-06-22 13:48   ` Alexander Gordeev
2022-06-23 10:08     ` Masahiro Yamada
2022-06-13 17:09 ` [PATCH 3/3] s390/purgatory: remove duplicated build rule of kexec-purgatory.o Masahiro Yamada
2022-06-22 13:48   ` Alexander Gordeev
2022-06-22 13:39 ` [PATCH 1/3] s390: remove unneeded 'select BUILD_BIN2C' Alexander Gordeev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.