All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Masahiro Yamada <masahiroy@kernel.org>,
	Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	Naveen N Rao <naveen@kernel.org>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc: use always-y instead of extra-y in Makefiles
Date: Mon, 09 Jun 2025 11:01:56 +1000	[thread overview]
Message-ID: <8734c9wwvv.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <CAK7LNAQvRFVOeQhVos1T-R-Uq9ekY9Fo7HS+D=TCZziLo5TpHQ@mail.gmail.com>

Masahiro Yamada <masahiroy@kernel.org> writes:
> On Tue, Jun 3, 2025 at 3:50 PM Christophe Leroy
> <christophe.leroy@csgroup.eu> wrote:
>> 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 ?
>
> The intent of "make ARCH=powerpc modules"
> is to compile objects that are necessary for modules,
> that is, all built-in objects are skipped.
>
> However,
> always-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_init_check
> would generate prom_init_check regardless,
> and its prerequisite, prom_init.o as well.
>
> With CONFIG_MODULES=y and
> CONFIG_MODVERSIONS=n,
> and without ifdef KBUILD_BUILTIN,
>
> $ make ARCH=powerpc CROSS_COMPILE=powerpc64-linux-gnu-   modules
>
> would result in this:
>
>
>   CC [M]  arch/powerpc/kvm/book3s_xive_native.o
>   CC [M]  arch/powerpc/kvm/book3s_64_vio.o
>   LD [M]  arch/powerpc/kvm/kvm.o
>   CC [M]  arch/powerpc/kvm/book3s_hv.o
>   AS [M]  arch/powerpc/kvm/book3s_hv_interrupts.o
>   CC [M]  arch/powerpc/kvm/book3s_64_mmu_hv.o
>   CC [M]  arch/powerpc/kvm/book3s_64_mmu_radix.o
>   CC [M]  arch/powerpc/kvm/book3s_hv_nested.o
>   CC [M]  arch/powerpc/kvm/book3s_hv_tm.o
>   LD [M]  arch/powerpc/kvm/kvm-hv.o
>   CC [M]  arch/powerpc/kernel/rtas_flash.o
>   CC      arch/powerpc/kernel/prom_init.o
>   PROMCHK arch/powerpc/kernel/prom_init_check
>   CC [M]  kernel/locking/locktorture.o
>   CC [M]  kernel/time/test_udelay.o
>   CC [M]  kernel/time/time_test.o
>   CC [M]  kernel/backtracetest.o
>   CC [M]  kernel/torture.o
>   CC [M]  kernel/resource_kunit.o
>   CC [M]  kernel/sysctl-test.o
>   CC [M]  fs/ext4/inode-test.o
>   LD [M]  fs/ext4/ext4-inode-test.o
>   CC [M]  fs/fat/namei_vfat.o
>   LD [M]  fs/fat/vfat.o
>   CC [M]  fs/fat/fat_test.o
>   CC [M]  fs/nls/nls_ucs2_utils.o
>   CC [M]  fs/netfs/buffered_read.o
>   CC [M]  fs/netfs/buffered_write.o
> ...
>
>
>
> You can see these two lines:
>
>   CC      arch/powerpc/kernel/prom_init.o
>   PROMCHK arch/powerpc/kernel/prom_init_check
>
> are supposed to be skipped when "make modules",
> but actually compiled without ifdef.
>
> So, I added ifdef KBUILD_BUILTIN to preserve
> the current behavior.

OK, that makes sense.

I don't really ever build just modules, so I wouldn't notice, but some
folks probably do.

Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)

cheers


  reply	other threads:[~2025-06-09  1:02 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
2025-06-07 10:11   ` Masahiro Yamada
2025-06-09  1:01     ` Michael Ellerman [this message]
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=8734c9wwvv.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=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=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 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.