All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: fix the modules order between drivers and libs
@ 2022-08-13 23:09 Masahiro Yamada
  2022-08-17 14:58 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2022-08-13 23:09 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Masahiro Yamada, Michal Marek, Nick Desaulniers, linux-kernel

Commit b2c885549122 ("kbuild: update modules.order only when contained
modules are updated") accidentally changed the modules order.

Prior to that commit, the modules order was determined based on
vmlinux-dirs, which lists core-y/m, drivers-y/m, libs-y/m, in this order.

Now, subdir-modorder lists them in a different order: core-y/m, libs-y/m,
drivers-y/m.

Presumably, there was no practical issue because the modules in drivers
and libs are orthogonal, but there is no reason to have this distortion.

Get back to the original order.

Fixes: b2c885549122 ("kbuild: update modules.order only when contained modules are updated")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 Makefile | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 5f5c43a52455..c4e06e8020f1 100644
--- a/Makefile
+++ b/Makefile
@@ -1113,13 +1113,11 @@ vmlinux-alldirs	:= $(sort $(vmlinux-dirs) Documentation \
 		     $(patsubst %/,%,$(filter %/, $(core-) \
 			$(drivers-) $(libs-))))
 
-subdir-modorder := $(addsuffix modules.order,$(filter %/, \
-			$(core-y) $(core-m) $(libs-y) $(libs-m) \
-			$(drivers-y) $(drivers-m)))
-
 build-dirs	:= $(vmlinux-dirs)
 clean-dirs	:= $(vmlinux-alldirs)
 
+subdir-modorder := $(addsuffix /modules.order, $(build-dirs))
+
 # Externally visible symbols (used by link-vmlinux.sh)
 KBUILD_VMLINUX_OBJS := $(head-y) $(patsubst %/,%/built-in.a, $(core-y))
 KBUILD_VMLINUX_OBJS += $(addsuffix built-in.a, $(filter %/, $(libs-y)))
-- 
2.34.1


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

* Re: [PATCH] kbuild: fix the modules order between drivers and libs
  2022-08-13 23:09 [PATCH] kbuild: fix the modules order between drivers and libs Masahiro Yamada
@ 2022-08-17 14:58 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2022-08-17 14:58 UTC (permalink / raw)
  To: Linux Kbuild mailing list
  Cc: Michal Marek, Nick Desaulniers, Linux Kernel Mailing List

On Sun, Aug 14, 2022 at 8:10 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Commit b2c885549122 ("kbuild: update modules.order only when contained
> modules are updated") accidentally changed the modules order.
>
> Prior to that commit, the modules order was determined based on
> vmlinux-dirs, which lists core-y/m, drivers-y/m, libs-y/m, in this order.
>
> Now, subdir-modorder lists them in a different order: core-y/m, libs-y/m,
> drivers-y/m.
>
> Presumably, there was no practical issue because the modules in drivers
> and libs are orthogonal, but there is no reason to have this distortion.
>
> Get back to the original order.
>
> Fixes: b2c885549122 ("kbuild: update modules.order only when contained modules are updated")
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---


Applied to linux-kbuild/fixes.


>
>  Makefile | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 5f5c43a52455..c4e06e8020f1 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1113,13 +1113,11 @@ vmlinux-alldirs := $(sort $(vmlinux-dirs) Documentation \
>                      $(patsubst %/,%,$(filter %/, $(core-) \
>                         $(drivers-) $(libs-))))
>
> -subdir-modorder := $(addsuffix modules.order,$(filter %/, \
> -                       $(core-y) $(core-m) $(libs-y) $(libs-m) \
> -                       $(drivers-y) $(drivers-m)))
> -
>  build-dirs     := $(vmlinux-dirs)
>  clean-dirs     := $(vmlinux-alldirs)
>
> +subdir-modorder := $(addsuffix /modules.order, $(build-dirs))
> +
>  # Externally visible symbols (used by link-vmlinux.sh)
>  KBUILD_VMLINUX_OBJS := $(head-y) $(patsubst %/,%/built-in.a, $(core-y))
>  KBUILD_VMLINUX_OBJS += $(addsuffix built-in.a, $(filter %/, $(libs-y)))
> --
> 2.34.1
>


-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2022-08-17 15:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-13 23:09 [PATCH] kbuild: fix the modules order between drivers and libs Masahiro Yamada
2022-08-17 14:58 ` Masahiro Yamada

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.