[PATCH] arch: vdso: remove if-conditionals of $(c-gettimeofday-y)

2021-07-30 Thread Masahiro Yamada
s define CFLAGS_vgettimeofday.o Remove all the meaningless conditionals. Signed-off-by: Masahiro Yamada --- arch/arm/vdso/Makefile | 4 arch/arm64/kernel/vdso/Makefile | 5 + arch/arm64/kernel/vdso32/Makefile | 3 --- arch/mips/vdso/Makefile | 2 -- arch/powerp

[PATCH v2] arch: vdso: remove if-conditionals of $(c-gettimeofday-y)

2021-07-30 Thread Masahiro Yamada
s define CFLAGS_vgettimeofday.o Remove all the meaningless conditionals. Signed-off-by: Masahiro Yamada --- Changes in v2: - Fix csky as well arch/arm/vdso/Makefile | 4 arch/arm64/kernel/vdso/Makefile | 5 + arch/arm64/kernel/vdso32/Makefile | 3 --- arch/csky/ker

[PATCH 2/3] trace: refactor TRACE_IRQFLAGS_SUPPORT in Kconfig

2021-07-31 Thread Masahiro Yamada
Make architectures select TRACE_IRQFLAGS_SUPPORT instead of having many defines. Signed-off-by: Masahiro Yamada --- arch/Kconfig | 3 +++ arch/arc/Kconfig | 4 +--- arch/arm/Kconfig | 5 + arch/arm64/Kconfig| 4 +--- arch/csky/Kconfig

Re: [PATCH v2] scripts/Makefile.clang: default to LLVM_IAS=1

2021-08-09 Thread Masahiro Yamada
h this change, as they will have to specify > LLVM_IAS=0. I think that making this change for LLVM=1 makes sense but > changing the default for just CC=clang feels like a bit much at this > point in time. I would love to hear from others on this though, I am not > going to object much further than this. > > Regardless of that concern, this patch does what it says so: > > Reviewed-by: Nathan Chancellor Applied to linux-kbuild. Thanks. -- Best Regards Masahiro Yamada

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

2021-08-18 Thread Masahiro Yamada
On Sat, Jul 31, 2021 at 5:30 AM Nick Desaulniers wrote: > > On Thu, Jul 29, 2021 at 7:22 AM Masahiro Yamada wrote: > > > > Currently, the install target in arch/powerpc/Makefile descends into > > arch/powerpc/boot/Makefile to invoke the shell script, but there is no

Re: [PATCH 3/7] powerpc: replace cc-option-yn uses with cc-option

2021-08-19 Thread Masahiro Yamada
+ifeq ($(HAS_BIARCH),-m32) > > I don't love that we have to repeat "-m32" in each check. > > I'm pretty sure you can use ifdef here, because HAS_BIARCH is a simple > variable (assigned with ":="). > > ie, this can be: > > ifdef HAS_BIARCH > > > And that avoids having to spell out "-m32" everywhere. > > cheers Yes. Comments from Nathan and Michael both sound good. -- Best Regards Masahiro Yamada

Re: [RESEND PATCH v3 05/11] mtd: rawnand: vf610_nfc: add initializer to avoid -Wmaybe-uninitialized

2019-05-03 Thread Masahiro Yamada
Hi Miquel, On Thu, May 2, 2019 at 11:14 PM Miquel Raynal wrote: > > Hi Masahiro, > > Masahiro Yamada wrote on Tue, 23 Apr > 2019 12:49:53 +0900: > > > This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common > > place. We need to eliminate potential iss

Re: [RESEND PATCH v3 09/11] powerpc/mm/radix: mark __radix__flush_tlb_range_psize() as __always_inline

2019-05-03 Thread Masahiro Yamada
Hi Christophe, On Tue, Apr 30, 2019 at 12:36 AM Christophe Leroy wrote: > > > > Le 23/04/2019 à 05:49, Masahiro Yamada a écrit : > > This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common > > place. We need to eliminate potential issues beforehand. >

[PATCH] powerpc/boot: fix broken way to pass CONFIG options

2019-05-13 Thread Masahiro Yamada
the behavior of pre-standard C preprocessors. Signed-off-by: Masahiro Yamada --- arch/powerpc/boot/.gitignore | 2 -- arch/powerpc/boot/Makefile | 14 +++--- arch/powerpc/boot/serial.c | 1 - 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/boot/.gitignore

Re: [PATCH] powerpc/boot: fix broken way to pass CONFIG options

2019-05-13 Thread Masahiro Yamada
On Mon, May 13, 2019 at 9:33 PM Masahiro Yamada wrote: > > Commit 5e9dcb6188a4 ("powerpc/boot: Expose Kconfig symbols to wrapper") > was wrong, but commit e41b93a6be57 ("powerpc/boot: Fix build failures > with -j 1") was also wrong. > > Check-in source file

[PATCH v2] powerpc/boot: pass CONFIG options in a simpler and more robust way

2019-05-13 Thread Masahiro Yamada
ons are accessible from all .c and .S files in arch/powerpc/boot/. I also removed the -traditional flag to make include/linux/kconfig.h work. This flag makes the preprocessor imitate the behavior of the pre-standard C compiler, but I do not understand why it is necessary. Signed-off-by: Masah

Re: [PATCH] powerpc/boot: fix broken way to pass CONFIG options

2019-05-14 Thread Masahiro Yamada
On Mon, May 13, 2019 at 11:24 PM Oliver wrote: > > On Mon, May 13, 2019 at 9:23 PM Masahiro Yamada > wrote: > > > > Commit 5e9dcb6188a4 ("powerpc/boot: Expose Kconfig symbols to wrapper") > > was wrong, but commit e41b93a6be57 ("powerpc/boot: Fix bui

Re: [RESEND PATCH v3 10/11] powerpc/mm/radix: mark as __tlbie_pid() and friends as__always_inline

2019-05-16 Thread Masahiro Yamada
et in radix mode and 256 set in hpt mode. */ -static inline void _tlbiel_pid(unsigned long pid, unsigned long ric) +static __always_inline void _tlbiel_pid(unsigned long pid, unsigned long ric) { int set; -- Best Regards Masahiro Yamada

Re: [RESEND PATCH v3 04/11] s390/cpacf: mark scpacf_query() as __always_inline

2019-05-16 Thread Masahiro Yamada
On Fri, May 17, 2019 at 8:01 AM Laura Abbott wrote: > > On 4/22/19 8:49 PM, Masahiro Yamada wrote: > > This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common > > place. We need to eliminate potential issues beforehand. > > > > If it is enabled fo

[PATCH] kbuild: do not check name uniqueness of builtin modules

2019-05-19 Thread Masahiro Yamada
/5/19/123 Fixes: 3a48a91901c5 ("kbuild: check uniqueness of module names") Reported-by: Stephen Rothwell Signed-off-by: Masahiro Yamada --- scripts/modules-check.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/modules-check.sh b/scripts/modules-chec

[PATCH] powerpc/mm: mark more tlb functions as __always_inline

2019-05-20 Thread Masahiro Yamada
te) constraint for the asm operands, functions propagating propagated 'ric' must be always inlined. Fixes: 9012d011660e ("compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING") Reported-by: Laura Abbott Signed-off-by: Masahiro Yamada --- arch/powerpc/mm/book3s64/hash_na

Re: [PATCH] powerpc/mm: mark more tlb functions as __always_inline

2019-05-21 Thread Masahiro Yamada
On Tue, May 21, 2019 at 3:54 PM Christophe Leroy wrote: > > > > Le 21/05/2019 à 08:16, Masahiro Yamada a écrit : > > With CONFIG_OPTIMIZE_INLINING enabled, Laura Abbott reported error > > with gcc 9.1.1: > > > >arch/powerpc/mm/book3s64/radix_tlb.c: In

[PATCH v2] powerpc/mm: mark more tlb functions as __always_inline

2019-05-21 Thread Masahiro Yamada
te) constraint for the asm operands, functions propagating "ric" must be always inlined. Fixes: 9012d011660e ("compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING") Reported-by: Laura Abbott Signed-off-by: Masahiro Yamada --- Changes in v2: - Do not split lines arch/

Re: [PATCH] powerpc/configs: Rename foo_basic_defconfig to foo_base.config

2019-05-28 Thread Masahiro Yamada
et_base.config > > similarity index 100% > > rename from arch/powerpc/configs/corenet_basic_defconfig > > rename to arch/powerpc/configs/corenet_base.config > > diff --git a/arch/powerpc/configs/mpc85xx_basic_defconfig > > b/arch/powerpc/configs/mpc85xx_base.config > > similarity index 100% > > rename from arch/powerpc/configs/mpc85xx_basic_defconfig > > rename to arch/powerpc/configs/mpc85xx_base.config > > diff --git a/arch/powerpc/configs/mpc86xx_basic_defconfig > > b/arch/powerpc/configs/mpc86xx_base.config > > similarity index 100% > > rename from arch/powerpc/configs/mpc86xx_basic_defconfig > > rename to arch/powerpc/configs/mpc86xx_base.config > > -- > > 2.20.1 > > > ---end quoted text--- -- Best Regards Masahiro Yamada

[PATCH 05/15] kbuild: add CONFIG_HEADERS_INSTALL and loosen the dependency of samples

2019-06-04 Thread Masahiro Yamada
e.o CC [M] samples/trace_events/trace-events-sample.o CC [M] samples/trace_printk/trace-printk.o AR samples/vfio-mdev/built-in.a AR samples/built-in.a Signed-off-by: Masahiro Yamada --- Makefile | 8 arch/arc/configs/tb10x_defconfig

[PATCH 00/15] kbuild: refactor headers_install and support compile-test of UAPI headers

2019-06-04 Thread Masahiro Yamada
de to $(INSTALL_HDR_PATH)/include. [3] Support compile-test of UAPI headers This is implemented in usr/include/Makefile Jani Nikula (1): kbuild: add support for ensuring headers are self-contained Masahiro Yamada (14): kbuild: remove headers_{install,check}_all kbuild: remove stale de

[PATCH] ocxl: do not use C++ style comments in uapi header

2019-06-04 Thread Masahiro Yamada
Linux kernel tolerates C++ style comments these days. Actually, the SPDX License tags for .c files start with //. On the other hand, uapi headers are written in more strict C, where the C++ comment style is forbidden. Signed-off-by: Masahiro Yamada --- include/uapi/misc/ocxl.h | 14

Re: [PATCH] ocxl: do not use C++ style comments in uapi header

2019-06-04 Thread Masahiro Yamada
On Tue, Jun 4, 2019 at 8:54 PM Frederic Barrat wrote: > > > > Le 04/06/2019 à 13:16, Masahiro Yamada a écrit : > > Linux kernel tolerates C++ style comments these days. Actually, the > > SPDX License tags for .c files start with //. > > > > On the other ha

Re: [PATCH 00/15] kbuild: refactor headers_install and support compile-test of UAPI headers

2019-06-04 Thread Masahiro Yamada
On Tue, Jun 4, 2019 at 7:15 PM Masahiro Yamada wrote: > > > Multiple people have suggested to compile-test UAPI headers. > > Currently, Kbuild provides simple sanity checks by headers_check > but they are not enough to catch bugs. > > The most recent patch I know is Davi

Re: [PATCH] ocxl: do not use C++ style comments in uapi header

2019-06-06 Thread Masahiro Yamada
Hi Michael, On Wed, Jun 5, 2019 at 3:18 PM Andrew Donnellan wrote: > > On 4/6/19 10:12 pm, Masahiro Yamada wrote: > > On Tue, Jun 4, 2019 at 8:54 PM Frederic Barrat > > wrote: > >> > >> > >> > >> Le 04/06/2019 à 13:16, Masahiro Yamada a é

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Masahiro Yamada
m functions in > > > net/checksum.h") > > > > Of course not the above one (copy/paste error), but: > > - ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly") > > That's the one I looked at. No. Not that one. The commit you presumably want to revert is: a771f2b82aa2 ("[PATCH] Add a section about inlining to Documentation/CodingStyle") This is now referred to as "__always_inline disease", though. CONFIG_OPTIMIZE_INLINING has 14 years of history for x86. See commit 60a3cdd06394 ("x86: add optimized inlining"). We always give gcc freedom to not inline functions marked as inline. -- Best Regards Masahiro Yamada

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Masahiro Yamada
On Fri, Feb 18, 2022 at 1:49 AM David Laight wrote: > > From: Masahiro Yamada > > Sent: 17 February 2022 16:17 > ... > > No. Not that one. > > > > The commit you presumably want to revert is: > > > > a771f2b82aa2 ("[PATCH] Add a secti

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Masahiro Yamada
On Fri, Feb 18, 2022 at 3:10 AM Segher Boessenkool wrote: > > On Fri, Feb 18, 2022 at 02:27:16AM +0900, Masahiro Yamada wrote: > > On Fri, Feb 18, 2022 at 1:49 AM David Laight > > wrote: > > > That description is largely fine. > > > > > > Inappropr

Re: powerpc-linux-gnu-ld: warning: orphan section `.data.rel.ro' from `arch/powerpc/kernel/head_44x.o' being placed in section `.data.rel.ro'.

2017-11-13 Thread Masahiro Yamada
ns explicitly > > Match powerpc/64 and include .data.rel* input sections in the .data output > section explicitly. > > This should solve the warning: > > powerpc-linux-gnu-ld: warning: orphan section `.data.rel.ro' from > `arch/powerpc/kernel/head_44x.o' being pl

[PATCH 21/23] gcc-plugins: move GCC version check for PowerPC to Kconfig

2018-02-16 Thread Masahiro Yamada
For PowerPC, GCC 5.2 is the requirement for GCC plugins. Move the version check to Kconfig, and remove the ugly checker. Signed-off-by: Masahiro Yamada --- arch/powerpc/Kconfig | 2 +- scripts/Makefile.gcc-plugins | 8 2 files changed, 1 insertion(+), 9 deletions(-) diff

[PATCH 00/23] kconfig: move compiler capability tests to Kconfig

2018-02-16 Thread Masahiro Yamada
ig. So, it can not refelect user configuration. If this is required, $(shell ) must be dynamically re-calculated depending on other symbols. But, this is difficult, and may cause performance issue. Masahiro Yamada (22): kbuild: remove kbuild cache kbuild: remove CONFIG_CROSS_COMPILE supp

Re: [PATCH 00/23] kconfig: move compiler capability tests to Kconfig

2018-02-20 Thread Masahiro Yamada
case, $(cc-option, -m32 -foo) is y, but $(cc-option, -m64 -foo) is n ? (or vice versa) If the answer is yes, $(cc-option -foo) would have to be re-calculated every time CONFIG_64BIT is toggled. This is what I'd like to avoid, though. -- Best Regards Masahiro Yamada

Re: [PATCH 00/23] kconfig: move compiler capability tests to Kconfig

2018-02-21 Thread Masahiro Yamada
2018-02-21 18:56 GMT+09:00 Arnd Bergmann : > On Wed, Feb 21, 2018 at 8:38 AM, Masahiro Yamada > wrote: >> 2018-02-20 0:18 GMT+09:00 Ulf Magnusson : >> >>>> >>>> I'm not happy that we in one context can reference CONFIG variables >>>> dire

Re: [PATCH 00/23] kconfig: move compiler capability tests to Kconfig

2018-02-21 Thread Masahiro Yamada
2018-02-21 19:52 GMT+09:00 Arnd Bergmann : > On Wed, Feb 21, 2018 at 11:20 AM, Masahiro Yamada > wrote: >> 2018-02-21 18:56 GMT+09:00 Arnd Bergmann : >>> On Wed, Feb 21, 2018 at 8:38 AM, Masahiro Yamada >>> wrote: >>>> 2018-02-20 0:18 GMT+09:00 Ulf M

Re: [PATCH 00/23] kconfig: move compiler capability tests to Kconfig

2018-03-01 Thread Masahiro Yamada
2018-02-22 6:39 GMT+09:00 Ulf Magnusson : > On Wed, Feb 21, 2018 at 09:57:03PM +0900, Masahiro Yamada wrote: >> 2018-02-21 19:52 GMT+09:00 Arnd Bergmann : >> > On Wed, Feb 21, 2018 at 11:20 AM, Masahiro Yamada >> > wrote: >> >> 2018-02-21 18:56 GMT+09:0

Re: [PATCH 4/4] powerpc: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selected

2018-05-06 Thread Masahiro Yamada
Do you want somebody else to provide those numbers ? > > If you have a booting kernel, yes some more numbers would be good. > > Thanks, > Nick I applied this series because I want it to be more tested in linux-next. Some requests: - Could you provide information to replace '[ppc32 numbers here]'? (or just remove it) - V2 is welcome if you have code improvement. (I thought so from your comments) Thanks. -- Best Regards Masahiro Yamada

Re: [RFC PATCH 1/2] powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS

2018-05-06 Thread Masahiro Yamada
ride LD+= -m elf$(BITS)$(LDEMULATION) > -override CC+= -m$(BITS) > +KBUILD_CPPFLAGS+= -m$(BITS) Do you mean this? KBUILD_CFLAGS+= -m$(BITS) > +KBUILD_AFLAGS += -m$(BITS) -Wl,-a$(BITS) Both KBUILD_CPPFLAGS and KBUILD_AFLAGS are added to orig_a_flags in scripts/Makefile.lib So, -m$(BITS) will be doubled for *.S files. > +LDFLAGS+= -m elf$(BITS)$(LDEMULATION) > KBUILD_ARFLAGS += --target=elf$(BITS)-$(GNUTARGET) > endif > -- Best Regards Masahiro Yamada

Re: [PATCH v2 3/5] kbuild: call cc-option with the current set of KBUILD_CFLAGS

2018-05-09 Thread Masahiro Yamada
CC_OPTION_CFLAGS) -nostdlib -x c > /dev/null -o "$$TMP",$(1),$(2)) > + $(CC) $(1) $(KBUILD_CFLAGS) $(CC_OPTION_CFLAGS) -nostdlib -x c > /dev/null -o "$$TMP",$(1),$(2)) > > # ld-option > # Usage: LDFLAGS += $(call ld-option, -X) > -- > 2.17.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Best Regards Masahiro Yamada

Re: [PATCH v2 0/4] LD_DEAD_CODE_DATA_ELIMINATION fixes and enabling for powerpc

2018-05-13 Thread Masahiro Yamada
d" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Best Regards Masahiro Yamada

[PATCH 08/22] mtd: nand: pasemi: return error code of nand_scan() on error

2016-11-04 Thread Masahiro Yamada
The nand_scan() returns an appropriate error value when it fails. Use it instead of the fixed error code -ENXIO. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/pasemi_nand.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers

[PATCH 00/22] mtd: nand: return error code of nand_scan(_ident, _tail) on error

2016-11-04 Thread Masahiro Yamada
. Masahiro Yamada (22): mtd: nand: ams-delta: return error code of nand_scan() on error mtd: nand: cmx270: return error code of nand_scan() on error mtd: nand: cs553x: return error code of nand_scan() on error mtd: nand: gpio: return error code of nand_scan() on error mtd: nand: mpc5121

[PATCH] powerpc: squash lines for simple wrapper functions

2016-09-06 Thread Masahiro Yamada
Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada --- arch/powerpc/kernel/ptrace.c| 42 ++--- arch/powerpc/kvm/booke.c| 5 +--- arch/powerpc/platforms/ps3/repository.c | 22 - 3 files changed, 18

[PATCH] ALSA: squash lines for simple wrapper functions

2016-09-06 Thread Masahiro Yamada
Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada --- sound/aoa/fabrics/layout.c | 7 +-- sound/pci/asihpi/hpifunc.c | 7 ++- sound/pci/ctxfi/ctvmem.c| 6 +- sound/pci/emu10k1/p16v.c

Re: [RFC PATCH v2 4/5] kbuild: Add generic hook for architectures to use before the final vmlinux link

2024-06-10 Thread Masahiro Yamada
efile.vmlinux will be the right place. > + > btf_vmlinux_bin_o="" > if is_enabled CONFIG_DEBUG_INFO_BTF; then > btf_vmlinux_bin_o=.btf.vmlinux.bin.o > @@ -273,7 +285,7 @@ if is_enabled CONFIG_KALLSYMS; then > fi > fi > > -vmlinux_link vmlinux "${kallsymso}" ${btf_vmlinux_bin_o} > +vmlinux_link vmlinux "${kallsymso}" ${btf_vmlinux_bin_o} ${arch_vmlinux_o} > > # fill in BTF IDs > if is_enabled CONFIG_DEBUG_INFO_BTF && is_enabled CONFIG_BPF; then > -- > 2.45.2 > -- Best Regards Masahiro Yamada

Re: [RFC PATCH v2 4/5] kbuild: Add generic hook for architectures to use before the final vmlinux link

2024-06-10 Thread Masahiro Yamada
On Tue, Jun 11, 2024 at 2:20 AM Naveen N Rao wrote: > > On Mon, Jun 10, 2024 at 06:14:51PM GMT, Masahiro Yamada wrote: > > On Mon, Jun 10, 2024 at 5:39 PM Naveen N Rao wrote: > > > > > > On powerpc, we would like to be able to make a pass on vmlinux.o and > >

Re: [PATCH 1/6] kallsyms: Optimize multiple times of realloc() to one time of malloc()

2024-07-15 Thread Masahiro Yamada
; Signed-off-by: Zheng Yejian I do not think this is worthwhile. realloc() is simple. If this is a problem, you can increase the "+= 1" to "+= 65536" or something. -- Best Regards Masahiro Yamada

Re: [PATCH 2/6] kallsyms: Emit symbol at the holes in the text

2024-07-16 Thread Masahiro Yamada
> if (base_relative) > record_relative_base(); > optimize_token_table(); > diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh > index 518c70b8db50..8e1373902bfe 100755 > --- a/scripts/link-vmlinux.sh > +++ b/scripts/link-vmlinux.s

Re: [PATCH 2/6] kallsyms: Emit symbol at the holes in the text

2024-07-20 Thread Masahiro Yamada
On Thu, Jul 18, 2024 at 12:45 PM Zheng Yejian wrote: > > On 2024/7/16 16:33, Masahiro Yamada wrote: > > On Thu, Jun 13, 2024 at 10:36 PM Zheng Yejian > > wrote: > >> > >> When a weak type function is overridden, its symbol will be removed > >> fr

Re: [RFC PATCH v4 12/17] powerpc64/ftrace: Move ftrace sequence out of line

2024-08-27 Thread Masahiro Yamada
e.init,"aw" > +SYM_DATA(ftrace_ool_stub_inittext_count, .long ${num_ool_stubs_inittext}) > + > +SYM_CODE_START(ftrace_ool_stub_inittext) > + .space ${num_ool_stubs_inittext} * FTRACE_OOL_STUB_SIZE > +SYM_CODE_END(ftrace_ool_stub_inittext) > +.popsection > +EOF > + > +${CC} ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS} \ > + ${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL} \ > + -c -o ${arch_vmlinux_o} ${arch_vmlinux_S} Please do not compile this within a shell script. scripts/Makefile.build provides rule_as_o_S to do this. [1] vmlinux.o --> arch/powerpc/tools/vmlinux.S [2] arch/powerpc/tools/vmlinux.S --> arch/powerpc/tools/vmlinux.o Please split these in separate build rules. > -- > 2.45.2 > -- Best Regards Masahiro Yamada

Re: linux-next: build failure after merge of the powerpc tree

2024-09-09 Thread Masahiro Yamada
ctree)/scripts/Makefile.userprogs endif -ifneq ($(need-dtbslist)$(dtb-y)$(dtb-)$(filter %.dtb.o %.dtbo.o,$(targets)),) +ifneq ($(need-dtbslist)$(dtb-y)$(dtb-)$(filter %.dtb %.dtb.o %.dtbo.o,$(targets)),) include $(srctree)/scripts/Makefile.dtbs endif -- Best Regards Masahiro Yamada

[PATCH 2/3] powerpc: use __kernel_{uid,gid}32_t in uapi/asm/stat.h

2022-06-01 Thread Masahiro Yamada
x/types.h. A similar issue was reported for the android binder. [1] [1]: https://lore.kernel.org/all/20220601010017.2639048-1-cmlla...@google.com/ Fixes: c01013a2f8dd ("powerpc: add asm/stat.h to UAPI compile-test coverage") Signed-off-by: Masahiro Yamada --- arch/powerpc/include/uap

[PATCH 0/3] asm-generic: fix misconversion of {uid,gid}_t

2022-06-01 Thread Masahiro Yamada
I accidentally broke android binder.h: https://lore.kernel.org/all/20220601010017.2639048-1-cmlla...@google.com/ I checked my previous conversions, and found some more. (at least, the sparc one seems fatal.) Masahiro Yamada (3): mips: use __kernel_{uid,gid}32_t in uapi/asm/stat.h powerpc

[PATCH] powerpc: get rid of #include

2022-06-04 Thread Masahiro Yamada
init/version.c Let's copy the solution from MIPS. (get_random_boot() in arch/mips/kernel/relocate.c) Fixes: 6a38ea1d7b94 ("powerpc/fsl_booke/32: randomize the kernel image offset") Signed-off-by: Masahiro Yamada --- If this gets into the mainline before -rc2 or -rc3, I will base m

[PATCH] powerpc/purgatory: Omit use of bin2c

2022-06-25 Thread Masahiro Yamada
bit kernel. (KEXEC_FILE depends on PPC64). Signed-off-by: Masahiro Yamada --- arch/powerpc/Kconfig | 1 - arch/powerpc/purgatory/.gitignore| 1 - arch/powerpc/purgatory/Makefile | 8 ++-- arch/powerpc/purgatory/kexec-purgatory.S | 14 ++ scripts/re

Re: [PATCH v7 21/25] Kbuild: add Rust support

2022-07-16 Thread Masahiro Yamada
> +# Rust targets > +# --- > + > +# "Is Rust available?" target > +PHONY += rustavailable > +rustavailable: > + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust-is-available.sh -v && > echo >&2 "Rust is available!" > + Is it intentional to print the successful message to stderr? -- Best Regards Masahiro Yamada

Re: [PATCH] powerpc/purgatory: Omit use of bin2c

2022-07-24 Thread Masahiro Yamada
On Sun, Jun 26, 2022 at 7:42 AM Masahiro Yamada wrote: > > The .incbin assembler directive is much faster than bin2c + $(CC). > > Do similar refactoring as in commit 4c0f032d4963 ("s390/purgatory: > Omit use of bin2c"). > > Please note the .quad directive matc

[PATCH v2] powerpc/purgatory: Omit use of bin2c

2022-07-24 Thread Masahiro Yamada
bit kernel. (KEXEC_FILE depends on PPC64). Signed-off-by: Masahiro Yamada Reviewed-by: Segher Boessenkool --- Changes in v2: - Fix a typo (kexec_purgatroy_end -> kexec_purgatory_end) arch/powerpc/Kconfig | 1 - arch/powerpc/purgatory/.gitignore| 1 - arch/powerpc/purga

Re: [PATCH] powerpc/purgatory: Omit use of bin2c

2022-07-24 Thread Masahiro Yamada
On Mon, Jul 25, 2022 at 10:42 AM Segher Boessenkool wrote: > > On Sun, Jun 26, 2022 at 07:40:37AM +0900, Masahiro Yamada wrote: > > The .incbin assembler directive is much faster than bin2c + $(CC). > > And perhaps more importantly it is simpler and less clumsy. > > > -

Re: [PATCH v5 12/17] powerpc64/ftrace: Move ftrace sequence out of line

2024-10-09 Thread Masahiro Yamada
2 > + std r12, -16(r11) > mfctr r12 > +#else > + std r0, -16(r11) > + mflrr12 > + /* Put ctr in r12 for global entry and branch there */ > + mtctr r12 > +#endif > bctrl > > /* > diff --git a/arch/powerpc/tools/Makefile b/arch/powerpc/tools/Makefile > new file mode 100644 > index ..3a389526498e > --- /dev/null > +++ b/arch/powerpc/tools/Makefile > @@ -0,0 +1,12 @@ > +# SPDX-License-Identifier: GPL-2.0-or-later > + > +quiet_cmd_gen_ftrace_ool_stubs = GEN $@ > + cmd_gen_ftrace_ool_stubs = $< vmlinux.o $@ > + > +$(obj)/.vmlinux.arch.S: $(src)/ftrace-gen-ool-stubs.sh vmlinux.o FORCE $(obj)/vmlinux.arch.S: $(src)/ftrace-gen-ool-stubs.sh vmlinux.o FORCE > + $(call if_changed,gen_ftrace_ool_stubs) > + > +$(obj)/.vmlinux.arch.o: $(obj)/.vmlinux.arch.S FORCE > + $(call if_changed_rule,as_o_S) This is unnecessary because the build rule %.S -> %.o is available in scripts/Makefile.build > + > +clean-files += .vmlinux.arch.S .vmlinux.arch.o if_changed macro needs 'targets' assignment. This line should be replaced with: targets += vmlinux.arch.S > diff --git a/arch/powerpc/tools/ftrace-gen-ool-stubs.sh > b/arch/powerpc/tools/ftrace-gen-ool-stubs.sh > new file mode 100755 > index ..8e0a6d4ea202 > --- /dev/null > +++ b/arch/powerpc/tools/ftrace-gen-ool-stubs.sh > @@ -0,0 +1,43 @@ > +#!/bin/sh > +# SPDX-License-Identifier: GPL-2.0-or-later > + > +# Error out on error > +set -e > + > +is_enabled() { > + grep -q "^$1=y" include/config/auto.conf > +} Instead of checking the CONFIG option in this script, I recommend passing the 64bit flag as a command line parameter. > + > +vmlinux_o=${1} > +arch_vmlinux_S=${2} > + > +RELOCATION=R_PPC64_ADDR64 > +if is_enabled CONFIG_PPC32; then > + RELOCATION=R_PPC_ADDR32 > +fi > + > +num_ool_stubs_text=$(${CROSS_COMPILE}objdump -r -j > __patchable_function_entries ${vmlinux_o} | ${CROSS_COMPILE}objdump -> ${OBJDUMP} > +grep -v ".init.text" | grep "${RELOCATION}" | wc -l) > +num_ool_stubs_inittext=$(${CROSS_COMPILE}objdump -r -j > __patchable_function_entries ${vmlinux_o} | ${CROSS_COMPILE}objdump -> ${OBJDUMP} I also recommend passing ${OBJDUMP} from the command line parameter. > +grep ".init.text" | grep "${RELOCATION}" | wc -l) > + > +cat > ${arch_vmlinux_S} < +#include > +#include > + > +.pushsection .tramp.ftrace.text,"aw" > +SYM_DATA(ftrace_ool_stub_text_end_count, .long ${num_ool_stubs_text}) > + > +SYM_CODE_START(ftrace_ool_stub_text_end) > + .space ${num_ool_stubs_text} * FTRACE_OOL_STUB_SIZE > +SYM_CODE_END(ftrace_ool_stub_text_end) > +.popsection > + > +.pushsection .tramp.ftrace.init,"aw" > +SYM_DATA(ftrace_ool_stub_inittext_count, .long ${num_ool_stubs_inittext}) > + > +SYM_CODE_START(ftrace_ool_stub_inittext) > + .space ${num_ool_stubs_inittext} * FTRACE_OOL_STUB_SIZE > +SYM_CODE_END(ftrace_ool_stub_inittext) > +.popsection > +EOF > -- > 2.46.0 > -- Best Regards Masahiro Yamada

Re: [PATCH v5 13/17] powerpc64/ftrace: Support .text larger than 32MB with out-of-line stubs

2024-10-09 Thread Masahiro Yamada
ble_function_entries ${vmlinux_o} | > grep ".init.text" | grep "${RELOCATION}" | wc -l) > > +num_ool_stubs_text_builtin=${1} > +if [ ${num_ool_stubs_text} -gt ${num_ool_stubs_text_builtin} ]; then > + num_ool_stubs_text_end=$(expr ${num_ool_stubs_text} - > ${num_ool_stubs_text_builtin}) > +else > + num_ool_stubs_text_end=0 > +fi > + > cat > ${arch_vmlinux_S} < #include > #include > > .pushsection .tramp.ftrace.text,"aw" > -SYM_DATA(ftrace_ool_stub_text_end_count, .long ${num_ool_stubs_text}) > +SYM_DATA(ftrace_ool_stub_text_end_count, .long ${num_ool_stubs_text_end}) > > SYM_CODE_START(ftrace_ool_stub_text_end) > - .space ${num_ool_stubs_text} * FTRACE_OOL_STUB_SIZE > + .space ${num_ool_stubs_text_end} * FTRACE_OOL_STUB_SIZE > SYM_CODE_END(ftrace_ool_stub_text_end) > .popsection > > -- > 2.46.0 > -- Best Regards Masahiro Yamada

Re: [PATCH v5 00/17] powerpc: Core ftrace rework, support for ftrace direct and bpf trampolines

2024-10-09 Thread Masahiro Yamada
++ > samples/ftrace/ftrace-direct-modify.c | 85 +- > samples/ftrace/ftrace-direct-multi-modify.c | 101 ++- > samples/ftrace/ftrace-direct-multi.c| 79 +- > samples/ftrace/ftrace-direct-too.c | 83 +- > samples/ftrace/ftrace-direct.c | 69 +-

Re: [PATCH v5 11/17] kbuild: Add generic hook for architectures to use before the final vmlinux link

2024-10-09 Thread Masahiro Yamada
> } > > # generate .BTF typeinfo from DWARF debuginfo > @@ -214,6 +214,11 @@ fi > > ${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init > init/version-timestamp.o > > +arch_vmlinux_o="" > +if is_enabled CONFIG_ARCH_WANTS_PRE_LINK_VMLINUX; then > + arch_vmlinux_o=arch/${SRCARCH}/tools/.vmlinux.arch.o arch_vmlinux_o=arch/${SRCARCH}/tools/vmlinux.arch.o > +fi > + > btf_vmlinux_bin_o= > kallsymso= > strip_debug= > -- > 2.46.0 > -- Best Regards Masahiro Yamada

Re: [PATCH v5 11/17] kbuild: Add generic hook for architectures to use before the final vmlinux link

2024-10-10 Thread Masahiro Yamada
On Thu, Oct 10, 2024 at 6:57 PM Hari Bathini wrote: > > > On 09/10/24 8:53 pm, Masahiro Yamada wrote: > > On Mon, Sep 16, 2024 at 5:58 AM Hari Bathini wrote: > >> > >> From: Naveen N Rao > >> > >> On powerpc, we would like to be able to make

Re: [PATCH v6 11/17] kbuild: Add generic hook for architectures to use before the final vmlinux link

2024-10-27 Thread Masahiro Yamada
MAKE} -f "${srctree}/scripts/Makefile.build" obj=init > init/version-timestamp.o > > +arch_vmlinux_o="" Nit: unnecessary double quotes. arch_vmlinux_o= is enough. Other than that, Acked-by: Masahiro Yamada -- Best Regards Masahiro Yamada

Re: [PATCH v6 13/17] powerpc64/ftrace: Support .text larger than 32MB with out-of-line stubs

2024-10-27 Thread Masahiro Yamada
quot; | > num_ool_stubs_inittext=$($objdump -r -j __patchable_function_entries > "$vmlinux_o" | > grep ".init.text" | grep -c "$RELOCATION") > > +if [ "$num_ool_stubs_text" -gt "$num_ool_stubs_text_builtin" ]; then > + num_ool_stubs_text_end=$((num_ool_stubs_text - > num_ool_stubs_text_builtin)) > +else > + num_ool_stubs_text_end=0 > +fi > + > cat > "$arch_vmlinux_S" < #include > #include > > .pushsection .tramp.ftrace.text,"aw" > -SYM_DATA(ftrace_ool_stub_text_end_count, .long $num_ool_stubs_text) > +SYM_DATA(ftrace_ool_stub_text_end_count, .long $num_ool_stubs_text_end) > > SYM_CODE_START(ftrace_ool_stub_text_end) > - .space $num_ool_stubs_text * FTRACE_OOL_STUB_SIZE > + .space $num_ool_stubs_text_end * FTRACE_OOL_STUB_SIZE > SYM_CODE_END(ftrace_ool_stub_text_end) > .popsection I got this warning: GEN arch/powerpc/tools/vmlinux.arch.S AS arch/powerpc/tools/vmlinux.arch.o arch/powerpc/tools/vmlinux.arch.S: Assembler messages: arch/powerpc/tools/vmlinux.arch.S:9: Warning: .space repeat count is zero, ignored -- Best Regards Masahiro Yamada

Re: [PATCH v6 12/17] powerpc64/ftrace: Move ftrace sequence out of line

2024-10-27 Thread Masahiro Yamada
ol_stub_text_end_count, .long $num_ool_stubs_text) > + > +SYM_CODE_START(ftrace_ool_stub_text_end) > + .space $num_ool_stubs_text * FTRACE_OOL_STUB_SIZE > +SYM_CODE_END(ftrace_ool_stub_text_end) > +.popsection > + > +.pushsection .tramp.ftrace.init,"aw" > +SYM_DATA(ftrace_ool_stub_inittext_count, .long $num_ool_stubs_inittext) > + > +SYM_CODE_START(ftrace_ool_stub_inittext) > + .space $num_ool_stubs_inittext * FTRACE_OOL_STUB_SIZE To avoid the warning mention in another thread, it is better to avoid zero .space. > +SYM_CODE_END(ftrace_ool_stub_inittext) > +.popsection > +EOF > -- > 2.47.0 > -- Best Regards Masahiro Yamada

Re: [PATCH v11 2/5] modpost: Produce extended MODVERSIONS information

2024-12-28 Thread Masahiro Yamada
t?plain=1#L197 > + buf_printf(b, "\t\"%s\\0\"\n", s->name); > + } > + buf_printf(b, ";\n"); > +} > + > /** > * Record CRCs for unresolved symbols > **/ > @@ -1827,9 +1875,14 @@ static void add_versions(struct buffer *b, s

Re: [PATCH v11 3/5] modules: Allow extended modversions without basic MODVERSIONS

2024-12-26 Thread Masahiro Yamada
RSIONS > The most likely reason you would enable this is to enable Rust > support. If unsure, say N. > > +config BASIC_MODVERSIONS > + bool "Basic Module Versioning Support" > + depends on MODVERSIONS > + default MODVERSIONS Nit: default y is simpler. -- Best Regards Masahiro Yamada

Re: [PATCH v13 5/5] rust: Use gendwarfksyms + extended modversions for CONFIG_MODVERSIONS

2025-01-10 Thread Masahiro Yamada
> - | awk '$$2~/(T|R|D|B)/ && $$3!~/__cfi/ {printf > "EXPORT_SYMBOL_RUST_GPL(%s);\n",$$3}' > $@ > + $(call rust_exports,$<,"EXPORT_SYMBOL_RUST_GPL(%s);\n",$$3) > $@ I noticed a nit: Both of the two callsites of rust_exports pass '$$3' to the last parameter instead of hardcoding it. Is it a flexibility for future extensions? I cannot think of any other use except for printing the third column, i.e. symbol name. -- Best Regards Masahiro Yamada

Re: [PATCH v13 5/5] rust: Use gendwarfksyms + extended modversions for CONFIG_MODVERSIONS

2025-01-17 Thread Masahiro Yamada
On Wed, Jan 15, 2025 at 3:58 AM Sami Tolvanen wrote: > > On Tue, Jan 14, 2025 at 10:22:15AM +0900, Masahiro Yamada wrote: > > On Tue, Jan 14, 2025 at 5:04 AM Sami Tolvanen > > wrote: > > > > > > Hi Masahiro, > > > > > > On Fri,

Re: [PATCH] kbuild: Add missing $(objtree) prefix to powerpc crtsavres.o artifact

2025-01-29 Thread Masahiro Yamada
gt; Signed-off-by: Kienan Stewart Good catch, this actually got broken by 13b25489b6f8. Fixes: 13b25489b6f8 ("kbuild: change working directory to external module directory with M=") Acked-by: Masahiro Yamada > > --- > > arch/powerpc/M

Re: [PATCH v13 5/5] rust: Use gendwarfksyms + extended modversions for CONFIG_MODVERSIONS

2025-01-13 Thread Masahiro Yamada
On Tue, Jan 14, 2025 at 5:04 AM Sami Tolvanen wrote: > > Hi Masahiro, > > On Fri, Jan 10, 2025 at 6:26 PM Masahiro Yamada wrote: > > > > On Sat, Jan 4, 2025 at 2:37 AM Matthew Maurer wrote: > > > > > > From: Sami Tolvanen > > > > > >

Re: [PATCH v13 0/5] Extended MODVERSIONS Support

2025-01-10 Thread Masahiro Yamada
9ebc701...@suse.com/ > [5] > https://lore.kernel.org/linux-kbuild/20241228154603.2234284-1-masahi...@kernel.org > > Changes in v13: > - Fixed up missed s32 usage (Thanks Sami). Applied to linux-kbuild. Thanks. -- Best Regards Masahiro Yamada

[PATCH 2/2] arch: use always-$(KBUILD_BUILTIN) for vmlinux.lds

2025-06-02 Thread Masahiro Yamada
The extra-y syntax is deprecated. Instead, use always-$(KBUILD_BUILTIN), which behaves equivalently. Signed-off-by: Masahiro Yamada --- arch/alpha/kernel/Makefile | 2 +- arch/arc/kernel/Makefile| 2 +- arch/arm/kernel/Makefile| 2 +- arch/arm64/kernel/Makefile | 2

[PATCH] powerpc: use always-y instead of extra-y in Makefiles

2025-06-02 Thread Masahiro Yamada
building only modular objects. Signed-off-by: Masahiro Yamada --- 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

Re: [PATCH] powerpc: use always-y instead of extra-y in Makefiles

2025-06-07 Thread Masahiro Yamada
On Tue, Jun 3, 2025 at 3:50 PM Christophe Leroy 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 extr

[PATCH] powerpc: unify two CONFIG_POWERPC64_CPU entries in the same choice block

2025-06-07 Thread Masahiro Yamada
only such case in the kernel tree. This commit merges the two entries. Once this cleanup is accepted in the powerpc subsystem, I will proceed to refactor the Kconfig parser. Signed-off-by: Masahiro Yamada --- arch/powerpc/platforms/Kconfig.cputype | 13 - 1 file changed, 4 insertio

Re: [PATCH] powerpc: use always-y instead of extra-y in Makefiles

2025-06-08 Thread Masahiro Yamada
On Mon, Jun 9, 2025 at 10:02 AM Michael Ellerman wrote: > > Masahiro Yamada writes: > > On Tue, Jun 3, 2025 at 3:50 PM Christophe Leroy > > wrote: > >> Le 02/06/2025 à 18:32, Masahiro Yamada a écrit : > >> > The extra-y syntax is planned for deprecation b

Re: [PATCH] powerpc: unify two CONFIG_POWERPC64_CPU entries in the same choice block

2025-06-08 Thread Masahiro Yamada
On Mon, Jun 9, 2025 at 9:59 AM Michael Ellerman wrote: > > Masahiro Yamada writes: > > There are two CONFIG_POWERPC64_CPU entries in the "CPU selection" > > choice block. > > > > I guess the intent is to display a different prompt depending on > > C

<    1   2   3   4   5