[PATCH 09/10] kbuild: add *.asn1.[ch] to 'targets' automatically

2018-03-23 Thread Masahiro Yamada
Use $(call if_changed,...) instead of $(call cmd,...) in case the build command is changed in the future. Add intermediate files to 'targets' automatically to include *.cmd files. Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 9 ++--- 1 file changed, 6 insert

[PATCH 10/10] kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS specifier

2018-03-23 Thread Masahiro Yamada
The exception is when they are created by $(call cmd,...) instead of $(call if_changed,...) since the former does not need to include .*.cmd file. In this case, makefiles need to mark them .SECONDARY by themselves, like arch/arm(64)/crypto/Makefile. Signed-off-by: Masahiro Yamada --- ar

[PATCH 02/10] kbuild: clean up *.lex.c and *.tab.[ch] patterns from top-level Makefile

2018-03-23 Thread Masahiro Yamada
;make clean' instead of 'make mrproper'. Signed-off-by: Masahiro Yamada --- Makefile | 1 + scripts/dtc/Makefile | 6 ++ scripts/genksyms/Makefile | 2 -- scripts/kconfig/Makefile | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Makef

[PATCH 01/10] .gitignore: move *.lex.c *.tab.[ch] patterns to the top-level .gitignore

2018-03-23 Thread Masahiro Yamada
These patterns are common to host programs that require lexer and parser. Move them to the top .gitignore. Signed-off-by: Masahiro Yamada --- .gitignore | 2 ++ scripts/dtc/.gitignore | 3 --- scripts/genksyms/.gitignore | 3 --- scripts/kconfig/.gitignore | 3 --- 4

[PATCH 06/10] .gitignore: move *-asn1.[ch] patterns to the top-level .gitignore

2018-03-23 Thread Masahiro Yamada
These are common patterns where source files are parsed by the asn1_compiler. Signed-off-by: Masahiro Yamada --- .gitignore | 5 + crypto/.gitignore| 1 - crypto/asymmetric_keys/.gitignore| 1 - drivers/crypto/qat/qat_common

[PATCH 08/10] kbuild: rename *-asn1.[ch] to *.asn.[ch]

2018-03-23 Thread Masahiro Yamada
are checked-in files: net/netfilter/nf_conntrack_h323_asn1.c include/linux/netfilter/nf_conntrack_h323_asn1.h include/linux/sunrpc/gss_asn1.h Rename generated files to *.asn1.[ch] for consistency. Signed-off-by: Masahiro Yamada --- .gitignore

[PATCH 05/10] kbuild: add %.dtb.S and %.dtb to 'targets' automatically

2018-03-23 Thread Masahiro Yamada
case cmd_dt_S_dtb is changed in the future. Signed-off-by: Masahiro Yamada --- drivers/of/unittest-data/Makefile | 2 -- scripts/Makefile.build| 4 +++- scripts/Makefile.lib | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/of/unittest-data/Mak

Re: [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build

2018-03-23 Thread Masahiro Yamada
ate rules, and let make chain them > automatically. > > Gr{oetje,eeting}s, > > Geert > I submit the patches. I'd like to queue them up for the next merge window, so your problems will be fixed if Kbuild pull requests are pulled. The driver Makefile has two problems. [1] Objects are always rebuilt due to missing 'targets' [2] Intermediate files are removed due to missing .SECONDARY (or .PRECIOUS) If you want to fix them by yourself, you can. But, those issues will be taken care of by the core Makefile. Specifically, [1] will be fixed by https://patchwork.kernel.org/patch/10304671/ and [2] by https://patchwork.kernel.org/patch/10304651/ -- Best Regards Masahiro Yamada

Re: [PATCH 08/10] kbuild: rename *-asn1.[ch] to *.asn.[ch]

2018-03-23 Thread Masahiro Yamada
I forgot to CC David Howells, the author of asn1_compiler. 2018-03-23 22:04 GMT+09:00 Masahiro Yamada : > Our convention is to distinguish file types by suffixes with a period > as a separator. > > *-asn1.[ch] is a different pattern from other generated sources such > as *.l

Re: [PATCH v2 11/21] stack-protector: test compiler capability in Kconfig and drop AUTO mode

2018-04-09 Thread Masahiro Yamada
2018-03-28 20:18 GMT+09:00 Kees Cook : > On Mon, Mar 26, 2018 at 10:29 PM, Masahiro Yamada > wrote: >> Move the test for -fstack-protector(-strong) option to Kconfig. >> >> If the compiler does not support the option, the corresponding menu >> is automatically hidden

Re: [PATCH v2] Kbuild: fix # escaping in .cmd files for future Make

2018-04-09 Thread Masahiro Yamada
es: https://bugzilla.kernel.org/show_bug.cgi?id=197847 > Cc: Randy Dunlap > Signed-off-by: Rasmus Villemoes > --- Applied to linux-kbuild. Thanks! -- Best Regards Masahiro Yamada

Re: [PATCH v2 11/21] stack-protector: test compiler capability in Kconfig and drop AUTO mode

2018-04-09 Thread Masahiro Yamada
2018-04-10 0:04 GMT+09:00 Kees Cook : > On Mon, Apr 9, 2018 at 1:54 AM, Masahiro Yamada > wrote: >> 2018-03-28 20:18 GMT+09:00 Kees Cook : >>> On Mon, Mar 26, 2018 at 10:29 PM, Masahiro Yamada >>> wrote: >>>> diff --git a/arch/Kconfig b/arch/Kconfig >

Re: [PATCH v2 20/21] gcc-plugins: enable GCC_PLUGINS for COMPILE_TEST

2018-04-09 Thread Masahiro Yamada
2018-03-28 20:47 GMT+09:00 Kees Cook : > On Mon, Mar 26, 2018 at 10:29 PM, Masahiro Yamada > wrote: >> The plugin availability is checked in Kconfig, so all{yes,mod}config >> will not be bothered. Remove 'depends on !COMPILE_TEST'. >> >> Signed-off-by: Mas

[PATCH 4/5] kbuild: simplify modname calculation

2018-03-07 Thread Masahiro Yamada
modname can be calculated much more simply. If modname-multi is empty, it is a single-used object. So, modname = $(basetarget). Otherwise, modname = $(modname-multi). Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 12 +--- scripts/Makefile.lib | 7 --- 2 files

[PATCH 3/5] kbuild: fix modname for composite modules

2018-03-07 Thread Masahiro Yamada
From: Cao jin Commit cf4f21938e13 ("kbuild: Allow to specify composite modules with modname-m") added modname-m support, but missed to update the corresponding multi-objs-m & modname-multi definition. Signed-off-by: Cao jin Signed-off-by: Masahiro Yamada --- I rebased the pr

[PATCH 2/5] kbuild: define KBUILD_MODNAME even if multiple modules share objects

2018-03-07 Thread Masahiro Yamada
compiled. "foo", "bar", or what else? One idea is to define colon-separated modules that share the object, in this case, "bar:foo" (modules are sorted alphabetically by $(sort ...). Signed-off-by: Masahiro Yamada --- scripts/Makefile.lib | 9 + 1 file changed

[PATCH 0/5] kbuild: always define KBUILD_MODNAME, and clean-up/fix modname

2018-03-07 Thread Masahiro Yamada
3/5 takes into account '-m' case for multi-used-m. 2/5 is necessary beforehand because 3/5 would cause a build error for drivers/net/ethernet/cavium/liquidio/lio_ethtool.c 1, 4, 5 are just clean-ups. Cao jin (1): kbuild: fix modname for composite modules Masahiro Yamada (4)

[PATCH 5/5] kbuild: move modname and modname-multi close to modname_flags

2018-03-07 Thread Masahiro Yamada
Just a cosmetic change to put related code close together. Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 2 -- scripts/Makefile.lib | 14 -- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index b8aecb7

[PATCH 1/5] kbuild: remove unnecessary $(subst $(obj)/,,...) in modname-multi

2018-03-07 Thread Masahiro Yamada
) $(call if_changed_rule,cc_o_c) $(obj)/%.lst: $(src)/%.c FORCE $(call if_changed_dep,cc_lst_c) '$*' returns the stem of the target (the part of '%'), so $(obj)/ has already been ripped off. $(subst $(obj)/,,$*.o) is the same as $(*.o) Signed-off-by: Masahiro Y

Re: [PATCH] bloat-o-meter: fix typo in help

2018-03-07 Thread Masahiro Yamada
type\n") >>> sys.stderr.write("-d Show delta of Data Section\n") >>> sys.stderr.write("-t Show delta of text Section\n") >>> sys.exit(-1) >>> -- >>> 2.14.3 >>> >> >> Ping, anyone willing to review and eventually merge it? > > Acked-by: Randy Dunlap > > > Andrew or Masahiro? > > thanks, > -- > ~Randy I will pick up this shortly. Thanks! -- Best Regards Masahiro Yamada

Re: arm crypto .S_shipped files sometimes get rebuilt randomly

2018-03-07 Thread Masahiro Yamada
f Set REGENERATE_ARM64_SHA=1 from the command line only when you need to update the _shipped files. This is what commit 7373f4f83c71d50f0aece6d94309ab7fde42180f did. Recently, Kconfig switched to [1]. So, flex and bison are required to build the kernel. -- Best Regards Masahiro Yamada

[PATCH] ASoC: uniphier: remove superfluous inclusion

2018-03-08 Thread Masahiro Yamada
None of aio-compress.c depends on the syscon header. Signed-off-by: Masahiro Yamada Acked-by: Katsuhiro Suzuki --- sound/soc/uniphier/aio-compress.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/uniphier/aio-compress.c b/sound/soc/uniphier/aio-compress.c index 4751c8b..4c1027a

Re: [PATCH] reset: uniphier: add Pro4/Pro5/PXs2 audio systems reset control

2018-03-08 Thread Masahiro Yamada
2018-03-08 17:09 GMT+09:00 Katsuhiro Suzuki : > Add reset lines for audio subsystem (AIO) on UniPhier > Pro4/Pro5/PXs2 SoCs. > > Signed-off-by: Katsuhiro Suzuki > --- Acked-by: Masahiro Yamada > drivers/reset/reset-uniphier.c | 3 +++ > 1 file changed, 3 insertion

Re: [PATCH] clk: uniphier: add Pro4/Pro5/PXs2 audio system clock

2018-03-08 Thread Masahiro Yamada
2018-03-08 17:23 GMT+09:00 Katsuhiro Suzuki : > Add clock for audio subsystem (AIO) on UniPhier > Pro4/Pro5/PXs2 SoCs. > > Signed-off-by: Katsuhiro Suzuki > --- Acked-by: Masahiro Yamada > drivers/clk/uniphier/clk-uniphier-sys.c | 11 +++ > 1 file changed, 11 i

Re: [PATCH] kbuild: Handle builtin dtb files containing hyphens

2018-03-08 Thread Masahiro Yamada
; > Okay I'll reword to make it clearer and do a v2. > > Thanks > James The code looks good. If you send v2, I can shortly apply it to the fixes branch. If possible, I want to send a PR this weekend. -- Best Regards Masahiro Yamada

Re: [PATCH 2/5] kbuild: define KBUILD_MODNAME even if multiple modules share objects

2018-03-08 Thread Masahiro Yamada
2018-03-08 19:11 GMT+09:00 Cao jin : > > > On 03/08/2018 09:05 AM, Masahiro Yamada wrote: >> Currently, KBUILD_MODNAME is defined only when $(modname) contains >> just one word. If an object is shared among multiple modules, >> undefined KBUILD_MODNAME could cause

Re: [PATCH 1/5] kbuild: remove unnecessary $(subst $(obj)/,,...) in modname-multi

2018-03-08 Thread Masahiro Yamada
2018-03-08 10:04 GMT+09:00 Masahiro Yamada : > In the context ... > > $(obj)/%.s: $(src)/%.c FORCE > $(call if_changed_dep,cc_s_c) > > $(obj)/%.i: $(src)/%.c FORCE > $(call if_changed_dep,cpp_i_c) > > $(obj)/%.o: $(src)/%.c $(recordm

Re: [PATCH 2/5] kbuild: define KBUILD_MODNAME even if multiple modules share objects

2018-03-08 Thread Masahiro Yamada
2018-03-08 19:25 GMT+09:00 Cao jin : > Masahiro-san > > On 03/08/2018 06:21 PM, Masahiro Yamada wrote: >> 2018-03-08 19:11 GMT+09:00 Cao jin : >>> >>> >>> On 03/08/2018 09:05 AM, Masahiro Yamada wrote: >>>> Currently, KBUILD_MODNAME is defined

Re: [PATCH] bloat-o-meter: fix typo in help

2018-03-08 Thread Masahiro Yamada
te("-t Show delta of text Section\n") >> sys.exit(-1) >> -- >> 2.14.3 >> > > Ping, anyone willing to review and eventually merge it? > > Regards, > -- > Matteo Croce > per aspera ad upstream Applied to linux-kbuild/fixes. Thanks! -- Best Regards Masahiro Yamada

Re: [PATCH v2] kbuild: Handle builtin dtb file names containing hyphens

2018-03-08 Thread Masahiro Yamada
6 ("MIPS: BMIPS: rename bcm96358nb4ser to > bcm6358-neufbox4-sercom") > Signed-off-by: James Hogan > Reviewed-by: Frank Rowand > Cc: Rob Herring > Cc: Masahiro Yamada > Cc: Michal Marek > Cc: Ralf Baechle > Cc: Florian Fainelli > Cc: Kevin Cernekee > C

[PATCH] mtd: nand: remove STANDALONE compile mode of nand_ecc

2018-03-09 Thread Masahiro Yamada
This file can not be built independently any more. We would have to bring in more to resolve mtd_to_nand(mtd)->ecc.size, for example. It is difficult to notice a breakage since nobody compiles this mode. It is not worth fixing or maintaining in my opinion. Remove. Signed-off-by: Masah

[PATCH v3 00/11] Add Kconfig unit tests

2018-03-13 Thread Masahiro Yamada
_.py::test PASSED [ 85%] scripts/kconfig/tests/rand_nested_choice/__init__.py::test PASSED [ 92%] scripts/kconfig/tests/warn_recursive_dep/__init__.py::test PASSED [100%] Masahiro Yamada (11): kbuild: add PYTHON2 and PYTHON3 variables kconfig:

[PATCH v3 10/11] kconfig: tests: test if recursive dependencies are detected

2018-03-13 Thread Masahiro Yamada
Recursive dependency should be detected and warned. Test this. This indirectly tests the line number increments. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson --- Changes in v3: None Changes in v2: - Fix missing end quote - coding style clean-up based on PEP8, PEP257

[PATCH v3 06/11] kconfig: tests: check unneeded "is not set" with unmet dependency

2018-03-13 Thread Masahiro Yamada
naive case. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson --- Changes in v3: None Changes in v2: - coding style clean-up based on PEP8, PEP257 scripts/kconfig/tests/no_write_if_dep_unmet/Kconfig | 14 ++ .../kconfig/tests/no_write_if_dep_unme

[PATCH v3 09/11] kconfig: tests: test randconfig for choice in choice

2018-03-13 Thread Masahiro Yamada
=y CONFIG_C=y # CONFIG_D is not set Case 3: # CONFIG_A is not set CONFIG_B=y # CONFIG_C is not set CONFIG_D=y CONFIG_E=y So, this test iterates several times, and checks if the result is either of the three. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson --- Changes

[PATCH v3 04/11] kconfig: tests: test automatic submenu creation

2018-03-13 Thread Masahiro Yamada
ff-by: Masahiro Yamada Reviewed-by: Ulf Magnusson --- Changes in v3: None Changes in v2: - shorten directory name 'auto_submenu_creation' -> 'auto_submenu' - coding style clean-up based on PEP8, PEP257 scripts/kconfig/tests/auto_submenu/Kconfig | 50 +++

[PATCH v3 11/11] kconfig: tests: test if recursive inclusion is detected

2018-03-13 Thread Masahiro Yamada
If recursive inclusion is detected, it should fail with error messages. Test this. This also tests the line numbers in the error message, fixed by commit 5ae6fcc4bb82 ("kconfig: fix line number in recursive inclusion error message"). Signed-off-by: Masahiro Yamada Reviewed-by: Ulf

[PATCH v3 01/11] kbuild: add PYTHON2 and PYTHON3 variables

2018-03-13 Thread Masahiro Yamada
5edbe67794 ("ia64: convert unwcheck.py to python3") converted it to be compatible with both Python 2.x and 3.x, so this is the exceptional case where the use of 'python' is allowed. So, I did not touch arch/ia64/Makefile. tools/perf/Makefile.config sets PYTHON and PYTHON2 by itself,

[PATCH v3 03/11] kconfig: tests: add basic choice tests

2018-03-13 Thread Masahiro Yamada
ole choice can be invisible. Test basic functionality of choice. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson --- Changes in v3: None Changes in v2: - coding style clean-up based on PEP8, PEP257 scripts/kconfig/tests/choice/Kconfig | 54 ++

[PATCH v3 08/11] kconfig: tests: test defconfig when two choices interact

2018-03-13 Thread Masahiro Yamada
conf_set_all_new_symbols() phase is written out to the .config file. Add a unit test for this naive case. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson --- Changes in v3: - Use def_bool for MODULES Changes in v2: - Newly added scripts/kconfig/tests/inter_choice/Kconfig

[PATCH v3 07/11] kconfig: tests: check visibility of tristate choice values in y choice

2018-03-13 Thread Masahiro Yamada
b67ab2cd2b8 ("kconfig: do not write choice values when their dependency becomes n"), it is not written now. In this test, "# CONFIG_CHOICE1 is not set" is don't care. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson --- Changes in v3: None C

[PATCH v3 05/11] kconfig: tests: test if new symbols in choice are asked

2018-03-13 Thread Masahiro Yamada
This is a subtle corner case. Add a test case to avoid breakage. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson --- Changes in v3: None Changes in v2: - coding style clean-up based on PEP8, PEP257 scripts/kconfig/tests/new_choice_with_dep/Kconfig | 37 ++ .../kco

[PATCH v3 02/11] kconfig: tests: add framework for Kconfig unit testing

2018-03-13 Thread Masahiro Yamada
data like input .config and information about expected results. How to run tests? - You need python3 and pytest. Then, run "make testconfig". O= option is supported. If V=1 is given, detailed logs captured during tests are displayed. Signed-off-by: Masahiro Yama

[PATCH v4 2/2] kconfig: make unmet dependency warnings readable

2018-03-13 Thread Masahiro Yamada
] && (RALINK || COMPILE_TEST [=y]) - PHY_ROCKCHIP_PCIE [=y] && (ARCH_ROCKCHIP && OF [=y] || COMPILE_TEST [=y]) WARNING: unmet direct dependencies detected for OF_GPIO Depends on [n]: GPIOLIB [=y] && OF [=y] && HAS_IOMEM [=n] Selected by [y]: - PINC

[PATCH v4 1/2] kconfig: warn unmet direct dependency of tristate symbols selected by y

2018-03-13 Thread Masahiro Yamada
27;B' is bool) should not be warned, so 'depends on m' for bool symbols should be naturally treated as 'depends on y'. [Test Case2 (not unmet dependency)] config MODULES def_bool y option modules config A def_bool y select B

Re: [PATCH v3] kconfig: make unmet dependency warnings readable

2018-03-13 Thread Masahiro Yamada
2018-03-13 7:59 GMT+09:00 Eugeniu Rosca : > Hi Masahiro, > > Some "final polishing" review comments. Feel free to pick/drop them at > your will. > > On Sun, Mar 11, 2018 at 12:51:59AM +0900, Masahiro Yamada wrote: >> Currently, the unmet dependency w

Re: [PATCH] crypto: arm,arm64 - Fix random regeneration of S_shipped

2018-03-13 Thread Masahiro Yamada
tion is minimally intrusive to > make it easier to push into stable. > > Another report on a similar issue here: https://lkml.org/lkml/2018/3/8/1379 > > Signed-off-by: Leonard Crestez > Cc: > --- Reviewed-by: Masahiro Yamada > arch/arm/crypto/Makefile | 2 ++ >

Re: [PATCH] pinctrl: uniphier: add PXs2 Audio in/out pin-mux settings

2018-03-13 Thread Masahiro Yamada
; Signed-off-by: Katsuhiro Suzuki > --- Acked-by: Masahiro Yamada -- Best Regards Masahiro Yamada

Re: [PATCH] pinctrl: uniphier: divide I2S and S/PDIF audio out pin-mux group

2018-03-14 Thread Masahiro Yamada
ned-off-by: Katsuhiro Suzuki > --- Acked-by: Masahiro Yamada > drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c | 15 ++- > drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c | 15 ++- > 2 files changed, 20 insertions(+), 10 deletions(-) > > diff --git a/dr

[PATCH 0/7] kbuild: various fix, clean-up, improvements of CONFIG_TRIM_UNUSED_KSYMS

2018-03-14 Thread Masahiro Yamada
Masahiro Yamada (7): kbuild: clear LDFLAGS in the top Makefile kbuild: touch autoksyms.h when it is really missing kbuild: move 'scripts' target below kbuild: restore touching autoksyms.h to the top Makefile kbuild: hide CONFIG_TRIM_UNUSED_KSYMS code from external module

[PATCH 1/7] kbuild: clear LDFLAGS in the top Makefile

2018-03-14 Thread Masahiro Yamada
arch/arm64/Makefile adds one more '-maarch64linux'. Due to the command line change, modules are rebuilt needlessly. Signed-off-by: Masahiro Yamada --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index e02d092..5eb5d9d 100644 --- a/Makefile +++

[PATCH 4/7] kbuild: restore touching autoksyms.h to the top Makefile

2018-03-14 Thread Masahiro Yamada
the top Makefile. I remove the standalone test target because I want to use it to create an empty autoksyms.h file. Here is a little improvement; unnecessary autoksyms.h is not created when CONFIG_TRIM_UNUSED_KSYMS is disabled. [1] https://lkml.org/lkml/2016/11/30/734 [2] https://lkml.org/lkml/2016/11

[PATCH 2/7] kbuild: touch autoksyms.h when it is really missing

2018-03-14 Thread Masahiro Yamada
>From the comment, I expect this code creates autoksyms.h in case it is missing, but it actually touches it when it does exists. Signed-off-by: Masahiro Yamada --- I do not know when this code is useful... If autoksyms.h were missing, build should have already failed because include/{linux,

[PATCH 7/7] kbuild: link vmlinux just once for CONFIG_TRIM_UNUSED_KSYMS

2018-03-14 Thread Masahiro Yamada
9 ("kbuild: better abstract vmlinux sequential prerequisites") was to cater to CONFIG_BUILD_DOCSRC, but it was later removed by commit 184892925118 ("samples: move blackfin gptimers-example from Documentation"). I also changed adjust_autoksyms.sh to simply exit with 1 or 0

[PATCH 6/7] kbuild: move include/config/ksym/* to include/ksym/*

2018-03-14 Thread Masahiro Yamada
The idea of using fixdep was inspired by Kconfig, but autoksyms is unrelated to Kconfig. So, I want to get those touched files out of include/config/. The directory include/ksym/ is removed by "make clean". We do not need to keep it for external module building. Signed-off-by: Masah

[PATCH 5/7] kbuild: hide CONFIG_TRIM_UNUSED_KSYMS code from external module building

2018-03-14 Thread Masahiro Yamada
If CONFIG_TRIM_UNUSED_KYMS is enabled, KBUILD_MODULES is set. This code is unneeded for external module building because KBUILD_MODULES is always set. Move this code inside "ifeq ($(KBUILD_EXTMOD),)" conditional. Signed-off-by: Masahiro Yamada --- Makefile | 14 +++--- 1 fi

[PATCH 3/7] kbuild: move 'scripts' target below

2018-03-14 Thread Masahiro Yamada
Just a trivial change to prepare for the next commit. This target is still invisible from external module building. Signed-off-by: Masahiro Yamada --- Makefile | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 5eb5d9d..fab0e19 100644

[PATCH v2 1/3] serial: 8250_uniphier: remove unused "fifo-size" property

2018-09-27 Thread Masahiro Yamada
igned-off-by: Masahiro Yamada Reviewed-by: Rob Herring --- Changes in v2: - Fix the product code in git-log: MN2WS0230 -> MN2WS0235 Documentation/devicetree/bindings/serial/uniphier-uart.txt | 4 drivers/tty/serial/8250/8250_uniphier.c| 10 +- 2 files ch

[PATCH v2 3/3] serial: 8250_uniphier: add auto-flow-control support

2018-09-27 Thread Masahiro Yamada
From: Dai Okamura Add selective auto-flow-control support for UniPhier serial driver. Signed-off-by: Dai Okamura Signed-off-by: Masahiro Yamada Reviewed-by: Rob Herring --- Changes in v2: None Documentation/devicetree/bindings/serial/uniphier-uart.txt | 3 +++ drivers/tty/serial/8250

[PATCH v2 2/3] serial: 8250_uniphier: flatten probe function

2018-09-27 Thread Masahiro Yamada
Currently, the DT-related settings are split out to uniphier_of_serial_setup(), but it turned out to be not nice. The next commit will add a DT property, but it will not fit in the helper. Merge the helper into the probe function. Signed-off-by: Masahiro Yamada --- Changes in v2: None

[PATCH v2 0/3] serial: 8250_uniphier: remove unused code and add auto-flow-control

2018-09-27 Thread Masahiro Yamada
- Remove never-used DT property - Refactor code - Add auto-flow-control support Dai Okamura (1): serial: 8250_uniphier: add auto-flow-control support Masahiro Yamada (2): serial: 8250_uniphier: remove unused "fifo-size" property serial: 8250_uniphier: flatten prob

Re: [PATCH 0/3] Kbuild: Some fixdep tweaks

2018-09-27 Thread Masahiro Yamada
ave something more to convince me, please let me know. -- Best Regards Masahiro Yamada

[PATCH v2] mtd: rawnand: denali: set SPARE_AREA_SKIP_BYTES register to 8 if unset

2018-09-27 Thread Masahiro Yamada
platform. If so, please trade up to a different solution. Signed-off-by: Masahiro Yamada --- Changes in v2: - Change approach from a DT-property to a hard-coded dafault drivers/mtd/nand/raw/denali.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/mtd

[PATCH] modpost: remove leftover symbol prefix handling for module device table

2018-09-27 Thread Masahiro Yamada
module device table symbols. Signed-off-by: Masahiro Yamada --- scripts/mod/file2alias.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 7be4369..ba4ebc4 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file

[PATCH] samples: run headers_install for host arch instead of target arch

2018-09-27 Thread Masahiro Yamada
ens only for samples that need it. I also removed 'Documentation/: headers_install', which I guess is stale code. Fixes: 3fca1700c4c3 ("kbuild: make samples really depend on headers_install") Signed-off-by: Masahiro Yamada Cc: David Howells --- Makefile| 8 ---

Re: [PATCH] samples: disable CONFIG_SAMPLES for UML

2018-09-27 Thread Masahiro Yamada
2018年9月19日(水) 15:58 Masahiro Yamada : > > Hi. > > 2018-09-18 17:21 GMT+09:00 Richard Weinberger : > > Am Dienstag, 18. September 2018, 05:58:33 CEST schrieb Masahiro Yamada: > >> Some samples require headers installation, so commit 3fca1700c4c3 > >> (&q

Re: [PATCH] modpost: remove leftover symbol prefix handling for module device table

2018-09-29 Thread Masahiro Yamada
ERNEL BUILD + files below scripts/ (unless maintained elsewhere) M: Masahiro Yamada M: Michal Marek T: git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git L: linux-kbu...@vger.kernel.org S: Maintained F: Documentation/kbuild/ F: Makefile F:

Re: [PATCH] samples: run headers_install for host arch instead of target arch

2018-09-29 Thread Masahiro Yamada
2018年9月29日(土) 4:38 Arnd Bergmann : > > On Fri, Sep 28, 2018 at 8:51 AM Masahiro Yamada > wrote: > > > > Some samples search headers in $(objtree)/usr/include, which is made > > available by "make headers_install". It is not kernel-space code but > >

[PATCH 1/2] kbuild: make 'scripts' depend on 'prepare0'

2018-11-22 Thread Masahiro Yamada
of 'prepare0', which starts compiling target *.c files. Signed-off-by: Masahiro Yamada --- Makefile | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 36f3f0e..cee4cec 100644 --- a/Makefile +++ b/Makefile @

[PATCH 2/2] kbuild: descend into scripts/gcc-plugins/ via scripts/Makefile

2018-11-22 Thread Masahiro Yamada
Now that 'prepare0' depends on 'scripts', building GCC plugins can go into scripts/Makefile, which is a more standard way. Signed-off-by: Masahiro Yamada --- Makefile | 2 +- scripts/Makefile | 3 ++- scripts/Makefile.gcc-plugins | 8

Re: [PATCH] kbuild: move modpost out of 'scripts' target

2018-11-22 Thread Masahiro Yamada
On Wed, Nov 21, 2018 at 2:16 AM Masahiro Yamada wrote: > > I am eagar to build under the scripts/ directory only with $(HOSTCC), > but scripts/mod/ highly depends on the $(CC) and target arch headers. > That it why the 'scripts' target must depend on 'asm-gen

[PATCH 3/3] modpost: move unresolved symbol checks to check_exports()

2018-11-22 Thread Masahiro Yamada
This will fit better in check_exports() than add_versions(). Signed-off-by: Masahiro Yamada --- scripts/mod/modpost.c | 33 ++--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 05e41eb..32e5026

[PATCH 2/3] modpost: merge module iterations

2018-11-22 Thread Masahiro Yamada
Probably, this is just a matter of the order of error/warning messages. Merge the two for-loops. Signed-off-by: Masahiro Yamada --- scripts/mod/modpost.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 39432c2

[PATCH 1/3] modpost: refactor seen flag clearing in add_depends()

2018-11-22 Thread Masahiro Yamada
You do not need to iterate over all modules for resetting ->seen flag because add_depends() is only interested in modules that export symbols referenced from the given 'mod'. This also avoids shadowing the 'modules' parameter of add_depends(). Signed-off-by: Masahiro Ya

Re: [PATCH v4 0/2] dmaengine: add UniPhier MIO DMAC driver

2018-11-25 Thread Masahiro Yamada
On Sat, Nov 24, 2018 at 11:16 PM Vinod Koul wrote: > > On 12-10-18, 01:41, Masahiro Yamada wrote: > > 1/2: DT-binding > > 2/2: driver > > Applied this series, thanks Thanks. > While building I noticed that we get few warns when compiling with > C=1, I would pr

Re: [PATCH v4 1/3] kernel.h: disable type-checks in container_of() for Sparse

2018-11-25 Thread Masahiro Yamada
On Sat, Nov 24, 2018 at 6:06 PM Miguel Ojeda wrote: > > On Fri, Nov 23, 2018 at 10:14 PM Luc Van Oostenryck > wrote: > > > > On Thu, Nov 22, 2018 at 12:14:20PM +0900, Masahiro Yamada wrote: > > > When I tried to enable BUILD_BUG_ON for Sparse, the kbuild tes

[PATCH 2/2] kconfig: tests: test reverse dependency with tristate if-conditional

2018-11-25 Thread Masahiro Yamada
Add a test-case for the fixed reverse dependency handling. Signed-off-by: Masahiro Yamada --- .../kconfig/tests/revdep_with_tristate_if/Kconfig | 21 + .../tests/revdep_with_tristate_if/__init__.py | 14 ++ .../tests/revdep_with_tristate_if

[PATCH 1/2] kconfig: fix reverse dependency with tristate if-conditional

2018-11-25 Thread Masahiro Yamada
idual Kconfig file [1], and I also found another example in the past, commit 9d9c98e89ee2 ("pcmcia: fix yenta dependency on PCCARD_NONSTATIC") but I suspect this is a bug of Kconfig itself. [1] https://www.spinics.net/lists/netfilter-devel/msg56985.html Reported-by: Taehee Yoo Repor

[PATCH] nios2: remove unneeded HAS_DMA define

2018-11-25 Thread Masahiro Yamada
kernel/dma/Kconfig globally defines HAS_DMA as follows: config HAS_DMA bool depends on !NO_DMA default y Signed-off-by: Masahiro Yamada --- arch/nios2/Kconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig index

[PATCH] pcmcia: remove per-arch PCMCIA config entry

2018-11-26 Thread Masahiro Yamada
Now that all architectures include drivers/pcmcia/Kconfig where the PCMCIA config is defined, the PCMCIA config entries in per-arch Kconfig files are redundant. Signed-off-by: Masahiro Yamada --- I will queue this up to my kbuild tree along with Christoph's clean-up patch set. arch

Re: [PATCH 1/2] kconfig: fix reverse dependency with tristate if-conditional

2018-11-26 Thread Masahiro Yamada
rop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Masahiro-Yamada/kconfig-fix-reverse-dependency-with-tristate-if-conditional/20181126-152716 > base: > https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git >

Re: [PATCH 1/2] kbuild: fix single target build for external module

2018-11-26 Thread Masahiro Yamada
On Thu, Nov 22, 2018 at 6:33 PM Masahiro Yamada wrote: > > Building a single target in an external module fails due to missing > .tmp_versions directory. > > For example, > > $ make -C /lib/modules/$(uname -r)/build M=$PWD foo.o > > will fail in the following way: &

Re: [PATCH 1/2] modpost: file2alias: go back to simple devtable lookup

2018-11-26 Thread Masahiro Yamada
On Fri, Nov 23, 2018 at 1:52 AM Masahiro Yamada wrote: > > Commit e49ce14150c6 ("modpost: use linker section to generate table.") > was not so cool as we had expected because it ended up with ugly section > hacks when commit dd2a3acaecd7 ("mod/file2alias: make modpos

Re: [PATCH 2/2] modpost: file2alias: check prototype of handler

2018-11-26 Thread Masahiro Yamada
On Fri, Nov 23, 2018 at 1:51 AM Masahiro Yamada wrote: > > Use specific prototype instead of an opaque pointer so that the > compiler can catch incompatible pointer type. > > Signed-off-by: Masahiro Yamada > --- Applied to linux-kbuild. > scripts/mod/file2alias.c

Re: [PATCH 1/2] kbuild: make 'scripts' depend on 'prepare0'

2018-11-26 Thread Masahiro Yamada
On Sat, Nov 24, 2018 at 4:57 PM Masahiro Yamada wrote: > > Before start descending, Kbuild needs to run 'prepare' and 'scripts', > which were orthogonal to each other prior to this commit. > > Let's consider 'scripts' is a part of the prep

Re: [PATCH 2/2] kbuild: descend into scripts/gcc-plugins/ via scripts/Makefile

2018-11-26 Thread Masahiro Yamada
On Sat, Nov 24, 2018 at 4:57 PM Masahiro Yamada wrote: > > Now that 'prepare0' depends on 'scripts', building GCC plugins can > go into scripts/Makefile, which is a more standard way. > > Signed-off-by: Masahiro Yamada > --- Applied to linux-kbuild.

Re: [PATCH 10/10] ARM64: dts: uniphier: Add all CPUs in cooling maps

2018-11-26 Thread Masahiro Yamada
gt;, > +<&cpu1 > THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > +<&cpu2 > THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu3 > THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > }; > }; > }; > -- > 2.19.1.568.g152ad8e3369a > -- Best Regards Masahiro Yamada

Re: [PATCH 6/6] ARM: dts: uniphier: Add all CPUs in cooling maps

2018-11-26 Thread Masahiro Yamada
;cpu1 > THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > +<&cpu2 > THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > +<&cpu3 > THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > }; > }; > }; > -- > 2.19.1.568.g152ad8e3369a > -- Best Regards Masahiro Yamada

Re: [PATCH v3 2/2] dt-bindings: uniphier: move cache-uniphier.txt to vendor directory

2018-11-26 Thread Masahiro Yamada
On Fri, Oct 19, 2018 at 7:33 PM Masahiro Yamada wrote: > > Now, the Socionext vendor directory is available at > Documentation/devicetree/bindings/arm/socionext/ > > Move cache-uniphier.txt over to it. > > Signed-off-by: Masahiro Yamada > Reviewed-by: Rob Herring

Re: [PATCH v3 1/2] dt-bindings: uniphier: add bindings for UniPhier SoC family

2018-11-26 Thread Masahiro Yamada
On Fri, Oct 19, 2018 at 7:32 PM Masahiro Yamada wrote: > > Document the list of SoCs and boards of UniPhier platform. > > Signed-off-by: Masahiro Yamada > Reviewed-by: Rob Herring > --- Applied to linux-uniphier. > Changes in v3: > - Capitalize 'Board' con

[PATCH v2 8/9] kbuild: refactor if_changed and if_changed_dep

2018-11-19 Thread Masahiro Yamada
'@set -e; $(echo-cmd) $(cmd_$(1)' can be replaced with '$(cmd)'. Signed-off-by: Masahiro Yamada --- Changes in v2: None scripts/Kbuild.include | 9 +++-- scripts/Makefile.build | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/scripts/Kbui

[PATCH v2 9/9] kbuild: remove redundant 'set -e' from cmd_* defines

2018-11-19 Thread Masahiro Yamada
These three cmd_* are invoked in the $(call cmd,*) form. Now that 'set -e' moved to the 'cmd' macro, they do not need to explicitly give 'set -e'. Signed-off-by: Masahiro Yamada --- Changes in v2: None scripts/Makefile.build | 2 -- scripts/package/Make

[PATCH v2 4/9] kbuild: refactor modversions build rules

2018-11-19 Thread Masahiro Yamada
(, whose timestamp says it is up-to-date) when the genksyms tool failed for some reasons. It no longer matters because any targets are deleted on errors since commit 9c2af1c7377a ("kbuild: add .DELETE_ON_ERROR special target"). Signed-off-by: Masahiro Yamada --- Changes in v2: - C

[PATCH v2 1/9] kbuild: let fixdep directly write to .*.cmd files

2018-11-19 Thread Masahiro Yamada
rget exists. This effectively reverts commit 2982c953570b ("kbuild: remove redundant $(wildcard ...) for cmd_files calculation"), and commit 00d78ab2ba75 ("kbuild: remove dead code in cmd_files calculation in top Makefile") because now we must check the presence of targets. Signed-of

[PATCH v2 5/9] kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS

2018-11-19 Thread Masahiro Yamada
lding with CONFIG_TRIM_UNUSED_KSYMS will be much faster. Signed-off-by: Masahiro Yamada --- Changes in v2: - Let gen_ksymdeps.sh add dependencies to .*.cmd file directly - Fix typos include/asm-generic/export.h | 13 - include/linux/export.h | 18 +

[PATCH v2 3/9] kbuild: remove redundant 'set -e' from sub_cmd_record_mcount

2018-11-19 Thread Masahiro Yamada
This is executed inside the if_changed_rule, which already sets 'set -e'. Signed-off-by: Masahiro Yamada --- Changes in v2: None scripts/Makefile.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index c90958

[PATCH v2 6/9] kbuild: change if_changed_rule for multi-line recipe

2018-11-19 Thread Masahiro Yamada
dability and maintainability wins. [1] Precisely, GNU Make may optimize this by executing the command directly instead of forking a subshell, if no shell special characters are found in the command line and omitting the subshell will not change the behavior. Signed-off-by: Masahiro Ya

[PATCH v2 7/9] kbuild: remove trailing semicolon from cmd_* passed to if_changed_rule

2018-11-19 Thread Masahiro Yamada
With the change of rule_cc_o_c / rule_as_o_S in the last commit, each command is executed in a separate subshell. Rip off unneeded semicolons. Signed-off-by: Masahiro Yamada --- Changes in v2: - Clean up cmd_and_fixdep as well scripts/Kbuild.include | 2 +- scripts/Makefile.build | 16

[PATCH v2 2/9] kbuild: remove redundant 'set -e' from filechk_* defines

2018-11-19 Thread Masahiro Yamada
The filechk macro in scripts/Kbuild.include already sets 'set -e'. Signed-off-by: Masahiro Yamada --- Changes in v2: None arch/um/Makefile | 2 +- scripts/Makefile.lib | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/um/Makefile b/arch/um/Makefile ind

[PATCH v2 0/9] kbuild: clean-up modversion, TRIM_UNUSED_KSYMS, if_changed_rule, etc.

2018-11-19 Thread Masahiro Yamada
a cleaner way. scripts/Kbuild.include now looks nice again. Also, in my rough estimation, building with CONFIG_TRIM_UNUSED_KSYMS became 40-50 % faster. Besides those, nice cleanups are here and there. Masahiro Yamada (9): kbuild: let fixdep directly write to .*.cmd files kbuild: remove

<    3   4   5   6   7   8   9   10   11   12   >