linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Masahiro Yamada <masahiroy@kernel.org>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	Naveen N Rao <naveen@kernel.org>,
	linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc: use always-y instead of extra-y in Makefiles
Date: Tue, 3 Jun 2025 08:44:04 +0200	[thread overview]
Message-ID: <3cebc3c4-dbaf-41f6-b98d-1d33bea2eeeb@csgroup.eu> (raw)
In-Reply-To: <20250602163302.478765-1-masahiroy@kernel.org>



Le 02/06/2025 à 18:32, Masahiro Yamada a écrit :
> The extra-y syntax is planned for deprecation because it is similar
> to always-y.
> 
> When building the boot wrapper, always-y and extra-y are equivalent.
> Use always-y instead.
> 
> In arch/powerpc/kernel/Makefile, I added ifdef KBUILD_BUILTIN to
> keep the current behavior: prom_init_check is skipped when building
> only modular objects.

I don't understand what you mean.

CONFIG_PPC_OF_BOOT_TRAMPOLINE is a bool, it cannot be a module.

prom_init_check is only to check the content of prom_init.o which is 
never a module.

Is always-y to run _after_ prom_init.o is built ?

Christophe

> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>   arch/powerpc/boot/Makefile   | 6 +++---
>   arch/powerpc/kernel/Makefile | 4 +++-
>   2 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> index 184d0680e661..b003f7ac8755 100644
> --- a/arch/powerpc/boot/Makefile
> +++ b/arch/powerpc/boot/Makefile
> @@ -242,13 +242,13 @@ $(obj)/wrapper.a: $(obj-wlib) FORCE
>   hostprogs	:= addnote hack-coff mktree
>   
>   targets		+= $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) zImage.lds
> -extra-y		:= $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
> +always-y	:= $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
>   		   $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds
>   
>   dtstree		:= $(src)/dts
>   
>   wrapper		:= $(src)/wrapper
> -wrapperbits	:= $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
> +wrapperbits	:= $(always-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
>   			$(wrapper) FORCE
>   
>   #############
> @@ -455,7 +455,7 @@ WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
>   WRAPPER_BINDIR := /usr/sbin
>   INSTALL := install
>   
> -extra-installed		:= $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(extra-y))
> +extra-installed		:= $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(always-y))
>   hostprogs-installed	:= $(patsubst %, $(DESTDIR)$(WRAPPER_BINDIR)/%, $(hostprogs))
>   wrapper-installed	:= $(DESTDIR)$(WRAPPER_BINDIR)/wrapper
>   dts-installed		:= $(patsubst $(dtstree)/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(dtstree)/*.dts))
> diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
> index 4d2daa8e7bca..ac01cedad107 100644
> --- a/arch/powerpc/kernel/Makefile
> +++ b/arch/powerpc/kernel/Makefile
> @@ -201,7 +201,9 @@ obj-$(CONFIG_ALTIVEC)		+= vector.o
>   
>   obj-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_init.o
>   obj64-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_entry_64.o
> -extra-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_init_check
> +ifdef KBUILD_BUILTIN
> +always-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_init_check
> +endif
>   
>   obj-$(CONFIG_PPC64)		+= $(obj64-y)
>   obj-$(CONFIG_PPC32)		+= $(obj32-y)


  reply	other threads:[~2025-06-03  7:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-02 16:32 [PATCH] powerpc: use always-y instead of extra-y in Makefiles Masahiro Yamada
2025-06-03  6:44 ` Christophe Leroy [this message]
2025-06-07 10:11   ` Masahiro Yamada
2025-06-09  1:01     ` Michael Ellerman
2025-06-09  4:31       ` Masahiro Yamada
2025-08-28  6:33 ` Madhavan Srinivasan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3cebc3c4-dbaf-41f6-b98d-1d33bea2eeeb@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=masahiroy@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=naveen@kernel.org \
    --cc=npiggin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).