[PATCH v4 04/14] modpost: add sym_find_with_module() helper

2022-05-08 Thread Masahiro Yamada
as the second argument. It is equivalent to find_module() if NULL is passed as the module pointer. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested-by: Nathan Chancellor --- Changes in v4: - Only takes the new helper from https://patchwork.kernel.org/project/linux-kbuild

[PATCH v4 01/14] modpost: remove left-over cross_compile declaration

2022-05-08 Thread Masahiro Yamada
This is a remnant of commit 6543becf26ff ("mod/file2alias: make modalias generation safe for cross compiling"). Signed-off-by: Masahiro Yamada --- Changes in v4: - New patch scripts/mod/modpost.h | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/mod/modpost.h b/s

[PATCH v4 00/14] kbuild: yet another series of cleanups (modpost, LTO, MODULE_REL_CRCS, export.h)

2022-05-08 Thread Masahiro Yamada
CONFIG_MODULE_REL_CRCS. I fixed this for v2. - Reflect some review comments in v1 - Refactor the code more - Avoid too long argument error Masahiro Yamada (14): modpost: remove left-over cross_compile declaration modpost: change the license of EXPORT_SYMBOL to bool type modpost: split

[PATCH v4 05/14] modpost: extract symbol versions from *.cmd files

2022-05-08 Thread Masahiro Yamada
ead of from ELF objects. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested-by: Nathan Chancellor --- (no changes since v2) Changes in v2: - Simplify the implementation (parse .cmd files after ELF) scripts/mod/modpost.c | 177 ++

[PATCH v4 02/14] modpost: change the license of EXPORT_SYMBOL to bool type

2022-05-08 Thread Masahiro Yamada
s can use it. I removed the orphan comment, "How a symbol is exported", which is unrelated to sec_mismatch_count. It is about enum export. See commit bd5cbcedf446 ("kbuild: export-type enhancement to modpost.c") Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested

[PATCH v4 09/14] kbuild: do not create *.prelink.o for Clang LTO or IBT

2022-05-08 Thread Masahiro Yamada
---/ | (LLVM bitcode) foo.mod.o --/ Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested-by: Nathan Chancellor --- (no changes since v2) Changes in v2: - replace the chain of $(if ...) with $(and ) scripts/Kbuild.include

[PATCH v4 08/14] genksyms: adjust the output format to modpost

2022-05-08 Thread Masahiro Yamada
Make genksyms output symbol versions in the format modpost expects, so the 'sed' is unneeded. This commit makes *.symversions completely unneeded. I will keep *.symversions in .gitignore and 'make clean' for a while. Otherwise, 'git status' might be surprising.

[PATCH v4 06/14] kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS

2022-05-08 Thread Masahiro Yamada
used here. The new C implementation works in the same way, whether CONFIG_RELOCATABLE is enabled or not. CONFIG_MODULE_REL_CRCS is no longer needed. Previously, Kbuild invoked additional $(LD) to update the CRCs in objects, but this step is unneeded too. Signed-off-by: Masahiro Yamada Tested-by

[PATCH v4 12/14] kbuild: make *.mod rule robust against too long argument error

2022-05-08 Thread Masahiro Yamada
hnson reported before [1]. [1] https://lore.kernel.org/linux-kbuild/4c02050c4e95e4cb8cc04282695f8...@codeaurora.org/ Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested-by: Nathan Chancellor --- (no changes since v2) Changes in v2: - New patch scripts/Makefile.build | 4 ++-- 1

[PATCH v4 10/14] kbuild: check static EXPORT_SYMBOL* by script instead of modpost

2022-05-08 Thread Masahiro Yamada
output from ${NM}. This works for CONFIG_LTO_CLANG=y because llvm-nm can dump symbols of LLVM bitcode. Revert 15bfc2348d54. Signed-off-by: Masahiro Yamada --- Changes in v4: - New patch scripts/Makefile.build | 4 scripts/check-local-export | 48 ++

[PATCH v4 11/14] kbuild: make built-in.a rule robust against too long argument error

2022-05-08 Thread Masahiro Yamada
mpare drivers/gpu/drm/i915/.built-in.a.cmd with/without this commit. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested-by: Nathan Chancellor --- (no changes since v2) Changes in v2: - New patch scripts/Makefile.build | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

[PATCH v4 03/14] modpost: split the section mismatch checks into section-check.c

2022-05-08 Thread Masahiro Yamada
modpost.c is too big, and the half of the code is for section checks. Split it. I fixed some style issues in the moved code. Signed-off-by: Masahiro Yamada --- Changes in v4: - New patch scripts/mod/Makefile|2 +- scripts/mod/modpost.c | 1202

[PATCH v4 07/14] kbuild: stop merging *.symversions

2022-05-08 Thread Masahiro Yamada
Now modpost reads symbol versions from .*.cmd files. The merged *.symversions are no longer needed. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested-by: Nathan Chancellor --- (no changes since v1) scripts/Makefile.build | 21 ++--- scripts/link-vmlinux.sh

[PATCH v4 13/14] kbuild: add cmd_and_savecmd macro

2022-05-08 Thread Masahiro Yamada
Separate out the command execution part of if_changed, as we did for if_changed_dep. This allows us to reuse it in if_changed_rule. define rule_foo $(call cmd_and_savecmd,foo) $(call cmd,bar) endef Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook --- Changes in

[PATCH v4 14/14] kbuild: rebuild multi-object modules when objtool is updated

2022-05-08 Thread Masahiro Yamada
When CONFIG_LTO_CLANG or CONFIG_X86_KERNEL_IBT is enabled, objtool for multi-object modules is postponed until the objects are linked together. Make sure to re-run objtool and re-link multi-object modules when objtool is updated. Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook Acked-by

Re: [PATCH v4 00/14] kbuild: yet another series of cleanups (modpost, LTO, MODULE_REL_CRCS, export.h)

2022-05-08 Thread Masahiro Yamada
On Mon, May 9, 2022 at 4:09 AM Masahiro Yamada wrote: > > This is the third batch of cleanups in this development cycle. > > Major changes in v4: > - Move static EXPORT_SYMBOL check to a script > - Some refactoring > > Major changes in v3: > > - Generate sym

Re: [PATCH v4 00/14] kbuild: yet another series of cleanups (modpost, LTO, MODULE_REL_CRCS, export.h)

2022-05-09 Thread Masahiro Yamada
On Tue, May 10, 2022 at 7:13 AM Nathan Chancellor wrote: > > On Mon, May 09, 2022 at 01:24:33PM +0900, Masahiro Yamada wrote: > > On Mon, May 9, 2022 at 4:09 AM Masahiro Yamada wrote: > > > > > > This is the third batch of cleanups in this development cycle. &

Re: [PATCH v4 03/14] modpost: split the section mismatch checks into section-check.c

2022-05-09 Thread Masahiro Yamada
On Tue, May 10, 2022 at 2:20 AM Nick Desaulniers wrote: > > On Sun, May 8, 2022 at 12:10 PM Masahiro Yamada wrote: > > > > modpost.c is too big, and the half of the code is for section checks. > > Split it. > > > > I fixed some style issues in the moved code

Re: [PATCH v4 06/14] kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS

2022-05-10 Thread Masahiro Yamada
On Tue, May 10, 2022 at 2:51 AM Nick Desaulniers wrote: > > On Sun, May 8, 2022 at 12:10 PM Masahiro Yamada wrote: > > > > diff --git a/include/asm-generic/export.h b/include/asm-generic/export.h > > index 07a36a874dca..51ce72ce80fa 100644 > > --- a/include/

Re: [PATCH v4 10/14] kbuild: check static EXPORT_SYMBOL* by script instead of modpost

2022-05-10 Thread Masahiro Yamada
On Tue, May 10, 2022 at 3:05 AM 'Nick Desaulniers' via Clang Built Linux wrote: > > On Sun, May 8, 2022 at 12:10 PM Masahiro Yamada wrote: > > > > diff --git a/scripts/check-local-export b/scripts/check-local-export > > new file mode 100755 > > index

Re: [PATCH v4 03/14] modpost: split the section mismatch checks into section-check.c

2022-05-11 Thread Masahiro Yamada
On Thu, May 12, 2022 at 3:48 AM Nick Desaulniers wrote: > > On Mon, May 9, 2022 at 11:57 PM Masahiro Yamada wrote: > > > > > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > > > > index a78b75f0eeb0..e7e2c70a98f5 100644 > > > > --- a

Re: [PATCH v4 01/14] modpost: remove left-over cross_compile declaration

2022-05-11 Thread Masahiro Yamada
On Mon, May 9, 2022 at 4:09 AM Masahiro Yamada wrote: > > This is a remnant of commit 6543becf26ff ("mod/file2alias: make > modalias generation safe for cross compiling"). > > Signed-off-by: Masahiro Yamada > --- Applied to linux-kbuild. > > Changes in v4

Re: [PATCH v4 02/14] modpost: change the license of EXPORT_SYMBOL to bool type

2022-05-11 Thread Masahiro Yamada
On Mon, May 9, 2022 at 4:09 AM Masahiro Yamada wrote: > > There were more EXPORT_SYMBOL types in the past. The following commits > removed unused ones. > > - f1c3d73e973c ("module: remove EXPORT_SYMBOL_GPL_FUTURE") > - 367948220fce ("module: remove EXPORT

Re: [PATCH 1/2] powerpc: syscalls: switch to generic syscalltbl.sh

2021-04-11 Thread Masahiro Yamada
Hi Michael, On Tue, Mar 2, 2021 at 12:31 AM Masahiro Yamada wrote: > > Many architectures duplicate similar shell scripts. > > This commit converts powerpc to use scripts/syscalltbl.sh. This also > unifies syscall_table_32.h and syscall_table_c32.h. > > Signed-off-by: Mas

[PATCH 2/2] tools: do not include scripts/Kbuild.include

2021-04-15 Thread Masahiro Yamada
66d2f4...@linux.ibm.com/ Fixes: d9f4ff50d2aa ("kbuild: spilt cc-option and friends to scripts/Makefile.compiler") Reported-by: Janosch Frank Reported-by: Christian Borntraeger Signed-off-by: Masahiro Yamada --- tools/testing/selftests/bpf/Makefile | 3 ++- tools/testing/se

Re: [PATCH 2/2] tools: do not include scripts/Kbuild.include

2021-04-15 Thread Masahiro Yamada
On Thu, Apr 15, 2021 at 4:40 PM Paolo Bonzini wrote: > > On 15/04/21 09:27, Masahiro Yamada wrote: > > Since commit d9f4ff50d2aa ("kbuild: spilt cc-option and friends to > > scripts/Makefile.compiler"), some kselftests fail to build. > > > > The tools/ d

Re: [PATCH 2/2] tools: do not include scripts/Kbuild.include

2021-04-16 Thread Masahiro Yamada
On Fri, Apr 16, 2021 at 2:56 PM Christian Borntraeger wrote: > > > On 15.04.21 10:06, Christian Borntraeger wrote: > > > > On 15.04.21 09:27, Masahiro Yamada wrote: > >> Since commit d9f4ff50d2aa ("kbuild: spilt cc-option and friends to > >> scripts/

[PATCH v2] tools: do not include scripts/Kbuild.include

2021-04-16 Thread Masahiro Yamada
f7-a5ac-cb8c-64966d2f4...@linux.ibm.com/ Fixes: d9f4ff50d2aa ("kbuild: spilt cc-option and friends to scripts/Makefile.compiler") Reported-by: Janosch Frank Reported-by: Christian Borntraeger Signed-off-by: Masahiro Yamada --- Changes in v2: - copy macros to tools/bu

Re: [PATCH v2] tools: do not include scripts/Kbuild.include

2021-04-17 Thread Masahiro Yamada
On Fri, Apr 16, 2021 at 10:01 PM Masahiro Yamada wrote: > > Since commit d9f4ff50d2aa ("kbuild: spilt cc-option and friends to > scripts/Makefile.compiler"), some kselftests fail to build. > > The tools/ directory opted out Kbuild, and went in a different > direction.

Re: powerpc{32,64} randconfigs

2021-04-21 Thread Masahiro Yamada
f833009006 > --- /dev/null > +++ b/arch/powerpc/configs/32-bit.config > @@ -0,0 +1 @@ > +CONFIG_PPC64=n Please do: # CONFIG_PPC64 is not set > diff --git a/arch/powerpc/configs/64-bit.config > b/arch/powerpc/configs/64-bit.config > new file mode 100644 > index ..0fe6406929e2 > --- /dev/null > +++ b/arch/powerpc/configs/64-bit.config > @@ -0,0 +1 @@ > +CONFIG_PPC64=y > -- Best Regards Masahiro Yamada

[PATCH] kbuild: replace LANG=C with LC_ALL=C

2021-04-24 Thread Masahiro Yamada
et the deterministic result. LANG=C is not strong enough to override LC_* that may be set by end users. [1]: https://reproducible-builds.org/docs/locales/ Signed-off-by: Masahiro Yamada --- arch/powerpc/boot/wrapper | 2 +- scripts/nsdeps

[PATCH v2] kbuild: replace LANG=C with LC_ALL=C

2021-04-29 Thread Masahiro Yamada
et the deterministic result. LANG=C is not strong enough to override LC_* that may be set by end users. [1]: https://reproducible-builds.org/docs/locales/ Signed-off-by: Masahiro Yamada Acked-by: Michael Ellerman (powerpc) Reviewed-by: Matthias Maennich Acked-by: Matthieu Baerts (mptcp) --- Chan

[PATCH] Raise the minimum GCC version to 5.2

2021-05-01 Thread Masahiro Yamada
=wg2k...@mail.gmail.com/ Signed-off-by: Masahiro Yamada --- I'd like Linus to pick up this patch if there is no objection. Documentation/process/changes.rst | 2 +- arch/arm64/Kconfig| 2 +- arch/powerpc/Kconfig | 2 +- arch/riscv/Kconfig| 2 +- include/linu

Re: [PATCH] Raise the minimum GCC version to 5.2

2021-05-03 Thread Masahiro Yamada
On Mon, May 3, 2021 at 3:17 PM Christophe Leroy wrote: > > > > Le 01/05/2021 à 17:15, Masahiro Yamada a écrit : > > The current minimum GCC version is 4.9 except ARCH=arm64 requiring > > GCC 5.1. > > > > When we discussed last time, we agreed to raise the min

Re: [PATCH] kbuild: replace LANG=C with LC_ALL=C

2021-05-05 Thread Masahiro Yamada
On Tue, Apr 27, 2021 at 4:30 AM Matthieu Baerts wrote: > > Hi, > > Thank you for the patch! > > On 24/04/2021 13:48, Masahiro Yamada wrote: > > LANG gives a weak default to each LC_* in case it is not explicitly > > defined. LC_ALL, if set, overrides all other

[PATCH 1/5] kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild

2021-05-12 Thread Masahiro Yamada
arch/$(SRCARCH)/Kbuild is useful for Makefile cleanups because you can use the obj-y syntax. Add an empty file if it is missing in arch/$(SRCARCH)/. Signed-off-by: Masahiro Yamada --- Makefile | 2 +- arch/alpha/Kbuild | 1 + arch/arc/Makefile | 3 --- arch/arm

Re: [PATCH kernel v3] powerpc/makefile: Do not redefine $(CPP) for preprocessor

2021-05-13 Thread Masahiro Yamada
R_PDP_ENDIAN__ 3412 [7] Clang, target with little endian only , -mbig-endian is ignored masahiro@grover:~$ echo | clang -E -dM -x c -| grep ENDIAN #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ #define __LITTLE_ENDIAN__ 1 #define __ORDER_BIG_ENDIAN__ 4321 #define __ORDER_LITTLE_ENDIAN__ 1234 #define __ORDER_PDP_ENDIAN__ 3412 masahiro@grover:~$ echo | clang -E -dM -x c - -mbig-endian | grep ENDIAN #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ #define __LITTLE_ENDIAN__ 1 #define __ORDER_BIG_ENDIAN__ 4321 #define __ORDER_LITTLE_ENDIAN__ 1234 #define __ORDER_PDP_ENDIAN__ 3412 -- Best Regards Masahiro Yamada

Re: [PATCH kernel v2] powerpc/makefile: Do not redefine $(CPP) for preprocessor

2021-05-13 Thread Masahiro Yamada
moved from scripts/Makefile.build commit 5cb0512c02ecd7e6214e912e4c150f4219ac78e0 Author: Linus Torvalds Date: Thu Nov 2 14:10:37 2017 -0700 Kbuild: don't pass "-C" to preprocessor when processing linker scripts You can entirely remove CPPFLAGS_vdso32.lds += -P -C -Upowerpc -- Best Regards Masahiro Yamada

Re: [PATCH 1/5] kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild

2021-05-26 Thread Masahiro Yamada
On Wed, May 12, 2021 at 5:00 PM Masahiro Yamada wrote: > > arch/$(SRCARCH)/Kbuild is useful for Makefile cleanups because you can > use the obj-y syntax. > > Add an empty file if it is missing in arch/$(SRCARCH)/. > > Signed-off-by: Masahiro Yamada > --- Applied to linu

Re: [PATCH] kbuild: introduce ccflags-remove-y and asflags-remove-y

2020-07-06 Thread Masahiro Yamada
lftest_dynamic. > While with this patch it looks like we add the flag (even though it is > already there), and then > removes the flag for all files in kernel/trace/* . You are right. I will drop this patch, and send v2. Thank you. -- Best Regards Masahiro Yamada

[PATCH v2 1/2] kbuild: introduce ccflags-remove-y and asflags-remove-y

2020-07-07 Thread Masahiro Yamada
2464a609ded0 ("ftrace: do not trace library functions") excluded too much. In later commit, I will try to remove ccflags-remove-y from sub-directory Makefiles. Suggested-by: Sami Tolvanen Signed-off-by: Masahiro Yamada Acked-by: Steven Rostedt (VMware) Acked-by: Michael Ellerman

Re: [PATCH 10/20] Documentation: kbuild/kconfig-language: eliminate duplicated word

2020-07-09 Thread Masahiro Yamada
On Wed, Jul 8, 2020 at 3:06 AM Randy Dunlap wrote: > > Drop the doubled word "the". > > Signed-off-by: Randy Dunlap > Cc: Jonathan Corbet > Cc: linux-...@vger.kernel.org > Cc: Masahiro Yamada I guess this series will go in via the doc sub-system. If so, ple

[PATCH] powerpc/boot: add DTB to 'targets'

2020-07-13 Thread Masahiro Yamada
builds DTB on demand. You need to add DTB to 'targets' explicitly so .*.cmd files are included. Signed-off-by: Masahiro Yamada --- I want to apply this to kbuild tree because this is needed to fix the build error caused by another kbuild patch: https://lkml.org/lkml/2020/7/7/134 arch/po

Re: [PATCH v2 13/16] scripts/kallsyms: move ignored symbol types to is_ignored_symbol()

2020-07-19 Thread Masahiro Yamada
On Mon, Jul 20, 2020 at 10:46 AM Finn Thain wrote: > > On Sun, 24 Nov 2019, Masahiro Yamada wrote: > > > Collect the ignored patterns to is_ignored_symbol(). > > > > Signed-off-by: Masahiro Yamada > > This commit (887df76de67f5) caused a regression in my pow

[PATCH] arch: vdso: add vdso linker script to 'targets' instead of extra-y

2020-08-31 Thread Masahiro Yamada
The vdso linker script is preprocessed on demand. Adding it to 'targets' is enough to include the .cmd file. Signed-off-by: Masahiro Yamada --- arch/arm64/kernel/vdso/Makefile | 2 +- arch/arm64/kernel/vdso32/Makefile | 2 +- arch/nds32/kernel/vdso/Makefile | 2 +- ar

[PATCH 2/2] kbuild: use more subdir- for visiting subdirectories while cleaning

2021-10-13 Thread Masahiro Yamada
take advantage of the parallel option (-j) for "make clean". I also cleaned up the comments. The "archdep" target does not exist. Signed-off-by: Masahiro Yamada --- Documentation/kbuild/makefiles.rst | 17 ++--- arch/alpha/Kbuild | 3 +++ arc

[PATCH] powerpc: clean vdso32 and vdso64 directories

2021-11-09 Thread Masahiro Yamada
e74491c300 ("powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o") Signed-off-by: Masahiro Yamada --- arch/powerpc/kernel/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 0e3640e14eb1..5fa68c2ef1f8 100644

Re: [PATCH] powerpc: clean vdso32 and vdso64 directories

2021-11-17 Thread Masahiro Yamada
On Wed, Nov 17, 2021 at 12:38 AM Christophe Leroy wrote: > > Hi Masahiro, > > Le 09/11/2021 à 19:50, Masahiro Yamada a écrit : > > Since commit bce74491c300 ("powerpc/vdso: fix unnecessary rebuilds of > > vgettimeofday.o"), "make ARCH=powerpc clean" d

Re: [PATCH v2 2/2] kbuild: Disable CONFIG_LD_ORPHAN_WARN for ld.lld 10.0.1

2020-12-01 Thread Masahiro Yamada
igned-off-by: Nathan Chancellor > > > > Thanks for the additions in v2. > > Reviewed-by: Nick Desaulniers > > I'm going to carry this for a few days in -next, and if no one screams, > ask Linus to pull it for v5.10-rc6. > > Thanks! > > -- > Kees Cook Sorry for the delay. Applied to linux-kbuild. But, I already see this in linux-next. Please let me know if I should drop it from my tree. -- Best Regards Masahiro Yamada

Re: [PATCH v2 1/2] kbuild: Hoist '--orphan-handling' into Kconfig

2020-12-01 Thread Masahiro Yamada
> -Kees > > -- > Kees Cook > > -- > You received this message because you are subscribed to the Google Groups > "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clang-built-linux+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/clang-built-linux/202011201607.75FA476%40keescook. -- Best Regards Masahiro Yamada

Re: [PATCH v2 2/2] kbuild: Disable CONFIG_LD_ORPHAN_WARN for ld.lld 10.0.1

2020-12-01 Thread Masahiro Yamada
On Wed, Dec 2, 2020 at 5:56 AM Kees Cook wrote: > > On Tue, Dec 01, 2020 at 10:31:37PM +0900, Masahiro Yamada wrote: > > On Wed, Nov 25, 2020 at 7:22 AM Kees Cook wrote: > > > > > > On Thu, Nov 19, 2020 at 01:13:27PM -0800, Nick Desaulniers wrote: > > > &g

[PATCH 2/3] kbuild: LD_VERSION redenomination

2020-12-12 Thread Masahiro Yamada
4th and 5th version components"). Since then, the last 4-digits returned by this script is always zeros. Remove the meaningless last 4-digits. This makes the version format consistent with GCC_VERSION, CLANG_VERSION, LLD_VERSION. Signed-off-by: Masahiro Yamada --- arch/arm64/Kconfig

Re: [PATCH] powerpc/boot: Fix build of dts/fsl

2020-12-15 Thread Masahiro Yamada
rectory. I do not understand the policy. If "fsl/" is a very special case, I just thought we could add a new syntax, fslimage-y, but I do not mind either way. fslimage-$(CONFIG_MPC8540_ADS) += cuImage.mpc8540ads targets += $(foreach x, dtbImage uImage cuImage simpleImage treeImage, \ $(patsubst $(x).%, dts/fsl/%.dtb, $(filter $(x).%, $(fslimage-y This Makefile is wrong over-all anyway. -- Best Regards Masahiro Yamada

Re: [PATCH] powerpc/boot: Fix build of dts/fsl

2020-12-15 Thread Masahiro Yamada
On Wed, Dec 16, 2020 at 11:41 AM Michael Ellerman wrote: > > Masahiro Yamada writes: > > On Tue, Dec 15, 2020 at 12:29 PM Michael Ellerman > > wrote: > >> > >> The lkp robot reported that some configs fail to build, for example > >> mpc85xx_smp_

Re: powerpc VDSO files being unnecessarily rebuilt

2020-12-17 Thread Masahiro Yamada
$(CONFIG_VDSO32),$(Q)$(MAKE) \ $(build)=arch/powerpc/kernel/vdso32 include/generated/vdso32-offsets.h) $(if $(CONFIG_PPC64),$(Q)$(MAKE) \ $(build)=arch/powerpc/kernel/vdso64 include/generated/vdso64-offsets.h) Second time: from arch/powerpc/kernel/Makefi

Re: powerpc VDSO files being unnecessarily rebuilt

2020-12-17 Thread Masahiro Yamada
On Thu, Dec 17, 2020 at 6:23 PM Masahiro Yamada wrote: > > On Thu, Dec 17, 2020 at 11:56 AM Michael Ellerman wrote: > > > > Hi all, > > > > Since the merge of the C VDSO I see we are repeatedly rebuilding some > > files in the VDSO, eg: > > > >

[PATCH 2/2] powerpc/vdso64: remove meaningless vgettimeofday.o build rule

2020-12-23 Thread Masahiro Yamada
VDSO64 is only built for the 64-bit kernel, hence vgettimeofday.o is built by the generic rule in scripts/Makefile.build. This line does not provide anything useful. Signed-off-by: Masahiro Yamada --- arch/powerpc/kernel/vdso64/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a

[PATCH 1/2] powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o

2020-12-23 Thread Masahiro Yamada
offsets in the embedded vdso images. Removing the unneeded second descend solves the problem. Link: https://lore.kernel.org/linuxppc-dev/87tuslxhry@mpe.ellerman.id.au/ Reported-by: Michael Ellerman Signed-off-by: Masahiro Yamada --- arch/powerpc/kernel/Makefile | 4

[PATCH 01/27] scripts: add generic syscalltbl.sh

2021-01-27 Thread Masahiro Yamada
single generic script should work for this case. Signed-off-by: Masahiro Yamada --- scripts/syscalltbl.sh | 52 +++ 1 file changed, 52 insertions(+) create mode 100644 scripts/syscalltbl.sh diff --git a/scripts/syscalltbl.sh b/scripts/syscalltbl.sh new file

[PATCH 00/27] arch: syscalls: unifiy all syscalltbl.sh into scripts/syscalltbl.sh

2021-01-27 Thread Masahiro Yamada
without changing the functionality. Masahiro Yamada (27): scripts: add generic syscalltbl.sh x86/syscalls: fix -Wmissing-prototypes warnings from COND_SYSCALL() x86/build: add missing FORCE and fix 'targets' to make if_changed work x86/entry/x32: rename __x32_compa

[PATCH 04/27] x86/entry/x32: rename __x32_compat_sys_* to __x64_compat_sys_*

2021-01-27 Thread Masahiro Yamada
s redefined __x32_sys_* to __x64_sys_* because there is no stub like __x32_sys_*. I think defining as follows is sensible and cleaner. __SYSCALL_COMMON(nr, sym) --> __x64_ __SYSCALL_X32(nr, sym) --> __x64_ The ugly #define __x32_sys_* will go away. Signed-off-by: Masahiro Yamad

[PATCH 05/27] x86/syscalls: switch to generic syscalltbl.sh

2021-01-27 Thread Masahiro Yamada
. This commit separates syscall_64.h and syscall_x32.h. Signed-off-by: Masahiro Yamada --- arch/x86/entry/syscall_32.c | 12 +-- arch/x86/entry/syscall_64.c | 9 ++ arch/x86/entry/syscall_x32.c | 15 +++-- arch/x86/entry/syscalls/Makefile | 10

[PATCH 06/27] ARM: syscalls: switch to generic syscalltbl.sh

2021-01-27 Thread Masahiro Yamada
As of v5.11-rc1, 12 architectures duplicate similar shell scripts in order to generate syscall table headers. My goal is to unify them into the single scripts/syscalltbl.sh. This commit converts ARM to use scripts/syscalltbl.sh. Signed-off-by: Masahiro Yamada --- arch/arm/kernel/entry

[PATCH 02/27] x86/syscalls: fix -Wmissing-prototypes warnings from COND_SYSCALL()

2021-01-27 Thread Masahiro Yamada
te: in expansion of macro 'COND_SYSCALL' 39 | COND_SYSCALL(io_setup); | ^~~~ ... __SYS_STUB0() and __SYS_STUBx() defined a few lines above have forward declarations. Let's do likewise for __COND_SYSCALL() to fix the warnings. Signed-off-by: Masahiro Yamada --- arc

[PATCH 03/27] x86/build: add missing FORCE and fix 'targets' to make if_changed work

2021-01-27 Thread Masahiro Yamada
e relative to the current Makefile. Fix all of them so the if_changed rules work correctly. Signed-off-by: Masahiro Yamada --- arch/x86/entry/syscalls/Makefile | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/arch/x86/entry/syscalls/Makefile

[PATCH 07/27] alpha: add missing FORCE and fix 'targets' to make if_changed work

2021-01-27 Thread Masahiro Yamada
e relative to the current Makefile. Fix all of them so the if_changed rules work correctly. Signed-off-by: Masahiro Yamada --- arch/alpha/kernel/syscalls/Makefile | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/alpha/kernel/syscalls/Makefile b/a

[PATCH 09/27] ia64: add missing FORCE and fix 'targets' to make if_changed work

2021-01-27 Thread Masahiro Yamada
e relative to the current Makefile. Fix all of them so the if_changed rules work correctly. Signed-off-by: Masahiro Yamada --- arch/ia64/kernel/syscalls/Makefile | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/ia64/kernel/syscalls/Makefile b/arch/ia64/ker

[PATCH 23/27] sparc: syscalls: switch to generic syscalltbl.sh

2021-01-27 Thread Masahiro Yamada
. Signed-off-by: Masahiro Yamada --- arch/sparc/include/asm/Kbuild| 1 - arch/sparc/kernel/syscalls/Makefile | 19 - arch/sparc/kernel/syscalls/syscalltbl.sh | 36 arch/sparc/kernel/systbls_32.S | 4 +-- arch/sparc/kernel/systbls_64.S

[PATCH 08/27] alpha: syscalls: switch to generic syscalltbl.sh

2021-01-27 Thread Masahiro Yamada
As of v5.11-rc1, 12 architectures duplicate similar shell scripts in order to generate syscall table headers. My goal is to unify them into the single scripts/syscalltbl.sh. This commit converts alpha to use scripts/syscalltbl.sh. Signed-off-by: Masahiro Yamada --- arch/alpha/kernel/syscalls

[PATCH 27/27] xtensa: syscalls: switch to generic syscalltbl.sh

2021-01-27 Thread Masahiro Yamada
As of v5.11-rc1, 12 architectures duplicate similar shell scripts in order to generate syscall table headers. My goal is to unify them into the single scripts/syscalltbl.sh. This commit converts xtensa to use scripts/syscalltbl.sh. Signed-off-by: Masahiro Yamada --- arch/xtensa/kernel

[PATCH 10/27] ia64: syscalls: switch to generic syscalltbl.sh

2021-01-27 Thread Masahiro Yamada
As of v5.11-rc1, 12 architectures duplicate similar shell scripts in order to generate syscall table headers. My goal is to unify them into the single scripts/syscalltbl.sh. This commit converts ia64 to use scripts/syscalltbl.sh. Signed-off-by: Masahiro Yamada --- arch/ia64/kernel/entry.S

[PATCH 17/27] parisc: add missing FORCE and fix 'targets' to make if_changed work

2021-01-27 Thread Masahiro Yamada
e relative to the current Makefile. Fix all of them so the if_changed rules work correctly. Signed-off-by: Masahiro Yamada --- arch/parisc/kernel/syscalls/Makefile | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/parisc/kernel/syscalls/Makefile b/ar

[PATCH 12/27] m68k: syscalls: switch to generic syscalltbl.sh

2021-01-27 Thread Masahiro Yamada
As of v5.11-rc1, 12 architectures duplicate similar shell scripts in order to generate syscall table headers. My goal is to unify them into the single scripts/syscalltbl.sh. This commit converts m68k to use scripts/syscalltbl.sh. Signed-off-by: Masahiro Yamada --- arch/m68k/kernel/syscalls

[PATCH 18/27] parisc: syscalls: switch to generic syscalltbl.sh

2021-01-27 Thread Masahiro Yamada
. Signed-off-by: Masahiro Yamada --- arch/parisc/include/asm/Kbuild| 1 - arch/parisc/kernel/syscall.S | 16 +- arch/parisc/kernel/syscalls/Makefile | 19 arch/parisc/kernel/syscalls/syscalltbl.sh | 36 --- 4 files changed, 12

[PATCH 11/27] m68k: add missing FORCE and fix 'targets' to make if_changed work

2021-01-27 Thread Masahiro Yamada
e relative to the current Makefile. Fix all of them so the if_changed rules work correctly. Signed-off-by: Masahiro Yamada --- arch/m68k/kernel/syscalls/Makefile | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/m68k/kernel/syscalls/Makefile b/arch/m68k/ker

[PATCH 14/27] microblaze: syscalls: switch to generic syscalltbl.sh

2021-01-27 Thread Masahiro Yamada
As of v5.11-rc1, 12 architectures duplicate similar shell scripts in order to generate syscall table headers. My goal is to unify them into the single scripts/syscalltbl.sh. This commit converts microblaze to use scripts/syscalltbl.sh. Signed-off-by: Masahiro Yamada --- arch/microblaze/kernel

[PATCH 24/27] powerpc: add missing FORCE and fix 'targets' to make if_changed work

2021-01-27 Thread Masahiro Yamada
e relative to the current Makefile. Fix all of them so the if_changed rules work correctly. Signed-off-by: Masahiro Yamada --- arch/powerpc/kernel/syscalls/Makefile | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/kernel/syscalls/Makefile

[PATCH 13/27] microblaze: add missing FORCE and fix 'targets' to make if_changed work

2021-01-27 Thread Masahiro Yamada
e relative to the current Makefile. Fix all of them so the if_changed rules work correctly. Signed-off-by: Masahiro Yamada --- arch/microblaze/kernel/syscalls/Makefile | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/microblaze/kernel/syscalls/Makefile b/

[PATCH 19/27] sh: add missing FORCE and fix 'targets' to make if_changed work

2021-01-27 Thread Masahiro Yamada
e relative to the current Makefile. Fix all of them so the if_changed rules work correctly. Signed-off-by: Masahiro Yamada --- arch/sh/kernel/syscalls/Makefile | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/sh/kernel/syscalls/Makefile b/arch/sh/ker

[PATCH 21/27] sparc: remove wrong comment from arch/sparc/include/asm/Kbuild

2021-01-27 Thread Masahiro Yamada
These are NOT exported to userspace. The headers listed in arch/sparc/include/uapi/asm/Kbuild are exported. Signed-off-by: Masahiro Yamada --- arch/sparc/include/asm/Kbuild | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild index

[PATCH 26/27] xtensa: add missing FORCE and fix 'targets' to make if_changed work

2021-01-27 Thread Masahiro Yamada
e relative to the current Makefile. Fix all of them so the if_changed rules work correctly. Signed-off-by: Masahiro Yamada --- arch/xtensa/kernel/syscalls/Makefile | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/xtensa/kernel/syscalls/Makefile b/ar

[PATCH 22/27] sparc: add missing FORCE and fix 'targets' to make if_changed work

2021-01-27 Thread Masahiro Yamada
e relative to the current Makefile. Fix all of them so the if_changed rules work correctly. Signed-off-by: Masahiro Yamada --- arch/sparc/kernel/syscalls/Makefile | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/sparc/kernel/syscalls/Makefile b/a

[PATCH 25/27] powerpc: syscalls: switch to generic syscalltbl.sh

2021-01-27 Thread Masahiro Yamada
As of v5.11-rc1, 12 architectures duplicate similar shell scripts in order to generate syscall table headers. My goal is to unify them into the single scripts/syscalltbl.sh. This commit converts powerpc to use scripts/syscalltbl.sh. Signed-off-by: Masahiro Yamada --- arch/powerpc/include/asm

[PATCH 15/27] mips: add missing FORCE and fix 'targets' to make if_changed work

2021-01-27 Thread Masahiro Yamada
e relative to the current Makefile. Fix all of them so the if_changed rules work correctly. Signed-off-by: Masahiro Yamada --- arch/mips/kernel/syscalls/Makefile | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/arch/mips/kernel/syscalls/Makefi

[PATCH 16/27] mips: syscalls: switch to generic syscalltbl.sh

2021-01-27 Thread Masahiro Yamada
into syscall_table_o32.h. Signed-off-by: Masahiro Yamada --- arch/mips/include/asm/Kbuild| 7 +++-- arch/mips/kernel/scall32-o32.S | 4 +-- arch/mips/kernel/scall64-n32.S | 3 +-- arch/mips/kernel/scall64-n64.S | 3 +-- arch/mips/kernel/scall64-o32.S

[PATCH 20/27] sh: syscalls: switch to generic syscalltbl.sh

2021-01-27 Thread Masahiro Yamada
As of v5.11-rc1, 12 architectures duplicate similar shell scripts in order to generate syscall table headers. My goal is to unify them into the single scripts/syscalltbl.sh. This commit converts sh to use scripts/syscalltbl.sh. Signed-off-by: Masahiro Yamada --- arch/sh/kernel/syscalls

Re: [PATCH 02/27] x86/syscalls: fix -Wmissing-prototypes warnings from COND_SYSCALL()

2021-01-27 Thread Masahiro Yamada
On Thu, Jan 28, 2021 at 9:52 AM Masahiro Yamada wrote: > > Building kernel/sys_ni.c with W=1 omits tons of -Wmissing-prototypes This is a typo. "omits" -> "emits" > warnings. > > $ make W=1 kernel/sys_ni.o > [ snip ] > CC kernel/sys_ni.

Re: [PATCH 01/27] scripts: add generic syscalltbl.sh

2021-01-27 Thread Masahiro Yamada
On Thu, Jan 28, 2021 at 9:51 AM Masahiro Yamada wrote: > > Most of architectures generate syscall headers at the compile time > in the almost same way. > > The syscall table has the same format for all architectures. Each line > has 3, 4 or 5 fields; syscall number, ABI, sy

Re: [PATCH 1/2] powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o

2021-01-27 Thread Masahiro Yamada
On Thu, Dec 24, 2020 at 2:12 AM Masahiro Yamada wrote: > > vgettimeofday.o is unnecessarily rebuilt. Adding it to 'targets' is not > enough to fix the issue. Kbuild is correctly rebuilding it because the > command line is changed. > > PowerPC builds each vd

Re: [PATCH 2/2] powerpc/vdso64: remove meaningless vgettimeofday.o build rule

2021-01-27 Thread Masahiro Yamada
On Thu, Dec 24, 2020 at 2:12 AM Masahiro Yamada wrote: > > VDSO64 is only built for the 64-bit kernel, hence vgettimeofday.o is > built by the generic rule in scripts/Makefile.build. > > This line does not provide anything useful. > > Signed-off-by: Masahiro Yamada Michael

Re: [PATCH 2/3] kbuild: LD_VERSION redenomination

2021-01-27 Thread Masahiro Yamada
On Sun, Dec 13, 2020 at 1:54 AM Masahiro Yamada wrote: > > Commit ccbef1674a15 ("Kbuild, lto: add ld-version and ld-ifversion > macros") introduced scripts/ld-version.sh for GCC LTO. > > At that time, this script handled 5 version fields because GCC LTO > needed the

Re: [PATCH] kbuild: reuse vmlinux.o in vmlinux_link

2020-05-22 Thread Masahiro Yamada
+ Michael, and PPC ML. They may know something about the reason of failure. On Sat, May 23, 2020 at 2:41 AM Masahiro Yamada wrote: > > On Fri, May 22, 2020 at 5:27 AM Sami Tolvanen wrote: > > > > Instead of linking all compilation units again each time vmlinux_link is

Re: [PATCH] kbuild: reuse vmlinux.o in vmlinux_link

2020-05-23 Thread Masahiro Yamada
it is used fo section mismatch only. For a defconfig build this is instant but for an allyesconfig this add two minutes to a full build (that anyways takes ~2 hours). Signed-off-by: Sam Ravnborg > > Thanks, > Nick > > > > > > > On Sat, M

Re: [PATCH] kbuild: reuse vmlinux.o in vmlinux_link

2020-05-24 Thread Masahiro Yamada
Hi Sam, Thanks for the comments. On Sun, May 24, 2020 at 1:54 AM Sam Ravnborg wrote: > > Hi Masahiro. > > On Sun, May 24, 2020 at 12:12:35AM +0900, Masahiro Yamada wrote: > > Hi Nicholas, > > (+CC: Sam Ravnborg) > > > > > > On Sat, May

Re: [PATCH] kbuild: reuse vmlinux.o in vmlinux_link

2020-06-15 Thread Masahiro Yamada
On Tue, Jun 16, 2020 at 6:47 AM Sami Tolvanen wrote: > > On Sat, May 23, 2020 at 8:13 AM Masahiro Yamada wrote: > > > > Hi Nicholas, > > (+CC: Sam Ravnborg) > > > > > > On Sat, May 23, 2020 at 7:06 PM Nicholas Piggin wrote: > > > > > &g

[PATCH] kbuild: introduce ccflags-remove-y and asflags-remove-y

2020-06-27 Thread Masahiro Yamada
CFLAGS_REMOVE_.o works per object, that is, there is no convenient way to filter out flags for every object in a directory. Add ccflags-remove-y and asflags-remove-y to make it easily. Use ccflags-remove-y to clean up some Makefiles. Suggested-by: Sami Tolvanen Signed-off-by: Masahiro Yamada

Re: [PATCH] kbuild: introduce ccflags-remove-y and asflags-remove-y

2020-06-29 Thread Masahiro Yamada
On Mon, Jun 29, 2020 at 2:55 PM Michael Ellerman wrote: > > Masahiro Yamada writes: > > CFLAGS_REMOVE_.o works per object, that is, there is no > > convenient way to filter out flags for every object in a directory. > > > > Add ccflags-remove-y and asflags-remove-y

[PATCH 2/3] powerpc: make the install target not depend on any build artifact

2021-07-29 Thread Masahiro Yamada
The install target should not depend on any build artifact. The reason is explained in commit 19514fc665ff ("arm, kbuild: make "make install" not depend on vmlinux"). Change the PowerPC installation code in a similar way. Signed-off-by: Masahiro Yamada --- arch/powerpc/

[PATCH 1/3] powerpc: remove unused zInstall target from arch/powerpc/boot/Makefile

2021-07-29 Thread Masahiro Yamada
lained about it for 7 years, which means this code was unneeded. With this removal, the install.sh will be passed in with 4 parameters. Simplify the shell script. Signed-off-by: Masahiro Yamada --- arch/powerpc/boot/Makefile | 6 +- arch/powerpc/boot/install.sh | 13 - 2 f

[PATCH 3/3] powerpc: move the install rule to arch/powerpc/Makefile

2021-07-29 Thread Masahiro Yamada
Currently, the install target in arch/powerpc/Makefile descends into arch/powerpc/boot/Makefile to invoke the shell script, but there is no good reason to do so. arch/powerpc/Makefile can run the shell script directly. Signed-off-by: Masahiro Yamada --- arch/powerpc/Makefile | 3

<    1   2   3   4   5   >