[PATCH] init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM

2021-02-24 Thread Masahiro Yamada
PILE_TEST. I also removed the meaningless 'default n'. Signed-off-by: Masahiro Yamada --- init/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/init/Kconfig b/init/Kconfig index ba8bd5256980..2ff0b5a50736 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1

Re: linux-next: Signed-off-by missing for commit in the kbuild tree

2021-02-23 Thread Masahiro Yamada
t. > -- > Cheers, > Stephen Rothwell -- Best Regards Masahiro Yamada

Re: [PATCH] Makefile: reuse CC_VERSION_TEXT

2021-02-23 Thread Masahiro Yamada
On Sat, Feb 6, 2021 at 12:46 PM Sedat Dilek wrote: > > On Sat, Feb 6, 2021 at 2:49 AM Masahiro Yamada wrote: > > > > On Sat, Feb 6, 2021 at 7:01 AM 'Nick Desaulniers' via Clang Built > > Linux wrote: > > > > > > I noticed we'r

Re: [PATCH] Makefile: reuse CC_VERSION_TEXT

2021-02-23 Thread Masahiro Yamada
On Wed, Feb 24, 2021 at 5:10 AM 'Nick Desaulniers' via Clang Built Linux wrote: > > On Fri, Feb 5, 2021 at 5:49 PM Masahiro Yamada wrote: > > > > On Sat, Feb 6, 2021 at 7:01 AM 'Nick Desaulniers' via Clang Built > > Linux wrote: > > > > &

Re: [PATCH] asm-generic/ioctl.h: use BUILD_BUG_ON_ZERO() for type check

2021-02-23 Thread Masahiro Yamada
On Wed, Feb 24, 2021 at 5:04 AM Arnd Bergmann wrote: > > On Tue, Feb 23, 2021 at 11:06 AM Masahiro Yamada wrote: > > > > > -#ifdef __CHECKER__ > > -#define _IOC_TYPECHECK(t) (sizeof(t)) > > -#else > > /* provoke compile error for invalid uses of si

Re: [PATCH 3/3] kbuild: Add a build check for missing gitignore entries

2021-02-23 Thread Masahiro Yamada
(0major+1402830minor)pagefaults 0swaps > > clean x86 defconfig with this commit: > 1799.10user 165.84system 5:06.19elapsed 641%CPU (0avgtext+0avgdata > 259932maxresident)k > 8inputs+1390712outputs (0major+53146757minor)pagefaults 0swaps > > another rebuild with this commit: > 14.55user 4.85system 0:06.14elapsed 315%CPU (0avgtext+0avgdata > 38664maxresident)k > 0inputs+1992outputs (0major+1402878minor)pagefaults 0swaps > > Rob -- Best Regards Masahiro Yamada

Re: [PATCH 2/3] x86: Drop generated syscall headers from 'targets'

2021-02-23 Thread Masahiro Yamada
eixner > Cc: Ingo Molnar > Cc: Borislav Petkov > Cc: x...@kernel.org > Cc: "H. Peter Anvin" > Cc: Masahiro Yamada > Cc: Michal Marek > Signed-off-by: Rob Herring > --- > arch/x86/entry/syscalls/Makefile | 2 -- > 1 file changed, 2 deletions(-) > > diff -

Re: [PATCH 1/3] kbuild: Make old-atomics and missing-syscalls phony targets

2021-02-23 Thread Masahiro Yamada
On Wed, Feb 24, 2021 at 3:14 AM Rob Herring wrote: > > The old-atomics and missing-syscalls targets are not files, so they > should be marked as PHONY. > > Cc: Masahiro Yamada > Cc: Michal Marek > Signed-off-by: Rob Herring > --- > Kbuild | 2 ++ > 1 file cha

Re: [PATCH] initramfs: Remove redundant dependency of RD_ZSTD on BLK_DEV_INITRD

2021-02-23 Thread Masahiro Yamada
fig > @@ -103,7 +103,6 @@ config RD_LZ4 > config RD_ZSTD > bool "Support initial ramdisk/ramfs compressed using ZSTD" > default y > - depends on BLK_DEV_INITRD > select DECOMPRESS_ZSTD > help > Support loading of a ZSTD encoded initial ramdisk or cpio buffer. > -- > 2.25.1 > -- Best Regards Masahiro Yamada

[PATCH] compat: remove unneeded declaration from COMPAT_SYSCALL_DEFINEx()

2021-02-23 Thread Masahiro Yamada
compat_sys##name is declared twice, just one line below. With this removal SYSCALL_DEFINEx() (defined in ) and COMPAT_SYSCALL_DEFINEx() look symmetrical. Signed-off-by: Masahiro Yamada --- include/linux/compat.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/compat.h b

[PATCH] asm-generic/ioctl.h: use BUILD_BUG_ON_ZERO() for type check

2021-02-23 Thread Masahiro Yamada
zero when __CHECKER__ is defined. Also, remove #ifndef __KERNEL__ from . Signed-off-by: Masahiro Yamada --- include/asm-generic/ioctl.h | 12 include/uapi/asm-generic/ioctl.h | 13 ++--- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/include/a

Re: [PATCH] f2fs: compress: Allow modular (de)compression algorithms

2021-02-22 Thread Masahiro Yamada
- depends on F2FS_FS > help > Enable filesystem-level compression on f2fs regular files, > multiple back-end compression algorithms are supported. > @@ -137,3 +134,5 @@ config F2FS_FS_LZORLE > default y > help > Support LZO-RLE compress algorithm, if unsure, say Y. > + > +endif > -- > 2.25.1 > -- Best Regards Masahiro Yamada

Re: [PATCH] gcc-plugins: Disable GCC_PLUGIN_CYC_COMPLEXITY for s390

2021-02-22 Thread Masahiro Yamada
COMPILE_TEST > to start with. But that is a different discussion. > > Anyway, I can disable GCC_PLUGIN_CYC_COMPLEXITY manually in my own > build tests, so this isn't that much of a problem for me, so feel > free to drop this patch. > > Guenter Maybe, we can add something like CONFIG_SUPPRESS_NOISY_TESTS, which is set to y by all{yes,mod}config. This is self-documenting, so we do not need the '# too noisy' comment. config SUPPRESS_NOISY_TESTS bool "suppress noisy test" config GCC_PLUGIN_CYC_COMPLEXITY bool "Compute the cyclomatic complexity of a function" if EXPERT depends on !SUPPRESS_NOISY_TESTS -- Best Regards Masahiro Yamada

Re: [PATCH 2/2] mmc: uniphier-sd: Fix a resource leak in the remove function

2021-02-22 Thread Masahiro Yamada
e remove > function. > > Add the missing call. > > Fixes: 3fd784f745dd ("mmc: uniphier-sd: add UniPhier SD/eMMC controller > driver") > Signed-off-by: Christophe JAILLET Reviewed-by: Masahiro Yamada > --- > drivers/mmc/host/uniphier-sd.c | 1 + > 1 file

Re: [PATCH 1/2] mmc: uniphier-sd: Fix an error handling path in uniphier_sd_probe()

2021-02-22 Thread Masahiro Yamada
> > Add the missing call. > > Fixes: 3fd784f745dd ("mmc: uniphier-sd: add UniPhier SD/eMMC controller > driver") > Signed-off-by: Christophe JAILLET > --- I no longer have access to this hardware, but by browsing the code, this seems correct. Reviewed-by: Masahiro

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

2021-02-21 Thread Masahiro Yamada
unistd_32 := i386 $(uapi)/unistd_32.h: $(syscall32) $(syshdr) FORCE > I have used the kbuild tree from next-20210219 for today. > > -- > Cheers, > Stephen Rothwell -- Best Regards Masahiro Yamada

Re: [PATCH 1/2] scripts: add generic syscalltbl.sh

2021-02-21 Thread Masahiro Yamada
On Tue, Feb 16, 2021 at 11:04 AM Masahiro Yamada wrote: > > Most of architectures generate syscall headers at the compile time > in a similar way. > > The syscall table has the same format for all architectures. Each line > has up to 5 fields; syscall number, ABI, syscall

Re: [PATCH 1/2] arch: syscalls: add missing FORCE and fix 'targets' to make if_changed work

2021-02-21 Thread Masahiro Yamada
On Mon, Feb 15, 2021 at 9:50 AM Masahiro Yamada wrote: > > The rules in these Makefiles cannot detect the command line change > because the prerequisite 'FORCE' is missing. > > Adding 'FORCE' will result in the headers being rebuilt every time > because the &

Re: [PATCH 2/2] kbuild: check the minimum linker version in Kconfig

2021-02-21 Thread Masahiro Yamada
On Tue, Feb 16, 2021 at 12:11 PM Masahiro Yamada wrote: > > Unify the two scripts/ld-version.sh and scripts/lld-version.sh, and > check the minimum linker version like scripts/cc-version.sh did. > > I tested this script for some corner cases reported in the past: > > - G

[PATCH] kbuild: remove deprecated 'always' and 'hostprogs-y/m'

2021-02-21 Thread Masahiro Yamada
These have no more user in the upstream code. The use of them has been warned for a while for external modules. The migration is finished. Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 1 - scripts/Makefile.clean | 3 --- scripts/Makefile.lib | 12 3 files

[PATCH] kbuild: parse C= and M= before changing the working directory

2021-02-21 Thread Masahiro Yamada
If Kbuild recurses to the top Makefile (for example, 'make deb-pkg'), C= and M= are parsed over again, needlessly. Parse them before changing the working directory. After that, sub_make_done is set to 1, so they are parsed just once. Signed-off-by: Masahiro Yamada --- Mak

[PATCH] kbuild: reuse this-makefile to define abs_srctree

2021-02-21 Thread Masahiro Yamada
Move this-makefile up, and reuse it to define abs_srctree. Signed-off-by: Masahiro Yamada --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ade44ac4cc2f..b127881e6bf0 100644 --- a/Makefile +++ b/Makefile @@ -145,7 +145,8 @@ else

[PATCH] doc: use KCFLAGS instead of EXTRA_CFLAGS to pass flags from command line

2021-02-21 Thread Masahiro Yamada
g. Signed-off-by: Masahiro Yamada --- Documentation/process/4.Coding.rst| 2 +- Documentation/process/submit-checklist.rst| 2 +- Documentation/translations/it_IT/process/4.Coding.rst | 2 +- Documentation/translations/it_IT/proc

Re: [PATCH v2 2/3] kconfig: Ask user if string needs to be changed when dependency changed

2021-02-21 Thread Masahiro Yamada
On Sun, Feb 21, 2021 at 8:09 PM Mickaël Salaün wrote: > > > On 21/02/2021 09:47, Masahiro Yamada wrote: > > On Tue, Feb 16, 2021 at 3:14 AM Mickaël Salaün wrote: > >> > >> From: Mickaël Salaün > >> > >> Content of string configuration may de

Re: [PATCH v2 3/3] security: Add LSMs dependencies to CONFIG_LSM

2021-02-21 Thread Masahiro Yamada
On Sun, Feb 21, 2021 at 8:11 PM Mickaël Salaün wrote: > > > On 21/02/2021 09:50, Masahiro Yamada wrote: > > On Tue, Feb 16, 2021 at 4:03 AM Ondrej Mosnacek wrote: > >> > >> On Mon, Feb 15, 2021 at 7:17 PM Mickaël Salaün wrote: > >>> From: Micka

[PATCH 1/3] kconfig: fix 'invalid option' for help option

2021-02-21 Thread Masahiro Yamada
ssing in the short option list passed to getopt_long(). While I fixed this issue, I also changed the option '?' to 'h'. I prefer -h (or --help, if a long option is also desired). Signed-off-by: Masahiro Yamada --- scripts/kconfig/conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 2/3] kconfig: omit --oldaskconfig option for 'make config'

2021-02-21 Thread Masahiro Yamada
ned-off-by: Masahiro Yamada --- scripts/kconfig/Makefile | 2 +- scripts/kconfig/conf.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 2c40e68853dd..5180a71c931f 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfi

[PATCH 3/3] kconfig: unify rule of config, menuconfig, nconfig, gconfig, xconfig

2021-02-21 Thread Masahiro Yamada
Unify the similar build rules. This supports 'make build_config', which builds scripts/kconfig/conf but does not invoke it. Signed-off-by: Masahiro Yamada --- scripts/kconfig/Makefile | 35 +-- 1 file changed, 13 insertions(+), 22 deletions(-) di

[PATCH 1/2] kconfig: clean up nested if-conditionals in check_conf()

2021-02-21 Thread Masahiro Yamada
statement. Signed-off-by: Masahiro Yamada --- scripts/kconfig/conf.c | 55 ++ 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 18a233d27a8d..369615d6c97e 100644 --- a/scripts/kconfig/conf.c +++ b

[PATCH 2/2] kconfig: remove dead code in conf_askvalue()

2021-02-21 Thread Masahiro Yamada
conf_askvalue() is only called for oldconfig, syncconfig, and oldaskconfig. If it is called for other cases, it is a bug. So, the code after the switch statement is unreachable. Remove the dead code, and clean up the switch statement. Signed-off-by: Masahiro Yamada --- scripts/kconfig/conf.c

Re: [PATCH v2 1/3] kconfig: Remove duplicate call to sym_get_string_value()

2021-02-21 Thread Masahiro Yamada
On Tue, Feb 16, 2021 at 3:15 AM Mickaël Salaün wrote: > > From: Mickaël Salaün > > Use the saved returned value of sym_get_string_value() instead of > calling it twice. > > Cc: Masahiro Yamada > Signed-off-by: Mickaël Salaün > Link: https://lore.kernel.org

Re: [PATCH v2 3/3] security: Add LSMs dependencies to CONFIG_LSM

2021-02-21 Thread Masahiro Yamada
t of enabled LSMs at boot time > > if an LSM has just been enabled or disabled in the build. Moreover, > > this list only makes sense if at least one LSM is enabled. > > > > Cc: Casey Schaufler > > Cc: James Morris > > Cc: Masahiro Yamada > >

Re: [PATCH v2 2/3] kconfig: Ask user if string needs to be changed when dependency changed

2021-02-21 Thread Masahiro Yamada
bled at boot, but users will not have a chance to update this > list with a make oldconfig. If CONFIG_LSM already exists in the .config, oldconfig does not show a prompt. This is the expected behavior. You are trying to fix your problem in a wrong way. NACK. > > Cc: Casey Schaufler > C

Re: [PATCH] kbuild: Add support for Clang's polyhedral loop optimizer.

2021-02-17 Thread Masahiro Yamada
More information can be found > + from Polly's website: > + > + https://polly.llvm.org > + > config HAVE_KERNEL_GZIP > bool > > -- > 2.30.0 > > -- > 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/20210120174146.12287-1-lazerl0rd%40thezest.dev. -- Best Regards Masahiro Yamada

Re: [PATCH] Makefile: Remove # characters from compiler string

2021-02-16 Thread Masahiro Yamada
entirely, and I agree this is the safest fix. When I have time, I might want to revisit this with a Kconfig fix. Applied to linux-kbuild. Thanks. -- Best Regards Masahiro Yamada

Re: [PATCH] gen_compile_commands: prune some directories

2021-02-15 Thread Masahiro Yamada
On Fri, Feb 12, 2021 at 2:19 AM Nathan Chancellor wrote: > > On Fri, Feb 12, 2021 at 01:11:54AM +0900, Masahiro Yamada wrote: > > If directories are passed to gen_compile_commands.py, os.walk() traverses > > all the subdirectories to search for .cmd files, but we know some o

[PATCH 2/2] kbuild: check the minimum linker version in Kconfig

2021-02-15 Thread Masahiro Yamada
ker is not supported. make[2]: *** [scripts/kconfig/Makefile:71: syncconfig] Error 1 make[1]: *** [Makefile:600: syncconfig] Error 2 make: *** [Makefile:708: include/config/auto.conf] Error 2 Thanks to David Laight for suggesting shell script improvements. Signed-off-by: Masahiro Yamad

[PATCH 1/2] kbuild: remove ld-version macro

2021-02-15 Thread Masahiro Yamada
There is no direct user of ld-version; you can use CONFIG_LD_VERSION if needed. Signed-off-by: Masahiro Yamada --- scripts/Kbuild.include | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 08e011175b4c..509e0856d653

[PATCH 1/2] scripts: add generic syscalltbl.sh

2021-02-15 Thread Masahiro Yamada
: #define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native) 64-bit kernel: #define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, compat) Signed-off-by: Masahiro Yamada --- scripts/syscalltbl.sh | 73 +++ 1 file changed, 73

[PATCH 2/2] scripts: add generic syscallhdr.sh

2021-02-15 Thread Masahiro Yamada
/syscalls/syscallhdr.sh arch/x86/entry/syscalls/syscallhdr.sh arch/xtensa/kernel/syscalls/syscallhdr.sh My goal is to unify them into scripts/syscallhdr.sh. Signed-off-by: Masahiro Yamada --- scripts/syscallhdr.sh | 98 +++ 1 file changed, 98 insertions

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

2021-02-15 Thread Masahiro Yamada
On Thu, Jan 28, 2021 at 9:51 AM Masahiro Yamada wrote: > > > As of v5.11-rc1, 12 architectures duplicate similar shell scripts: > > $ find arch -name syscalltbl.sh | sort > arch/alpha/kernel/syscalls/syscalltbl.sh > arch/arm/tools/syscalltbl.sh > arch/ia64/kerne

[PATCH 2/2] arch: syscalls: remove $(srctree)/ prefix from syscall tables

2021-02-14 Thread Masahiro Yamada
The 'syscall' variables are not directly used in the commands. Remove the $(srctree)/ prefix because we can rely on VPATH. Signed-off-by: Masahiro Yamada --- arch/alpha/kernel/syscalls/Makefile | 2 +- arch/arm/tools/Makefile | 2 +- arch/ia64/kernel/syscall

[PATCH 1/2] arch: syscalls: add missing FORCE and fix 'targets' to make if_changed work

2021-02-14 Thread Masahiro Yamada
must be relative to the current Makefile. Fix all of them so the if_changed rules work correctly. Signed-off-by: Masahiro Yamada Acked-by: Geert Uytterhoeven --- arch/alpha/kernel/syscalls/Makefile | 11 +- arch/ia64/kernel/syscalls/Makefile | 11 +- arch/

Re: [PATCH v1] clang_tools:gen_compile_commands: Change the default source directory

2021-02-14 Thread Masahiro Yamada
On Sun, Feb 14, 2021 at 8:49 PM Stephen Zhang wrote: > > Masahiro Yamada 于2021年2月13日周六 下午8:46写道: > > This is the steps I tested. > > > > > > masahiro@oscar:~/ref/linux$ make O=build defconfig all -j24 > > [ snip ] > > masahiro@os

[GIT PULL] Kbuild fixes for v5.11

2021-02-14 Thread Masahiro Yamada
CONFIG_TRIM_UNUSED_KSYMS build for ppc64 - Use pkg-config for scripts/sign-file.c CFLAGS Masahiro Yamada (2): kbuild: fix CONFIG_TRIM_UNUSED_KSYMS build for ppc64 sparc: remove wrong comment from arch/sparc/include/asm/Kbuild Rolf Eike

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

2021-02-14 Thread Masahiro Yamada
On Thu, Jan 28, 2021 at 9:52 AM Masahiro Yamada wrote: > > These are NOT exported to userspace. > > The headers listed in arch/sparc/include/uapi/asm/Kbuild are exported. > > Signed-off-by: Masahiro Yamada Applied to linux-kbuild/fixes. > --- > > arch/sparc/inc

Re: [PATCH v1] clang_tools:gen_compile_commands: Change the default source directory

2021-02-13 Thread Masahiro Yamada
On Fri, Feb 12, 2021 at 8:20 PM Stephen Zhang wrote: > > Masahiro Yamada 于2021年2月11日周四 下午10:16写道: > > Please stop. > > > > > > Commit 6ca4c6d25949117dc5b4845612e290b6d89e70a8 > > removed the tools/ support. > > > > > > There exist two build s

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

2021-02-12 Thread Masahiro Yamada
, R10, R8, R9) The ugly #define __x32_sys_* will go away. Signed-off-by: Masahiro Yamada --- arch/x86/entry/syscall_x32.c | 16 ++-- arch/x86/include/asm/syscall_wrapper.h | 10 +- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/arch/x86/entr

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

2021-02-12 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 Tested-b

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

2021-02-12 Thread Masahiro Yamada
On Sat, Feb 13, 2021 at 12:12 AM Mickaël Salaün wrote: > > Could you please push this patch to Linus? Thanks. > > On 04/02/2021 15:16, Mickaël Salaün wrote: > > > > On 28/01/2021 01:50, Masahiro Yamada wrote: > >> Building kernel/sys_ni.c with W=1 omits tons of -

Re: [PATCH v2] kbuild: simplify access to the kernel's version

2021-02-12 Thread Masahiro Yamada
e; > } > > diff --git a/kernel/sys.c b/kernel/sys.c > index 51f00fe20e4d1..c2225bd405d58 100644 > --- a/kernel/sys.c > +++ b/kernel/sys.c > @@ -1243,7 +1243,7 @@ static int override_release(char __user *release, > size_t len) > break; > rest++; > } > - v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 60; > + v = LINUX_VERSION_PATCHLEVEL + 60; > copy = clamp_t(size_t, len, 1, sizeof(buf)); > copy = scnprintf(buf, copy, "2.6.%u%s", v, rest); > ret = copy_to_user(release, buf, copy + 1); > -- > 2.27.0 > -- Best Regards Masahiro Yamada

Re: [PATCH] kbuild: simplify access to the kernel's version

2021-02-11 Thread Masahiro Yamada
On Fri, Feb 12, 2021 at 12:40 PM Masahiro Yamada wrote: > > On Fri, Feb 12, 2021 at 5:18 AM Masahiro Yamada wrote: > > > > On Tue, Feb 9, 2021 at 3:20 AM Sasha Levin wrote: > > > > > > On Mon, Feb 08, 2021 at 05:50:07PM +, Christoph Hellwig wrote: >

Re: [PATCH] kbuild: simplify access to the kernel's version

2021-02-11 Thread Masahiro Yamada
On Fri, Feb 12, 2021 at 5:18 AM Masahiro Yamada wrote: > > On Tue, Feb 9, 2021 at 3:20 AM Sasha Levin wrote: > > > > On Mon, Feb 08, 2021 at 05:50:07PM +, Christoph Hellwig wrote: > > >On Sun, Feb 07, 2021 at 11:13:52AM -0500, Sasha Levin wrote: > > >>

Re: [PATCH V7 1/3] kbuild: Add generic rule to apply fdtoverlay

2021-02-11 Thread Masahiro Yamada
On Fri, Feb 12, 2021 at 5:05 AM Rob Herring wrote: > > On Thu, Feb 11, 2021 at 12:28 PM Masahiro Yamada wrote: > > > > On Wed, Feb 10, 2021 at 8:13 PM Viresh Kumar > > wrote: > > > > > > From: Rob Herring > > > > > > Add

Re: [PATCH] kbuild: simplify access to the kernel's version

2021-02-11 Thread Masahiro Yamada
you're at it. > > I don't think there are in-tree users left? > > We can't remove it completely because userspace is still using it, so if > we drop those userspace will be sad. Right. Once we export a macros to userspace, we cannot remove it. > -- > Thanks, > Sasha -- Best Regards Masahiro Yamada

Re: [PATCH V7 1/3] kbuild: Add generic rule to apply fdtoverlay

2021-02-11 Thread Masahiro Yamada
$$(addprefix $$(obj)/,$$(%-dtbs)) FORCE > + $(call if_changed,fdtoverlay) > + Please do not use .SECONDEXPANSION. This will parse the Makefile twice in _all_ directories, while only a few directories use the overlay-y syntax. Use the multi_depend macro. > DT_CHECKER ?= dt-validate > DT_BINDING_DIR := Documentation/devicetree/bindings > # DT_TMP_SCHEMA may be overridden from > Documentation/devicetree/bindings/Makefile > -- > 2.25.0.rc1.19.g042ed3e048af > -- Best Regards Masahiro Yamada

Re: [PATCH] kbuild: fix CONFIG_TRIM_UNUSED_KSYMS build for ppc64

2021-02-11 Thread Masahiro Yamada
On Thu, Feb 11, 2021 at 7:43 PM Jessica Yu wrote: > > +++ Masahiro Yamada [11/02/21 15:14 +0900]: > >Stephen Rothwell reported a build error on ppc64 when > >CONFIG_TRIM_UNUSED_KSYMS is enabled. > > > >Jessica Yu pointed out the cause of the error with the ref

[PATCH] gen_compile_commands: prune some directories

2021-02-11 Thread Masahiro Yamada
directory. However, without an explicit comment "do not support tools/", somebody might try to get it back. Clarify this. Signed-off-by: Masahiro Yamada --- scripts/clang-tools/gen_compile_commands.py | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scri

Re: [PATCH v1] clang_tools:gen_compile_commands: Change the default source directory

2021-02-11 Thread Masahiro Yamada
two build systems in the Linux source tree. Kbuild covers the entire tree except tools/. The tools/ directory adopts a different build system. It is a pity that the tools/ directory went in a wrong direction, and people try to fix problems in a wrong layer. You are not the first person to send to tweak obj/source trees of this script. You can not do this correctly without terribly messing up the code. Please do not try to support tools/. -- Best Regards Masahiro Yamada

Re: [PATCH] scripts: Fix linking extract-cert against libcrypto

2021-02-10 Thread Masahiro Yamada
e/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f250d83-r0/recipe-sysroot-native/usr/include \ -I ./scripts -o scripts/extract-cert \ But, some people are not satisfied with [1] (or do not notice it)? Then, 2cea4a7a1885 introduced the second one [2]. Mixing [1] and [2] perhaps confuses the build system somehow? So, 2cea4a7a1885 was a problem, but I do not think this patch is the right one either. (At least, HOSTLDFLAGS_* additions are pointless) -- Best Regards Masahiro Yamada

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

2021-02-10 Thread Masahiro Yamada
On Wed, Feb 10, 2021 at 5:37 PM Masahiro Yamada wrote: > > On Wed, Feb 10, 2021 at 5:06 PM Jessica Yu wrote: > > > > +++ Stephen Rothwell [10/02/21 08:50 +1100]: > > >Hi Jessica, > > > > > >On Tue, 9 Feb 2021 16:16:20 +0100 Jessica Yu wrote: > &g

[PATCH] kbuild: fix CONFIG_TRIM_UNUSED_KSYMS build for ppc64

2021-02-10 Thread Masahiro Yamada
ernel.org/lkml/20210209210843.3af66...@canb.auug.org.au/ Reported-by: Stephen Rothwell Signed-off-by: Masahiro Yamada --- scripts/gen_autoksyms.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/gen_autoksyms.sh b/scripts/gen_autoksyms.sh index 16c0b2ddaa4c..d54dfba15bf2 100755 --- a/scr

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

2021-02-10 Thread Masahiro Yamada
odpost needs fixing too. diff --git a/scripts/gen_autoksyms.sh b/scripts/gen_autoksyms.sh index 16c0b2ddaa4c..996a7109167b 100755 --- a/scripts/gen_autoksyms.sh +++ b/scripts/gen_autoksyms.sh @@ -44,7 +44,7 @@ sed 's/ko$/mod/' $modlist | xargs -n1 sed -n -e '2{s/ /\n/g;/^$/!p;}' -- | cat - "$ksym_wl" | sort -u | -sed -e 's/\(.*\)/#define __KSYM_\1 1/' >> "$output_file" +sed -e 's/^\.\{,1\}\(.*\)/#define __KSYM_\1 1/' >> "$output_file" # Special case for modversions (see modpost.c) if [ -n "$CONFIG_MODVERSIONS" ]; then m I will post two patches with some commit log after some testing. (one for gen_autoksyms.sh and the other for modpost). -- Best Regards Masahiro Yamada

Re: [PATCH 2/3] kbuild: clamp SUBLEVEL to 255

2021-02-08 Thread Masahiro Yamada
ERSION(a,b,c) (((a) << 16) + ((b) << 8) + \ > > + ((c) > 255 ? 255 : (c)))' > > endef > > Why not use KERNEL_VERSION to define LINUX_VERSION_CODE ? > Basically just: > echo '#define LINUX_VERSION_CODE KERNEL_VERSION($(VERSION), >

Re: [PATCH 2/3] kbuild: clamp SUBLEVEL to 255

2021-02-06 Thread Masahiro Yamada
SUBLEVEL)); \ > + fi; \ > + echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + \ > + ((c) > 255 ? 255 : (c)))' > endef > > $(version_h): FORCE > -- > 2.27.0 > -- Best Regards Masahiro Yamada

Re: [PATCH 3/3] ia64: remove generated/nr-irqs.h generation to fix build warning

2021-02-06 Thread Masahiro Yamada
On Sat, Aug 29, 2020 at 2:15 PM Masahiro Yamada wrote: > > Randy reports the following warning when building ARCH=ia64 with > CONFIG_IA64_PALINFO=m: > > ../scripts/Makefile.build:68: 'arch/ia64/kernel/palinfo.ko' will not be built > even though obj-m is specified. &g

[GIT PULL] Kbuild fixes for v5.11-rc7

2021-02-06 Thread Masahiro Yamada
n scripts/kallsyms.c Andy Shevchenko (1): scripts: switch explicitly to Python 3 Arnd Bergmann (1): kallsyms: fix nonconverging kallsyms table with lld Enrico Weigelt, metux IT consult (1): kconfig: mconf: fix HOSTCC call Masahiro Yamada (6):

Re: [PATCH 3/3] kbuild: introduce KERNEL_VERSION2 and LINUX_VERSION_CODE2

2021-02-06 Thread Masahiro Yamada
ir structure, and we risk > breaking this userspace by modifying the layout of the version integers. > > Cc: sta...@kernel.org > Signed-off-by: Sasha Levin > Reviewed-by: Greg Kroah-Hartman > Signed-off-by: Masahiro Yamada > Signed-off-by: Sasha Levin > --- > Ma

Re: [PATCH 1/3] Revert "kbuild: give the SUBLEVEL more room in KERNEL_VERSION"

2021-02-06 Thread Masahiro Yamada
INUX_VERSION_CODE=0x40200" into llvm section of ~/.perfconfig' > #endif > #define SEC(NAME) __attribute__((section(NAME), used)) > > diff --git a/tools/perf/tests/bpf-script-test-prologue.c > b/tools/perf/tests/bpf-script-test-prologue.c > index 8db19e70813cc..bd83d364cf30d 100644 > --- a/tools/perf/tests/bpf-script-test-prologue.c > +++ b/tools/perf/tests/bpf-script-test-prologue.c > @@ -5,7 +5,7 @@ > */ > #ifndef LINUX_VERSION_CODE > # error Need LINUX_VERSION_CODE > -# error Example: for 4.2 kernel, put > 'clang-opt="-DLINUX_VERSION_CODE=0x402" into llvm section of > ~/.perfconfig' > +# error Example: for 4.2 kernel, put > 'clang-opt="-DLINUX_VERSION_CODE=0x40200" into llvm section of ~/.perfconfig' > #endif > #define SEC(NAME) __attribute__((section(NAME), used)) > > -- > 2.27.0 > -- Best Regards Masahiro Yamada

Re: [PATCH v9 0/3] Kbuild: DWARF v5 support

2021-02-06 Thread Masahiro Yamada
rong opinion about leaving the compiler's freedom to choose the dwarf version. Unless somebody has an objection, I will pick up v9 for the next MW. Meanwhile, if you want to give reviewed-by / tested-by please do so. -- Best Regards Masahiro Yamada

Re: [PATCH] Makefile: reuse CC_VERSION_TEXT

2021-02-05 Thread Masahiro Yamada
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/20210205220125.2931504-1-ndesaulniers%40google.com. -- Best Regards Masahiro Yamada

Re: [PATCH 4/4] staging: comedi: Use subdir-ccflags-* to inherit debug flag

2021-02-05 Thread Masahiro Yamada
CONFIG_COMEDI_DEBUG intends to give the DEBUG flag to all source files under drivers/staging/comedi/. -- Best Regards Masahiro Yamada

Re: [PATCH] kallsyms: fix nonconverging kallsyms table with lld

2021-02-05 Thread Masahiro Yamada
"__kvm_nvhe_", /* arm64 non-VHE KVM namespace */ > + "__AArch64ADRPThunk_", /* arm64 lld */ > + "__ARMV5PILongThunk_", /* arm lld */ > + "__ARMV7PILongThunk_", > + "__ThumbV7PILongThunk_", > + "__LA25Thunk_", /* mips lld */ > + "__microLA25Thunk_", > NULL > }; > > -- > 2.29.2 > -- Best Regards Masahiro Yamada

Re: [PATCH] builddeb: Don't look for a missing Module.symvers

2021-02-05 Thread Masahiro Yamada
if is_enabled CONFIG_GCC_PLUGINS; then > find scripts/gcc-plugins -name \*.so > -- > 2.25.1 > -- Best Regards Masahiro Yamada

Re: [PATCH v7 2/2] Kbuild: implement support for DWARF v5

2021-02-03 Thread Masahiro Yamada
On Thu, Feb 4, 2021 at 8:27 AM Nick Desaulniers wrote: > > On Wed, Feb 3, 2021 at 3:07 PM Masahiro Yamada wrote: > > > > Nick, the patch set is getting simpler and simpler, > > and almost good enough to be merged. > > I agree. I think Sedat pointed out a binuti

Re: [PATCH v7 2/2] Kbuild: implement support for DWARF v5

2021-02-03 Thread Masahiro Yamada
On Thu, Feb 4, 2021 at 8:36 AM Jakub Jelinek wrote: > > On Thu, Feb 04, 2021 at 08:06:12AM +0900, Masahiro Yamada wrote: > > GCC never outputs '.file 0', which is why > > this test is only needed for Clang, correct? > > No, GCC outputs .file 0 if it during conf

Re: [PATCH v7 1/2] Kbuild: make DWARF version a choice

2021-02-03 Thread Masahiro Yamada
On Thu, Feb 4, 2021 at 8:16 AM Nick Desaulniers wrote: > > On Wed, Feb 3, 2021 at 2:24 PM Masahiro Yamada wrote: > > > > On Sat, Jan 30, 2021 at 10:52 AM Nathan Chancellor > > wrote: > > > > > > On Fri, Jan 29, 2021 at 04:44:00PM -0800

Re: [PATCH v7 2/2] Kbuild: implement support for DWARF v5

2021-02-03 Thread Masahiro Yamada
5 to DEBUG_CFLAGS. > > Disabled for now if CONFIG_DEBUG_INFO_BTF is set; pahole doesn't yet > recognize the new additions to the DWARF debug info. Thanks to Sedat for > the report. > > Link: http://www.dwarfstd.org/doc/DWARF5.pdf > Reported-by: Sedat Dilek > Suggested

Re: [PATCH v7 1/2] Kbuild: make DWARF version a choice

2021-02-03 Thread Masahiro Yamada
On Thu, Feb 4, 2021 at 7:23 AM Masahiro Yamada wrote: > > On Sat, Jan 30, 2021 at 10:52 AM Nathan Chancellor wrote: > > > > On Fri, Jan 29, 2021 at 04:44:00PM -0800, Nick Desaulniers wrote: > > > Modifies CONFIG_DEBUG_INFO_DWARF4 to be a member of a choice which is &g

Re: [PATCH v7 1/2] Kbuild: make DWARF version a choice

2021-02-03 Thread Masahiro Yamada
isting > > configs, and makes adding future versions more straightforward. > > > > GCC since ~4.8 has defaulted to this DWARF version implicitly. > > > > Suggested-by: Arvind Sankar > > Suggested-by: Fangrui Song > > Suggested-by: Nathan Chancellor >

Re: [PATCH 1/3] printk: use CONFIG_CONSOLE_LOGLEVEL_* directly

2021-02-03 Thread Masahiro Yamada
On Thu, Feb 4, 2021 at 12:23 AM Petr Mladek wrote: > > On Tue 2021-02-02 09:44:22, John Ogness wrote: > > On 2021-02-02, Masahiro Yamada wrote: > > > CONSOLE_LOGLEVEL_DEFAULT is nothing more than a shorthand of > > > CONFIG_CONSOLE_LOGLEVEL_DEFAUL

Re: [PATCH] kbuild: fix duplicated flags in DEBUG_CFLAGS

2021-02-03 Thread Masahiro Yamada
On Wed, Feb 3, 2021 at 5:32 PM Sedat Dilek wrote: > > On Wed, Feb 3, 2021 at 8:53 AM Masahiro Yamada wrote: > > > > Sedat Dilek noticed duplicated debug flags passed when building C > > files with CONFIG_DEBUG_INFO. > > > > I do not know much about hi

Re: [PATCH v6 2/2] Kbuild: implement support for DWARF v5

2021-02-02 Thread Masahiro Yamada
ee that double. > > > Looks like I need some "undrunken" switch. > > > > Can you follow my steps precisely to see whether it's your .config? > > Perhaps there is a config that duplicates DEBUG_CFLAGS that is not set > > in the defconfig? If so, it's still harmless to specify the same > > commands twice, and likely isn't introduced by this patch set if so; > > so I'm not sure how much more effort is worth pursuing. > > > > If I follow your steps of make I do not see it "double" (in my local > v6 Git branch). > > Looks like this is coming from my build-script. > > I checked if I have some double dwarf(-5) patches double - Nope. Sorry for the late reply. I do not know which command you input, but this happens for deb-pkg builds for example. Please try this patch: https://lore.kernel.org/patchwork/patch/1374926/ -- Best Regards Masahiro Yamada

[PATCH] kbuild: fix duplicated flags in DEBUG_CFLAGS

2021-02-02 Thread Masahiro Yamada
CC versions") Reported-by: Sedat Dilek Signed-off-by: Masahiro Yamada --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3d3f67b98ca2..769a38ee81b9 100644 --- a/Makefile +++ b/Makefile @@ -811,10 +811,12 @@ KBUILD_CFLAGS +

Re: [PATCH 1/3] printk: use CONFIG_CONSOLE_LOGLEVEL_* directly

2021-02-02 Thread Masahiro Yamada
On Tue, Feb 2, 2021 at 7:09 PM Sergey Senozhatsky wrote: > > On (21/02/02 16:02), Masahiro Yamada wrote: > > > > CONSOLE_LOGLEVEL_DEFAULT is nothing more than a shorthand of > > CONFIG_CONSOLE_LOGLEVEL_DEFAULT. > > > > When you change CONFIG_CONSOLE_LOGLEVEL_

[PATCH 1/3] printk: use CONFIG_CONSOLE_LOGLEVEL_* directly

2021-02-01 Thread Masahiro Yamada
on CHK include/generated/compile.h UPD include/generated/compile.h CC init/version.o AR init/built-in.a LD vmlinux.o ... For the same reason, do likewise for CONSOLE_LOGLEVEL_QUIET and MESSAGE_LOGLEVEL_DEFAULT. Signed-off-by: Masahiro Yamada ---

[PATCH 2/3] printk: hard-code CONSOLE_LOGLEVEL_MIN in printk.c

2021-02-01 Thread Masahiro Yamada
CONSOLE_LOGLEVEL_MIN is only used in kernel/printk/printk.c. You do not need to expose it to all printk() users. I could move it to kernel/printk/printk.c, but I do not think this macro would contribute to the code readability or maintainability. I just hard-coded it. Signed-off-by: Masahiro

[PATCH 3/3] printk: move CONSOLE_EXT_LOG_MAX to kernel/printk/printk.c

2021-02-01 Thread Masahiro Yamada
This macro is only used in kernel/printk/printk.c Signed-off-by: Masahiro Yamada --- include/linux/printk.h | 2 -- kernel/printk/printk.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/printk.h b/include/linux/printk.h index ceaf0486c01c..d2c9c2a6e471

Re: [PATCH] scripts: switch some more scripts explicitly to Python 3

2021-02-01 Thread Masahiro Yamada
On Tue, Feb 2, 2021 at 3:28 AM Nick Desaulniers wrote: > > On Sun, Jan 31, 2021 at 5:08 PM Masahiro Yamada wrote: > > > > For the same reason as commit 51839e29cb59 ("scripts: switch explicitly > > to Python 3"), switch some more scripts, which I tested and

[PATCH v2] scripts/clang-tools: switch explicitly to Python 3

2021-02-01 Thread Masahiro Yamada
For the same reason as commit 51839e29cb59 ("scripts: switch explicitly to Python 3"), switch some more scripts, which I tested and confirmed working on Python 3. Signed-off-by: Masahiro Yamada Acked-by: Nathan Chancellor --- Changes in v2: - Drop the spdxcheck.py change. The same

Re: [PATCH] kbuild: remove PYTHON variable

2021-02-01 Thread Masahiro Yamada
On Tue, Feb 2, 2021 at 1:38 AM Jonathan Corbet wrote: > > Masahiro Yamada writes: > > > Python retired in 2020, and some distributions do not provide the > > 'python' command any more. > > > > As in commit 51839e29cb59 ("scripts: switch explicitly

[PATCH] init: clean up early_param_on_off() macro

2021-01-31 Thread Masahiro Yamada
Use early_param() to define early_param_on_off(). Signed-off-by: Masahiro Yamada --- include/linux/init.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/init.h b/include/linux/init.h index e668832ef66a..ae2c2aace0d0 100644 --- a/include/linux/init.h +++ b

[PATCH] lib/cmdline: remove an unneeded local variable in next_arg()

2021-01-31 Thread Masahiro Yamada
The local variable 'next' is unneeded because you can simply advance the existing pointer 'args'. Signed-off-by: Masahiro Yamada --- lib/cmdline.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/cmdline.c b/lib/cmdline.c index b390dd03363b.

[PATCH] scripts: switch some more scripts explicitly to Python 3

2021-01-31 Thread Masahiro Yamada
For the same reason as commit 51839e29cb59 ("scripts: switch explicitly to Python 3"), switch some more scripts, which I tested and confirmed working on Python 3. Signed-off-by: Masahiro Yamada --- scripts/clang-tools/gen_compile_commands.py | 2 +- scripts/clang-tools/run-clan

Re: [PATCH] Updates Documentation/Makefile to use Python3 as fallback

2021-01-31 Thread Masahiro Yamada
uld just say $(PYTHON3) and explicitly leave Python2 > behind; that needs to happen in the not-too-distant future regardless > but we haven't decided to actually do it yet. We are already doing this in linux-next. I will apply this. https://lore.kernel.org/patchwork/patch/1373422/ > Thanks, > > jon -- Best Regards Masahiro Yamada

[PATCH] kbuild: remove PYTHON variable

2021-01-31 Thread Masahiro Yamada
ith both Python 2 and 3. This commit removes the variable 'PYTHON', and switches the existing users to 'PYTHON3'. BTW, PEP 394 (https://www.python.org/dev/peps/pep-0394/) is a helpful material. Signed-off-by: Masahiro Yamada --- Documentation/Makefile | 2 +- D

Re: [PATCH] Documentation/llvm: Add a section about supported architectures

2021-01-29 Thread Masahiro Yamada
eed anything else from me on this, or does Masahiro > need to pick this up? > > Cheers, > Nathan Now I applied to linux-kbuild. Thanks for the reminder. -- Best Regards Masahiro Yamada

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

2021-01-28 Thread Masahiro Yamada
ch (xtensa.patch) out of mbox, it This is the last one, not the first. > does cleanly applies via "patch -p1" > > Can someone suggest how do i apply this patch series to my local git tree? > Thanks. I do not know. I can apply this series on top of the current Linus tree cleanly. -- Best Regards Masahiro Yamada

Re: [PATCH RFC] kbuild: Prevent compiler mismatch with external modules

2021-01-28 Thread Masahiro Yamada
fig make: *** No rule to make target 'oldconfig'. Stop. [2] As for this patch, it is wrong to do this check in the Makefile parse stage. "make M=... clean" "make M=... help" etc. will fail. Such targets do not require the compiler in the first place. This check must be done before starting building something, Also, this patch is not applicable. gcc-version.sh and clang-version.sh do not exist. See linux-next. [3] Peterz already pointed out asm-goto as an example of ABI mismatch. I remember a trouble reported in the past due to the mismatch of -mstack-protector-guard-offset. https://bugzilla.kernel.org/show_bug.cgi?id=201891 This has already been fixed, and it will no longer happen though. -- Best Regards Masahiro Yamada

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

<    1   2   3   4   5   6   7   8   9   10   >