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
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
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
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
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
+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
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
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.
>
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
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
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
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
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
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
/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
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
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
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/
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
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
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
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
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
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
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 é
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
.
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
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
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
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
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
> >
; 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
> 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
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
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
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
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
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
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
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
> +# 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
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
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
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.
>
> > -
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
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
++
> 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 +-
> }
>
> # 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
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
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
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
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
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
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
> - | 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
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,
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
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
> > >
> > >
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
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
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
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
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
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
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
401 - 479 of 479 matches
Mail list logo