Re: [PATCH] kbuild: rpm-pkg: Support GNU tar >= 1.29

2018-03-26 Thread Masahiro Yamada
nd packs all the build output into the > kernel-devel RPM resulting in a huge package. > > Simple argument re-ordering fixes the problem. > > Signed-off-by: Jason Gunthorpe > --- Applied to linux-kbuild/fixes. Thanks! -- Best Regards Masahiro Yamada

Re: [PATCH] kconfig: do not include both curses.h and ncurses.h for nconfig

2018-03-26 Thread Masahiro Yamada
2018-03-15 15:25 GMT+09:00 Masahiro Yamada : > nconf.h includes and "ncurses.h", but it does not need to > include both. Generally, it should fall back to curses.h only when > ncurses.h is not found. But, looks like it has never happened; > these includes have been her

Re: [PATCH 1/3] kconfig: remove duplicated file name and lineno of recursive inclusion

2018-03-26 Thread Masahiro Yamada
2018-03-23 2:00 GMT+09:00 Masahiro Yamada : > As in the unit test, the error message for the recursive inclusion > looks like this: > > Kconfig.inc1:4: recursive inclusion detected. Inclusion path: > current file : 'Kconfig.inc1' > included from: 'Kc

Re: [PATCH 2/3] kconfig: detect recursive inclusion earlier

2018-03-26 Thread Masahiro Yamada
2018-03-23 2:00 GMT+09:00 Masahiro Yamada : > Currently, the recursive inclusion is not detected when the offending > file is about to be included; it is detected the offending file is > about to include the *next* file. This is because the detection loop > does not involve th

Re: [PATCH 3/3] kconfig: use yylineno option instead of manual lineno increments

2018-03-26 Thread Masahiro Yamada
2018-03-23 2:00 GMT+09:00 Masahiro Yamada : > Tracking the line number by hand is error-prone since we need to make > sure to increment it in all the \n matching patterns. > > If '%option yylineno' is set, flex defines 'yylineno' to contain the > current line

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

2018-03-26 Thread Masahiro Yamada
2018-03-23 22:04 GMT+09:00 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 >

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

2018-03-26 Thread Masahiro Yamada
DARY. It means primary targets are also marked as .SECONDARY, but I do not see any drawback for this. I replaced some .SECONDARY / .PRECIOUS markers with 'targets'. This will make Kbuild search for non-existing .*.cmd files, but this is not a noticeable performance issue. Signed-off-by:

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

2018-03-26 Thread Masahiro Yamada
s! -- Best Regards Masahiro Yamada

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

2018-03-26 Thread Masahiro Yamada
The plugin availability is checked in Kconfig, so all{yes,mod}config will not be bothered. Remove 'depends on !COMPILE_TEST'. Signed-off-by: Masahiro Yamada --- Changes in v2: - Remove more 'depends on' arch/Kconfig | 4 1 file changed, 4 deletions(-) diff --git a

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

2018-03-26 Thread Masahiro Yamada
ble as many features as possible. X86 has additional shell scripts in case the compiler supports the option, but generates broken code. I added CC_HAS_SANE_STACKPROTECTOR to test this. I had to add -m32 to gcc-x86_32-has-stack-protector.sh to make it work correctly. Signed-off-by: Masahiro Yamada

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

2018-03-26 Thread Masahiro Yamada
no argument. So, it will be easy to implement it as a sub-set of function feature. It is better to support two flavors of assignments, '=' and ':=' as well. Masahiro Yamada (21): kbuild: remove kbuild cache kbuild: remove CONFIG_CROSS_COMPILE support kconfig: move and renam

[PATCH v2 17/21] gcc-plugins: always build plugins with C++

2018-03-26 Thread Masahiro Yamada
-by: Masahiro Yamada --- Changes in v2: None scripts/Makefile.gcc-plugins | 11 +++ scripts/gcc-plugin.sh| 38 +++--- scripts/gcc-plugins/Makefile | 15 --- 3 files changed, 10 insertions(+), 54 deletions(-) diff --git a/scripts

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

2018-03-26 Thread Masahiro Yamada
For PowerPC, GCC 5.2 is the requirement for GCC plugins. Move the version check to Kconfig so that the GCC plugin menus will be hidden if an older compiler is in use. Signed-off-by: Masahiro Yamada Acked-by: Andrew Donnellan --- Changes in v2: None arch/powerpc/Kconfig | 2

[PATCH v2 04/21] kconfig: reference environments directly and remove 'option env=' syntax

2018-03-26 Thread Masahiro Yamada
#x27; is encountered, it is expanded, and resulted strings are pushed back to the input stream. This makes the implementation simpler. For example, the following code works. [Example code] config TOOLCHAIN_LIST string default "My tools: CC=$CC, AS=$AS, CPP=$CPP

[PATCH v2 21/21] arm64: move GCC version check for ARCH_SUPPORTS_INT128 to Kconfig

2018-03-26 Thread Masahiro Yamada
This becomes much neater in Kconfig. Signed-off-by: Masahiro Yamada --- Changes in v2: - Newly added arch/arm64/Kconfig | 1 + arch/arm64/Makefile | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 7381eeb..0c97f40 100644

[PATCH v2 19/21] gcc-plugins: test GCC plugin support in Kconfig

2018-03-26 Thread Masahiro Yamada
Run scripts/gcc-plugin.sh from Kconfig. Users can enable GCC_PLUGINS only when it is supported. Signed-off-by: Masahiro Yamada --- Changes in v2: None arch/Kconfig | 4 +++ scripts/Makefile.gcc-plugins | 82 scripts/gcc-plugin.sh

[PATCH v2 14/21] kconfig: add CC_IS_CLANG and CLANG_VERSION

2018-03-26 Thread Masahiro Yamada
This will be useful to describe the clang version dependency. Signed-off-by: Masahiro Yamada --- Changes in v2: None init/Kconfig | 7 +++ scripts/clang-version.sh | 24 +++- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/init/Kconfig b

[PATCH v2 16/21] kcov: imply GCC_PLUGINS and GCC_PLUGIN_SANCOV instead of select'ing them

2018-03-26 Thread Masahiro Yamada
ough to observe the dependency, and this makes sense. If you enable KCOV, you will probably want to enable GCC_PLUGIN_SANCOV, but it should not break the dependency. I also remove unneeded code, I just happened to notice. Signed-off-by: Masahiro Yamada - Drop depends on GCC_VERSION

[PATCH v2 10/21] kconfig: add 'success' and 'cc-option' macros

2018-03-26 Thread Masahiro Yamada
'cc-option' will be the most frequently used macro. It evaluates to 'y' if the given argument is supported by the compiler, or 'n' otherwise. Signed-off-by: Masahiro Yamada --- Changes in v2: - Implement 'success' as a macro init/Kconfig | 6 +

[PATCH v2 09/21] kconfig: add 'macro' keyword to support user-defined function

2018-03-26 Thread Masahiro Yamada
|| echo n) macro cc-option $(success $CC -Werror $(1) -c -x c /dev/null -o /dev/null) config CC_HAS_STACKPROTECTOR def_bool $(cc-option -fstack-protector) [Result] $ make -s alldefconfig $ tail -n 1 .config CONFIG_CC_HAS_STACKPROTECTOR=y Signed-off-by: Masahiro Yamad

[PATCH v2 02/21] kbuild: remove CONFIG_CROSS_COMPILE support

2018-03-26 Thread Masahiro Yamada
ty is [1] or [2]. Currently, there are only 4 defconfig files that specify CONFIG_CROSS_COMPILE. arch/arm/configs/lpc18xx_defconfig arch/hexagon/configs/comet_defconfig arch/openrisc/configs/or1ksim_defconfig arch/openrisc/configs/simple_smp_defconfig Signed-off-by: Masahiro Yamada ---

[PATCH v2 12/21] kconfig: show compiler version text in the top comment

2018-03-26 Thread Masahiro Yamada
; "aarch64-linux-gnu-gcc (Linaro GCC 7.2-2017.11) 7.2.1 20171011" include/config/auto.conf: FORCE endif Signed-off-by: Masahiro Yamada --- Changes in v2: None Kconfig | 2 ++ Makefile | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Kconfig b/Kconfig index e6ece5b..99ed

[PATCH v2 07/21] kconfig: add function support and implement 'shell' function

2018-03-26 Thread Masahiro Yamada
nts. This is a limitation to simplify the implementation. I want to avoid the dynamic function evaluation, which would introduce much more complexity. Signed-off-by: Masahiro Yamada --- Reminder for myself: Update Documentation/kbuild/kconfig-language.txt Changes in v2: - Use 'shell&#

[PATCH v2 01/21] kbuild: remove kbuild cache

2018-03-26 Thread Masahiro Yamada
207130ed ("kbuild: Cache a few more calls to the compiler") Commit 3298b690b21c ("kbuild: Add a cache for generated variables") Signed-off-by: Masahiro Yamada --- Changes in v2: None Makefile | 5 +-- scripts/Kbuild.include | 101 +++

[PATCH v2 05/21] kconfig: remove string expansion in file_lookup()

2018-03-26 Thread Masahiro Yamada
s not need to expand the given path. By the way, file_lookup() was already buggy; it expanded a given path, but it used the path before expansion for look-up: if (!strcmp(name, file->name)) { Signed-off-by: Masahiro Yamada --- Changes in v2: - Simplify the patch. Just remove te

[PATCH v2 03/21] kconfig: move and rename sym_expand_string_value()

2018-03-26 Thread Masahiro Yamada
This helper expands symbols contained in a string. I am about to change it to expand environments instead of symbols. Also, I will add function expansion later. Rename it to expand_string_value(), and move it to util.c, which is a more suitable place. Signed-off-by: Masahiro Yamada

[PATCH v2 13/21] kconfig: add CC_IS_GCC and GCC_VERSION

2018-03-26 Thread Masahiro Yamada
This will be useful to specify the required compiler version, like this: config FOO bool "Use Foo" depends on GCC_VERSION >= 408000 help This feature requires GCC 4.8 or newer. Signed-off-by: Masahiro Yamada --- Changes in v2: None ini

[PATCH v2 15/21] gcov: remove CONFIG_GCOV_FORMAT_AUTODETECT

2018-03-26 Thread Masahiro Yamada
choice because GCOV_FORMAT_3_4 becomes visible as a new symbol. Signed-off-by: Masahiro Yamada --- Changes in v2: - Move the 'depends on' to the choice value. kernel/gcov/Kconfig | 17 + kernel/gcov/Makefile | 2 -- 2 files changed, 5 insertions(+), 14 deletions(-) di

[PATCH v2 08/21] kconfig: replace $UNAME_RELEASE with function call

2018-03-26 Thread Masahiro Yamada
Now that 'shell' function is supported, this can be self-contained in Kconfig. Signed-off-by: Masahiro Yamada --- Changes in v2: None Makefile | 3 +-- init/Kconfig | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 4ae1486..5c39

[PATCH v2 06/21] kconfig: remove string expansion for mainmenu after yyparse()

2018-03-26 Thread Masahiro Yamada
Now that environments are expanded in the lexer, conf_parse() does not need to explicitly expand $ARCH and $KERNELVERSION in the mainmenu. The hack introduced by commit 0724a7c32a54 ("kconfig: Don't leak main menus during parsing") can go away. Signed-off-by: Masahiro Yamada ---

Re: [PATCH] objtool: fix build with future Make

2018-03-26 Thread Masahiro Yamada
tree that will need fixing, so > cc-ing Kbuild, but with this at least a x86-64 defconfig builds. > > Signed-off-by: Rasmus Villemoes > --- Reviewed-by: Masahiro Yamada -- Best Regards Masahiro Yamada

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

2018-03-26 Thread Masahiro Yamada
+CC linux-cry...@vger.kernel.org No functional change, though. 2018-03-23 22:04 GMT+09:00 Masahiro Yamada : > These are common patterns where source files are parsed by the > asn1_compiler. > > Signed-off-by: Masahiro Yamada > --- > > .gitignore

Re: [PATCH 07/10] kbuild: clean up *-asn1.[ch] patterns from top-level Makefile

2018-03-26 Thread Masahiro Yamada
+CC linux-cry...@vger.kernel.org No functional change, though. 2018-03-23 22:04 GMT+09:00 Masahiro Yamada : > Clean up these patterns from the top Makefile to omit 'clean-files' > in each Makefile. > > Signed-off-by: Masahiro Yamada > --- > > Makefile

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

2018-03-26 Thread Masahiro Yamada
+CC linux-cry...@vger.kernel.org No functional change, though. (I fixed up the subject.) 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 gener

[PATCH] mmc: sdhci-cadence: send tune request twice to work around errata

2018-03-27 Thread Masahiro Yamada
hardware tuning and instead perform an almost identical procedure to eMMC, using the HRS34 Tune Force register. Signed-off-by: Masahiro Yamada --- drivers/mmc/host/sdhci-cadence.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host

Re: [PATCH 3/9] kbuild: Do not pass arguments to link-vmlinux.sh

2018-04-05 Thread Masahiro Yamada
2018-04-06 3:59 GMT+09:00 Jiri Olsa : > On Fri, Apr 06, 2018 at 12:50:00AM +0900, Masahiro Yamada wrote: >> 2018-04-06 0:16 GMT+09:00 Jiri Olsa : >> > There's no need to pass LD* arguments to link-vmlinux.sh, >> > because they are passed as variables. The only a

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

2018-04-05 Thread Masahiro Yamada
2018-04-06 6:43 GMT+09:00 Rasmus Villemoes : > On 2018-03-26 13:48, Masahiro Yamada wrote: >> 2018-03-26 8:09 GMT+09:00 Rasmus Villemoes : >>> The latest official Make release is 4.2.1 from mid-2016, but the current >>> git release has this relevant note in the NEW

Re: [PATCH] drivers/memory: can't open emif-asm-offsets.s for writing

2018-04-06 Thread Masahiro Yamada
ts.s > FORCE > -- > 2.16.3 Why filechk just for creating a directory? $(Q)mkdir $(dir $@) is enough, but still this is a bad fix. Generating the same object from different directories is fragile in parallel building. -- Best Regards Masahiro Yamada

Re: [PATCH v2 19/21] gcc-plugins: test GCC plugin support in Kconfig

2018-04-11 Thread Masahiro Yamada
2018-03-28 20:44 GMT+09:00 Kees Cook : > On Mon, Mar 26, 2018 at 10:29 PM, Masahiro Yamada > wrote: >> Run scripts/gcc-plugin.sh from Kconfig. Users can enable GCC_PLUGINS >> only when it is supported. >> >> Signed-off-by: Masahiro Yamada >> --- >>

[PATCH] reset: uniphier: fix USB clock line for LD20

2018-04-11 Thread Masahiro Yamada
For LD20, the bit 5 of the offset 0x200c turned out to be a USB3 reset. The hardware document says it is the GIO reset despite LD20 has no GIO bus, confusingly. Also, fix confusing comments for PXs3. Signed-off-by: Masahiro Yamada --- drivers/reset/reset-uniphier.c | 6 +++--- 1 file changed

[PATCH] arm64: dts: uniphier: fix input delay value for legacy mode of eMMC

2018-04-11 Thread Masahiro Yamada
The property of the legacy mode for the eMMC PHY turned out to be worng. Some eMMC devices are unstable due to the set-up/hold timing violation. Correct the delay value. Signed-off-by: Masahiro Yamada --- arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 2 +- arch/arm64/boot/dts/socionext

Re: [PATCH] arm64: dts: uniphier: fix input delay value for legacy mode of eMMC

2018-04-11 Thread Masahiro Yamada
2018-04-12 11:31 GMT+09:00 Masahiro Yamada : > The property of the legacy mode for the eMMC PHY turned out to > be worng. Some eMMC devices are unstable due to the set-up/hold > timing violation. Correct the delay value. Reminder for myself: Fix a type worng -> wrong --

Re: [PATCH] ARM: omap2: Fix build when using split object directories

2018-04-12 Thread Masahiro Yamada
>> .../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open >> drivers/memory/emif-asm-offsets.s for writing: No such file or directory >> compilation terminated. >> >> Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for &g

Re: [PATCH v2] ARM: omap2: Fix build when using split object directories

2018-04-12 Thread Masahiro Yamada
drivers/memory/emif-asm-offsets.s for writing: No such file or directory > compilation terminated. > > Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for > PM") > Acked-by: Tony Lindgren > Reviewed-by: Masahiro Yamada > Tested-by: Anders

[PATCH 11/30] kconfig: begin PARAM state only when seeing a command keyword

2018-04-12 Thread Masahiro Yamada
parser anyway. The next commit will support the assignment statement where a line starts with an arbitrary identifier. So, I want the lexer to switch to the PARAM state only when it sees a command keyword. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: None scripts

[PATCH 15/30] kconfig: expand lefthand side of assignment statement

2018-04-12 Thread Masahiro Yamada
Make allows variable references in the lefthand side of assignment. X = A Y = B $(X)$(Y) = 1 This does 'AB = 1' Do likewise in Kconfig as well. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: None scripts/kconfig/zconf.l | 7 +++ 1 file changed, 7

[PATCH 10/30] kconfig: replace $(UNAME_RELEASE) with function call

2018-04-12 Thread Masahiro Yamada
Now that 'shell' function is supported, this can be self-contained in Kconfig. Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook Reviewed-by: Ulf Magnusson --- Changes in v3: None Changes in v2: None Makefile | 3 +-- init/Kconfig | 4 ++-- 2 files changed, 3 insert

[PATCH 04/30] kconfig: reference environment variables directly and remove 'option env='

2018-04-12 Thread Masahiro Yamada
string default "My tools: CC=$(CC), AS=$(AS), CPP=$(CPP)" [Result] $ make -s alldefconfig && tail -n 1 .config CONFIG_MY_TOOLCHAIN_LIST="My tools: CC=gcc, AS=as, CPP=gcc -E" Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook --- Changes in v3

[PATCH 29/30] arm64: move GCC version check for ARCH_SUPPORTS_INT128 to Kconfig

2018-04-12 Thread Masahiro Yamada
This becomes much neater in Kconfig. Signed-off-by: Masahiro Yamada Acked-by: Will Deacon Reviewed-by: Kees Cook --- Changes in v3: None Changes in v2: None arch/arm64/Kconfig | 1 + arch/arm64/Makefile | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64

[PATCH 30/30] kbuild: test dead code/data elimination support in Kconfig

2018-04-12 Thread Masahiro Yamada
This config option should be enabled only when both the compiler and the linker support necessary flags. Add proper dependencies to Kconfig. Unlike 'select', 'imply' is modest enough to observe those dependencies. I suggested this in the help message. Signed-off

[PATCH 24/30] gcov: remove CONFIG_GCOV_FORMAT_AUTODETECT

2018-04-12 Thread Masahiro Yamada
choice because GCOV_FORMAT_3_4 becomes visible as a new symbol. Signed-off-by: Masahiro Yamada Acked-by: Peter Oberparleiter Reviewed-by: Kees Cook --- Changes in v3: None Changes in v2: None kernel/gcov/Kconfig | 17 + kernel/gcov/Makefile | 2 -- 2 files changed, 5 insertions

[PATCH 28/30] gcc-plugins: allow to enable GCC_PLUGINS for COMPILE_TEST

2018-04-12 Thread Masahiro Yamada
PLUGIN_STRUCTLEAK_VERBOSE GCC_PLUGIN_RANDSTRUCT_PERFORMANCE Kees said to do so because the first two are too noisy, and the last one would reduce the compile test coverage. I commented the reasons in arch/Kconfig. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: None arch/Kconfig | 7 +

[PATCH 25/30] kcov: test compiler capability in Kconfig and correct dependency

2018-04-12 Thread Masahiro Yamada
LUGIN_SANCOV is selected only when necessary, so scripts/Makefile.gcc-plugins can be cleaner. I also cleaned up Kconfig and scripts/Makefile.kcov as well. Signed-off-by: Masahiro Yamada --- Changes in v3: - Replace the previous 'select -> imply' patch with a new approach Change

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

2018-04-12 Thread Masahiro Yamada
For PowerPC, GCC 5.2 is the requirement for GCC plugins. Move the version check to Kconfig so that the GCC plugin menus will be hidden if an older compiler is in use. Signed-off-by: Masahiro Yamada Acked-by: Andrew Donnellan --- Changes in v3: - Move comment to Kconfig as well Changes in

[PATCH 06/30] kconfig: remove string expansion for mainmenu after yyparse()

2018-04-12 Thread Masahiro Yamada
Now that environments are expanded in the lexer, conf_parse() does not need to expand them explicitly. The hack introduced by commit 0724a7c32a54 ("kconfig: Don't leak main menus during parsing") can go away. Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook Reviewed-by

[PATCH 07/30] kconfig: remove sym_expand_string_value()

2018-04-12 Thread Masahiro Yamada
There is no more caller of sym_expand_string_value(). Signed-off-by: Masahiro Yamada --- Changes in v3: - newly added Changes in v2: None scripts/kconfig/lkc_proto.h | 1 - scripts/kconfig/symbol.c| 53 - 2 files changed, 54 deletions

[PATCH 12/30] kconfig: support variable and user-defined function

2018-04-12 Thread Masahiro Yamada
def_bool $(cc-option -fstack-protector) [Result] $ make -s alldefconfig && tail -n 1 .config CONFIG_CC_HAS_STACKPROTECTOR=y Signed-off-by: Masahiro Yamada --- Changes in v3: - Re-implement the parse logic - Use = operator to define a user-defined function Changes in v2

[PATCH 02/30] kbuild: remove kbuild cache

2018-04-12 Thread Masahiro Yamada
207130ed ("kbuild: Cache a few more calls to the compiler") Commit 3298b690b21c ("kbuild: Add a cache for generated variables") Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook --- Changes in v3: None Changes in v2: None Makefile

[PATCH 05/30] kconfig: remove string expansion in file_lookup()

2018-04-12 Thread Masahiro Yamada
xpansion for look-up: if (!strcmp(name, file->name)) { Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook Reviewed-by: Ulf Magnusson --- Changes in v3: None Changes in v2: - Simplify the patch. Just remove text expansion. scripts/kconfig/util.c | 4 +--- 1 file changed, 1 in

[PATCH 01/30] gcc-plugins: fix build condition of SANCOV plugin

2018-04-12 Thread Masahiro Yamada
sary as an alternative means. Fixes: d677a4d60193 ("Makefile: support flag -fsanitizer-coverage=trace-cmp") Signed-off-by: Masahiro Yamada --- Changes in v3: - newly added Changes in v2: None scripts/Makefile.gcc-plugins | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

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

2018-04-12 Thread Masahiro Yamada
as many features as possible. X86 has additional shell scripts in case the compiler supports those options, but generates broken code. I added CC_HAS_SANE_STACKPROTECTOR to test this. I had to add -m32 to gcc-x86_32-has-stack-protector.sh to make it work correctly. Signed-off-by: Masahiro Yamada

[PATCH 14/30] kconfig: support append assignment operator

2018-04-12 Thread Masahiro Yamada
. Otherwise, the expansion is deferred. Appending something to an undefined variable results in a recursive variable. To implement this, we need to remember the flavor of variables. Signed-off-by: Masahiro Yamada --- Changes in v3: - newly added Changes in v2: None scripts/kconfig/lkc_proto.h

[PATCH 08/30] kconfig: add built-in function support

2018-04-12 Thread Masahiro Yamada
This commit adds a new concept 'function' to do more text processing in Kconfig. A function call looks like this: $(function arg1, arg2, arg3, ...) This commit adds the basic infrastructure to expand functions. Change the text expansion helpers to take arguments. Signed-off-by

[PATCH 27/30] gcc-plugins: test plugin support in Kconfig and clean up Makefile

2018-04-12 Thread Masahiro Yamada
. This allows us to remove all ugly testing in Makefile.gcc-plugins. Signed-off-by: Masahiro Yamada --- Changes in v3: - Respin to keep scripts/gcc-plugin.sh as-is. Changes in v2: None arch/Kconfig | 10 ++ scripts/Kconfig.include | 3 ++ scripts/Makefile.gcc-plugins

[PATCH 16/30] kconfig: add 'info' and 'warning' built-in functions

2018-04-12 Thread Masahiro Yamada
Add 'info' and 'warning' functions as in Make. They print messages during parsing Kconfig files, which is useful when debugging Kconfig at least. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: None scripts/kconfig/preprocess.c | 28

[PATCH 03/30] kbuild: remove CONFIG_CROSS_COMPILE support

2018-04-12 Thread Masahiro Yamada
ty is [1] or [2]. Currently, there are only 5 defconfig files that specify CONFIG_CROSS_COMPILE. arch/arm/configs/lpc18xx_defconfig arch/hexagon/configs/comet_defconfig arch/nds32/configs/defconfig arch/openrisc/configs/or1ksim_defconfig arch/openrisc/configs/simple_smp_defconfig Signed-o

[PATCH 23/30] kconfig: add CC_IS_CLANG and CLANG_VERSION

2018-04-12 Thread Masahiro Yamada
This will be useful to describe the clang version dependency. Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook --- Changes in v3: None Changes in v2: None init/Kconfig | 7 +++ scripts/clang-version.sh | 18 -- 2 files changed, 11 insertions(+), 14

[PATCH 22/30] kconfig: add CC_IS_GCC and GCC_VERSION

2018-04-12 Thread Masahiro Yamada
This will be useful to specify the required compiler version, like this: config FOO bool "Use Foo" depends on GCC_VERSION >= 408000 help This feature requires GCC 4.8 or newer. Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook --- Change

[PATCH 20/30] kconfig: add basic helper macros to scripts/Kconfig.include

2018-04-12 Thread Masahiro Yamada
Kconfig got text processing tools like we see in Make. Add Kconfig helper macros to scripts/Kconfig.include like we collect Makefile macros in scripts/Kbuild.include. Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook Reviewed-by: Ulf Magnusson --- Changes in v3: - Move helpers to

[PATCH 19/30] kconfig: show compiler version text in the top comment

2018-04-12 Thread Masahiro Yamada
CC_VERSION_TEXT)" "aarch64-linux-gnu-gcc (Linaro GCC 7.2-2017.11) 7.2.1 20171011" include/config/auto.conf: FORCE endif Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook --- Changes in v3: None Changes in v2: None Kconfig | 2 ++ Makefile | 2 ++ 2 files changed, 4 inserti

[PATCH 13/30] kconfig: support simply expanded variable

2018-04-12 Thread Masahiro Yamada
, expanding the righthand side immediately. This works like traditional programming language variables. Signed-off-by: Masahiro Yamada --- Changes in v3: - newly added Changes in v2: None scripts/kconfig/lkc_proto.h | 7 ++- scripts/kconfig/preprocess.c | 6 -- scripts/kconfig/zconf.l

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

2018-04-12 Thread Masahiro Yamada
lkml.org/lkml/2018/2/16/610 V1: https://lkml.org/lkml/2018/2/16/610 RFC: https://lkml.org/lkml/2018/2/8/429 Masahiro Yamada (30): gcc-plugins: fix build condition of SANCOV plugin kbuild: remove kbuild cache kbuild: remove CONFIG_CROSS_COMPILE support kconfig: reference environment va

[PATCH 17/30] Documentation: kconfig: document a new Kconfig macro language

2018-04-12 Thread Masahiro Yamada
'language', but anyway here it is. All ideas are from Make (you can even say it is addicted), so people will easily understand how it works. [1]: https://lkml.org/lkml/2016/12/9/577 [2]: https://lkml.org/lkml/2018/2/7/527 Signed-off-by: Masahiro Yamada --- Changes in v3: None

[PATCH 18/30] kconfig: test: test text expansion

2018-04-12 Thread Masahiro Yamada
; ''' "'" Kconfig:16: $ Kconfig:20: $X Kconfig:26: nasty Kconfig:32: super_nasty Kconfig:41: $ Kconfig:46: $X Kconfig:49: nasty make: *** No targets. Stop. The last three lines are different. I adopted the behavior of the newer Make versions. Of course, yo

[PATCH 09/30] kconfig: add 'shell' built-in function

2018-04-12 Thread Masahiro Yamada
more complexity. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: None scripts/kconfig/preprocess.c | 66 1 file changed, 66 insertions(+) diff --git a/scripts/kconfig/preprocess.c b/scripts/kconfig/preprocess.c index e77cf7c..

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

2018-04-12 Thread Masahiro Yamada
2018-04-13 14:06 GMT+09:00 Masahiro Yamada : I forgot to prefix the patch subjects with the version. This series is V3. > [Introduction] > > The motivation of this work is to move the compiler option tests to > Kconfig from Makefile. A number of kernel features require th

Re: [PATCH v2 07/21] kconfig: add function support and implement 'shell' function

2018-04-12 Thread Masahiro Yamada
2018-03-28 12:41 GMT+09:00 Kees Cook : > On Mon, Mar 26, 2018 at 10:29 PM, Masahiro Yamada > wrote: >> This commit adds a new concept 'function' to do more text processing >> in Kconfig. >> >> A function call looks like this: >> >> $(function

Re: [PATCH v2 07/21] kconfig: add function support and implement 'shell' function

2018-04-12 Thread Masahiro Yamada
2018-04-01 13:19 GMT+09:00 Ulf Magnusson : > On Tue, Mar 27, 2018 at 7:29 AM, Masahiro Yamada > wrote: >> This commit adds a new concept 'function' to do more text processing >> in Kconfig. >> >> A function call looks like this: >> >> $(f

Re: [PATCH v2 09/21] kconfig: add 'macro' keyword to support user-defined function

2018-04-12 Thread Masahiro Yamada
2018-04-01 15:05 GMT+09:00 Ulf Magnusson : > On Tue, Mar 27, 2018 at 7:29 AM, Masahiro Yamada > wrote: >> Now, we got a basic ability to test compiler capability in Kconfig. >> >> config CC_HAS_STACKPROTECTOR >> def_bool $(shell (($CC -Werror -fstack-prot

Re: [PATCH v2 04/21] kconfig: reference environments directly and remove 'option env=' syntax

2018-04-12 Thread Masahiro Yamada
2018-04-01 11:27 GMT+09:00 Ulf Magnusson : > Here's a more in-depth review: > > On Tue, Mar 27, 2018 at 7:29 AM, Masahiro Yamada > wrote: >> To get an environment value, Kconfig needs to define a symbol using >> "option env=" syntax. It is tedious to add

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

2018-04-13 Thread Masahiro Yamada
2018-04-13 14:52 GMT+09:00 Kees Cook : > On Thu, Apr 12, 2018 at 10:06 PM, Masahiro Yamada > wrote: >> [Major Changes in V3] > > Awesome work! I don't see this pushed to your git tree? I'd like to > test it, but I'd rather "git fetch" instead of &q

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

2018-04-13 Thread Masahiro Yamada
2018-04-13 21:21 GMT+09:00 Masahiro Yamada : > 2018-04-13 14:52 GMT+09:00 Kees Cook : >> On Thu, Apr 12, 2018 at 10:06 PM, Masahiro Yamada >> wrote: >>> [Major Changes in V3] >> >> Awesome work! I don't see this pushed to your git tree? I'd like to

Re: [PATCH] kbuild: rpm-pkg: use kernel-install as a fallback for new-kernel-pkg

2018-04-13 Thread Masahiro Yamada
a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Best Regards Masahiro Yamada

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

2018-03-19 Thread Masahiro Yamada
2018-03-19 7:17 GMT+09:00 Eugeniu Rosca : > Hi Masahiro, > > On Tue, Mar 13, 2018 at 06:56:07PM +0900, Masahiro Yamada wrote: >> Commit 246cf9c26bf1 ("kbuild: Warn on selecting symbols with unmet >> direct dependencies") forcibly promoted ->dir_dep.tri to yes

Re: [PATCH v2 1/2] arm64: dts: uniphier: add syscon property for UniPhier sound system

2018-03-20 Thread Masahiro Yamada
2018-03-20 11:48 GMT+09:00 Katsuhiro Suzuki : > This patch adds syscon property for specifying soc-glue core into > device-tree of LD11/LD20 SoC. > > Currently, soc-glue core is used for changing the state of S/PDIF > signal output pin to signal output state or Hi-Z state. > > Signed-off-by: Katsuh

Re: [PATCH] kbuild: set no-integrated-as before incl. arch Makefile

2018-03-20 Thread Masahiro Yamada
after > incl. arch Makefile") > Signed-off-by: Stefan Agner > --- Applied to linux-kbuild. Thanks! -- Best Regards Masahiro Yamada

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

2018-03-20 Thread Masahiro Yamada
2018-03-19 18:01 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 v4 0/7] kbuild: various fix, clean-up, improvements of CONFIG_TRIM_UNUSED_KSYMS

2018-03-20 Thread Masahiro Yamada
2018-03-16 16:37 GMT+09:00 Masahiro Yamada : > > Masahiro Yamada (7): > kbuild: clear LDFLAGS in the top Makefile > kbuild: remove wrong 'touch' in adjust_autoksyms.sh > kbuild: move 'scripts' target below > kbuild: restore touching autoksyms.

Re: [PATCH 0/3] Improve and extend checkpatch.pl Kconfig help text checks

2018-03-22 Thread Masahiro Yamada
2018-03-06 14:13 GMT+09:00 Masahiro Yamada : > (+To: Andrew) > > 2018-03-06 13:52 GMT+09:00 Ulf Magnusson : >> On Sat, Feb 24, 2018 at 2:53 PM, Masahiro Yamada >> wrote: >>> 2018-02-23 10:30 GMT+09:00 Ulf Magnusson : >>>> On Fri, Feb 16, 2018 at 10:14 PM,

Re: [PATCH 2/3] checkpatch: kconfig: check help texts for menuconfig and choice

2018-03-22 Thread Masahiro Yamada
for the last symbol in a file. Perhaps, EOF could be also an ending of symbol definition. This patch is a good improvement enough, so I queued it up. If you have an idea for further improvement, v2 is welcome, of course. -- Best Regards Masahiro Yamada

Re: [PATCH 3/3] checkpatch: kconfig: prefer 'help' over '---help---'

2018-03-22 Thread Masahiro Yamada
} > $length = -1; > } > I applied this, but perhaps the line number for the offending part could be improved. The warning looks like this. WARNING: prefer 'help' over '---help---' for new help texts #1109: FILE: init/Kconfig:1109: +config SGETMASK_SYSCALL The #1109 points to the line of the symbol start. IMHO, it is even better to point to the '---help---' line. -- Best Regards Masahiro Yamada

[PATCH 1/3] kconfig: remove duplicated file name and lineno of recursive inclusion

2018-03-22 Thread Masahiro Yamada
: Kconfig.inc3:1 included from: Kconfig.inc2:3 included from: Kconfig.inc1:4 Signed-off-by: Masahiro Yamada --- scripts/kconfig/tests/err_recursive_inc/expected_stderr | 11 ++- scripts/kconfig/zconf.l | 9 - 2 files changed, 10 insertions(+), 1

[PATCH 2/3] kconfig: detect recursive inclusion earlier

2018-03-22 Thread Masahiro Yamada
be included so that the recursive inclusion is detected before unneeded parsing happens. Signed-off-by: Masahiro Yamada --- scripts/kconfig/zconf.l | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 6f139d2

[PATCH 3/3] kconfig: use yylineno option instead of manual lineno increments

2018-03-22 Thread Masahiro Yamada
e perf-report option. Otherwise, I see the following message: %option yylineno entails a performance penalty ONLY on rules that can match newline characters Signed-off-by: Masahiro Yamada --- scripts/kconfig/lkc.h | 1 + scripts/kconfig/zconf.l | 20 +--- 2 files changed,

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

2018-03-22 Thread Masahiro Yamada
make chain them > automatically. > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- > ge...@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like > that. > -- Linus Torvalds This has been in my TODO list for a while, but I have not had time to finish it. Some people use .PRECIOUS to suppress file removal, but it is wrong IMO. .SECONDARY is the right one, but one problem is, this does not work with pattern rules. I will send a patch soon for the core improvement. -- Best Regards Masahiro Yamada

Re: [PATCH] clk: uniphier: add ethernet clock control support for PXs3

2018-03-23 Thread Masahiro Yamada
TE("usb30", 12, NULL, 0x210c, 4),/* =GIO0 */ > UNIPHIER_CLK_GATE("usb31-0", 13, NULL, 0x210c, 5), /* =GIO1 */ > UNIPHIER_CLK_GATE("usb31-1", 14, NULL, 0x210c, 6), /* =GIO1-1 */ > -- Acked-by: Masahiro Yamada -- Best Regards Masahiro Yamada

Re: [PATCH] reset: uniphier: add ethernet reset control support for PXs3

2018-03-23 Thread Masahiro Yamada
UNIPHIER_RESETX(8, 0x200c, 12), /* STDMAC */ > UNIPHIER_RESETX(12, 0x200c, 4), /* USB30 link (GIO0) */ > UNIPHIER_RESETX(13, 0x200c, 5), /* USB31 link (GIO1) */ > -- > 2.7.4 > Acked-by: Masahiro Yamada -- Best Regards Masahiro Yamada

[PATCH 03/10] genksyms: generate lexer and parser during build instead of shipping

2018-03-23 Thread Masahiro Yamada
, which would emit warnings: scripts/genksyms/parse.y: warning: 9 shift/reduce conflicts [-Wconflicts-sr] scripts/genksyms/parse.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr] They are normally suppressed, but displayed when W=1 is given. Signed-off-by: Masahiro Yamada --- scripts

[PATCH 04/10] kbuild: add %.lex.c and %.tab.[ch] to 'targets' automatically

2018-03-23 Thread Masahiro Yamada
are of them in the core Makefile instead of requiring each Makefile to do so. At this moment, you cannot delete 'target += zconf.lex.c' because zconf.lex.c is included from zconf.tab.c instead of being compiled. This will be possible with further refactoring in the future. Sig

[PATCH 07/10] kbuild: clean up *-asn1.[ch] patterns from top-level Makefile

2018-03-23 Thread Masahiro Yamada
Clean up these patterns from the top Makefile to omit 'clean-files' in each Makefile. Signed-off-by: Masahiro Yamada --- Makefile| 1 + crypto/Makefile | 2 -- crypto/asymmetric_keys/Makefile | 7 --- net/ipv4/netfilter/Makefile | 1

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