Re: [PATCH 4/8] kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS

2018-11-19 Thread Masahiro Yamada
the .*.cmd file, then that .*.cmd file is > already corrupted as it is missing necessary dependencies. Would be > better to delete the .*.cmd file entirely in that case. More strictly speaking, missing necessary dependencies is not a big deal. Now, scripts/Kbuild.include specifies .DELETE_ON

Re: [PATCH v3 3/3] build_bug.h: remove most of dummy BUILD_BUG_ON stubs for sparse

2018-11-19 Thread Masahiro Yamada
On Tue, Nov 20, 2018 at 3:02 AM Nick Desaulniers wrote: > > On Mon, Nov 19, 2018 at 4:37 AM Luc Van Oostenryck > wrote: > > > > On Mon, Nov 19, 2018 at 07:31:43PM +0900, Masahiro Yamada wrote: > > > The introduction of these dummy BUILD_BUG_ON stubs dates bac

Re: [PATCH v3 1/3] compiler_types.h: make __builtin_types_compatible_p() noop for Sparse

2018-11-19 Thread Masahiro Yamada
On Mon, Nov 19, 2018 at 9:35 PM Luc Van Oostenryck wrote: > > On Mon, Nov 19, 2018 at 07:31:41PM +0900, Masahiro Yamada wrote: > > When I tried to delete BUILD_BUG_ON stubs for sparse, the kbuild test > > robot reported lots of Sparse warnings from container_of(), which >

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

2018-11-20 Thread Masahiro Yamada
re0' stage. I know this is a cheesy workaround, but better than the current situation. Signed-off-by: Masahiro Yamada --- Makefile | 3 ++- scripts/Makefile | 3 +-- scripts/mod/Makefile | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile b/Make

Re: [PATCH v2 1/2] Makefile: Fix distcc compilation with x86 macros

2018-11-20 Thread Masahiro Yamada
On Tue, Nov 20, 2018 at 2:21 AM Nadav Amit wrote: > > at 8:20 PM, Masahiro Yamada wrote: > > > On Sat, Nov 17, 2018 at 6:02 AM Nadav Amit wrote: > >> From: Masahiro Yamada > >> Sent: November 16, 2018 at 7:45:45 AM GMT > >>> To: Nadav Amit > &g

Re: [PATCH v2 2/2] modpost: skip ELF local symbols by default during section mismatch check

2018-11-20 Thread Masahiro Yamada
orvalds/linux.git/tree/scripts/mod/modpost.c?h=v4.19-rc4&id=7876320f88802b22d4e2daf7eb027dd14175a0f8#n1256 > > This second version of the patch drops the option to keep section > mismatch warnings for local sections, based on feedback from Sam > Ravnborg ; and clarifies that these

Re: [PATCH v2 1/2] modpost: drop unused command line switches

2018-11-20 Thread Masahiro Yamada
out of modpost") > > Could you add a patch that delete these on top of what you already have. > > https://lore.kernel.org/lkml/20181020140835.ga3...@ravnborg.org/ > > Cc: Sam Ravnborg > Cc: Masahiro Yamada > Cc: Michal Marek > Cc: linux-kbu...@vger.kernel

Re: [PATCH] modpost: validate symbol names also in find_elf_symbol

2018-11-20 Thread Masahiro Yamada
; - * the kernel (which is especially evil on embedded platforms). > - */ > -static inline int is_valid_name(struct elf_info *elf, Elf_Sym *sym) > -{ > - const char *name = elf->strtab + sym->st_name; > - > - if (!name || !strlen(name)) > - return 0; > - return !is_arm_mapping_symbol(name); > -} > - > /* > * Find symbols before or equal addr and after addr - in the section sec. > * If we find two symbols with equal offset prefer one with a valid name. > -- > 2.19.1.568.g152ad8e336-goog > -- Best Regards Masahiro Yamada

Re: Backed up kernels

2018-11-20 Thread Masahiro Yamada
k your suggestion makes sense, but "make install" is basically implemented by arch-specific shell script. (For example, arch/x86/boot/install.sh) Will you talk to the maintainers of architecture you are interested in? (or send it to linux-a...@vger.kernel.org) > Thanks, > -- > Jean Delvare > SUSE L3 Support -- Best Regards Masahiro Yamada

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

2018-11-21 Thread Masahiro Yamada
On Tue, Nov 20, 2018 at 10:11 AM Masahiro Yamada wrote: > > As a Kbuild maintainer, I always struggle to keep the core makefiles > clean because people tend to squeeze more and more clutter code into > the kbuild core in order to do what they want to do. > > The biggest st

[PATCH 2/2] kbuild: remove 'scripts' dummy target for external module build

2018-11-21 Thread Masahiro Yamada
Make simply skips a missing rule as long as it is marked as PHONY. Remove the dummy target. Signed-off-by: Masahiro Yamada --- Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Makefile b/Makefile index 36f3f0e..269a9bf 100644 --- a/Makefile +++ b/Makefile @@ -1604,11 +1604,9

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

2018-11-21 Thread Masahiro Yamada
/foo.mod: Directory nonexistent This is because $(cmd_crmodverdir) is executed only for /, %/, %.ko single targets for external modules. Create .tmp_versions in the 'prepare' target. Signed-off-by: Masahiro Yamada --- Makefile | 11 +++ 1 file changed, 3 insertions(+), 8 deletion

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

2018-11-21 Thread Masahiro Yamada
3e9c ("fix expansion of function designator"), but it will take time until the fixed version of Sparse is widely available. Disable the container_of() type checks for Sparse for now. [1] https://lore.kernel.org/lkml/1542623503-3755-1-git-send-email-yamada.masah...@socionext.com/ Signed-off

[PATCH v4 3/3] build_bug.h: remove most of dummy BUILD_BUG_ON stubs for Sparse

2018-11-21 Thread Masahiro Yamada
lowing code, which GCC is fine with: static const int x = 0; int y = BUILD_BUG_ON_ZERO(x); Signed-off-by: Masahiro Yamada Acked-by: Kees Cook Reviewed-by: Luc Van Oostenryck Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers --- Changes in v4: None Changes in v3: - Add Kees

[PATCH v4 2/3] build_bug.h: remove negative-array fallback for BUILD_BUG_ON()

2018-11-21 Thread Masahiro Yamada
e VLA warning") enabled -Wvla warning. The use of variable length arrays is banned. Signed-off-by: Masahiro Yamada Acked-by: Kees Cook Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers --- Changes in v4: None Changes in v3: None Changes in v2: None include/linux/build_

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

2018-11-21 Thread Masahiro Yamada
Use specific prototype instead of an opaque pointer so that the compiler can catch incompatible pointer type. 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

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

2018-11-21 Thread Masahiro Yamada
ledge about the link stage of host programs, I really want to see simple, stupid table lookup so that this works in the same way regardless of the underlying executable binary format. Signed-off-by: Masahiro Yamada --- scripts/mod/file2alias.c | 144 ---

Re: [PATCH] modpost: skip ELF local symbols during section mismatch check

2018-11-22 Thread Masahiro Yamada
symbols") and of similar code already > present in modpost.c: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/mod/modpost.c?h=v4.19-rc4&id=7876320f88802b22d4e2daf7eb027dd14175a0f8#n1256 > > This third version of the patch implements a su

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

2018-11-27 Thread Masahiro Yamada
On Wed, Nov 28, 2018 at 12:01 AM Vinod Koul wrote: > > On 25-11-18, 22:53, Masahiro Yamada wrote: > > 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 > > > &g

[PATCH] ARM: dts: uniphier: add MIO DMAC nodes

2018-11-27 Thread Masahiro Yamada
Add MIO-DMAC (Media IO DMA Controller) nodes, and use them as the DMA engine of SD/eMMC controllers. Signed-off-by: Masahiro Yamada --- arch/arm/boot/dts/uniphier-ld4.dtsi | 14 ++ arch/arm/boot/dts/uniphier-pro4.dtsi | 16 arch/arm/boot/dts/uniphier-sld8.dtsi

[PATCH] ARM: multi_v7_defconfig: enable CONFIG_UNIPHIER_MDMAC

2018-11-27 Thread Masahiro Yamada
Enable the UniPhier MIO DMAC driver. This is used as the DMA engine for accelerating the SD/eMMC controller drivers. Signed-off-by: Masahiro Yamada --- The insertion context was decided by savedefconfig on next-20181127. arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion

[PATCH v2 2/2] mtd: rawnand: denali: remove denali_reset_banks()

2018-11-27 Thread Masahiro Yamada
ly remove the redundant denali_nand_banks() by simply passing the maximum number of chip selects supported by this IP (typically 4 or 8) to nand_scan(). Let's leave all the chip detection process to nand_scan_ident(). Signed-off-by: Masahiro Yamada --- Changes in v2: None driver

[PATCH v2 1/2] mtd: rawnand: denali: remove ->dev_ready() hook

2018-11-27 Thread Masahiro Yamada
e the mis-implemented dev_ready hook, and fallback to sending the NAND_CMD_STATUS and nand_wait_status_ready(), which bails out more quickly. Signed-off-by: Masahiro Yamada --- Changes in v2: - Rebase drivers/mtd/nand/raw/denali.c | 23 +-- 1 file changed, 1 insertion(+), 22 delet

[PATCH v2 0/2] mtd: rawnand: denali: clean-up unnecessary hook and device reset

2018-11-27 Thread Masahiro Yamada
I sent this series on September, and Miquel replied this series was applied: http://patchwork.ozlabs.org/patch/967242/ But, It turned out not applied. I rebased it and resending now. Masahiro Yamada (2): mtd: rawnand: denali: remove ->dev_ready() hook mtd: rawnand: denali: rem

[PATCH] kbuild: fix UML build error with CONFIG_GCC_PLUGINS

2018-11-28 Thread Masahiro Yamada
t;GCC plugin infrastructure") Signed-off-by: Masahiro Yamada --- I will pick up this to kbuild tree to avoid conflicts. Ack from UML people is appreciated, though. Makefile | 4 ++-- arch/um/Makefile | 24 ++-- arch/x86/um/Makefile | 4 +++- 3 files

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

2018-11-28 Thread Masahiro Yamada
Now that 'archprepare' depends on 'scripts', Kbuild can descend into scripts/gcc-plugins in a more standard way. Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook --- Changes in v2: - It turned out UML + CONFIG_GCC_PLUGINS is broken for a long time. https://patchw

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

2018-11-28 Thread Masahiro Yamada
of 'archprepare', where UML starts compiling target *.c files. Signed-off-by: Masahiro Yamada --- Changes in v2: - It turned out UML + CONFIG_GCC_PLUGINS is broken for a long time. https://patchwork.kernel.org/patch/10703853/ Rebased on the top of the fix-up Makefile |

[PATCH 1/5] kconfig: remove unneeded setsym label in conf_read_simple()

2018-11-30 Thread Masahiro Yamada
The two 'goto setsym' statements are reachable only when sym == NULL. The code below the 'setsym:' label does nothing when sym == NULL since there is just one if-block guarded by 'if (sym && ...)'. Hence, 'goto setsym' can be replaced

[PATCH 3/5] kconfig: split out code touching a file to conf_touch_dep()

2018-11-30 Thread Masahiro Yamada
/*.h file. Signed-off-by: Masahiro Yamada --- scripts/kconfig/confdata.c | 92 -- 1 file changed, 49 insertions(+), 43 deletions(-) diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 4c76d56..7263b83 100644 --- a/scripts/kconfig

[PATCH 5/5] kconfig: remove k_invalid from expr_parse_string() return type

2018-11-30 Thread Masahiro Yamada
The only possibility of k_invalid being returned was when expr_parse_sting() parsed S_OTHER type symbol. This actually never happened, and this is even clearer since S_OTHER has gone. Clean up unreachable code. Signed-off-by: Masahiro Yamada --- scripts/kconfig/expr.c | 14 ++ 1

[PATCH 4/5] kconfig: remove S_OTHER symbol type and correct dependency tracking

2018-11-30 Thread Masahiro Yamada
e previous syncconfig, but is missing now, what we want to do is quite simple; just call conf_touch_dep() to touch include/config/foo.h instead of allocating a new symbol data. Signed-off-by: Masahiro Yamada --- scripts/kconfig/confdata.c | 33 ++--- scripts/kconfig/expr.

[PATCH 2/5] kconfig: rename conf_split_config() to conf_touch_deps()

2018-11-30 Thread Masahiro Yamada
timestamp files under include/config/ in order to interact with the fixdep tool. Signed-off-by: Masahiro Yamada --- scripts/kconfig/confdata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 1e35529..4c76d56 10

[PATCH 3/8] kbuild: refactor modversions build rules

2018-11-15 Thread Masahiro Yamada
-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 --- scripts/Makefile.

[PATCH 7/8] kbuild: refactor if_changed and if_changed_dep

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

[PATCH 2/8] kbuild: remove redundant 'set -e' from sub_cmd_record_mcount

2018-11-15 Thread Masahiro Yamada
This is run inside the if_changed_rule, which already sets 'set -e'. Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index a8e7ba9..7af21a8 100644 ---

[PATCH 6/8] kbuild: remove trailing semicolon from cmd_* passed to if_changed_rule

2018-11-15 Thread Masahiro Yamada
mmit, this restriction does not exist any more. Rip off unneeded semicolons. Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 5528a6a..78e647f 10

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

2018-11-15 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 --- scripts/Makefile.build | 2 -- scripts/package/Makefile | 1 - 2 files changed

[PATCH 5/8] kbuild: change if_changed_rule to accept multi-line recipe

2018-11-15 Thread Masahiro Yamada
rule_as_o_S were replaced with $(call cmd,*). The tailing back-slashes went away. Signed-off-by: Masahiro Yamada --- scripts/Kbuild.include | 6 ++ scripts/Makefile.build | 22 +++--- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/scripts/Kbuild.include

[PATCH 4/8] kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS

2018-11-15 Thread Masahiro Yamada
lding with CONFIG_TRIM_UNUSED_KSYMS will be much faster. Signed-off-by: Masahiro Yamada --- include/asm-generic/export.h | 13 - include/linux/export.h | 18 +- scripts/Kbuild.include | 29 - scripts/Makefile.build

[PATCH 1/8] kbuild: remove redundant 'set -e' from filechk_* defines

2018-11-15 Thread Masahiro Yamada
The filechk macro in scripts/Kbuild.include already sets 'set -e'. Signed-off-by: Masahiro Yamada --- 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 index ab1066c..71ff3d0 10

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

2018-11-15 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 (8): kbuild: remove redundant 'set -e' from filechk_* define

Re: [PATCH 5/8] kbuild: change if_changed_rule to accept multi-line recipe

2018-11-15 Thread Masahiro Yamada
On Thu, Nov 15, 2018 at 6:12 PM Rasmus Villemoes wrote: > > On 15/11/2018 09.27, Masahiro Yamada wrote: > > GNU Make supports 'define' ... 'endef' directive, which can describe > > a recipe that consists of multiple lines. > > > > endef >

[PATCH] slab: fix 'dubious: x & !y' warning from Sparse

2018-11-15 Thread Masahiro Yamada
Sparse reports: ./include/linux/slab.h:332:43: warning: dubious: x & !y Signed-off-by: Masahiro Yamada --- include/linux/slab.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/slab.h b/include/linux/slab.h index 918f374..d395c73 100644 --- a/include/l

[PATCH 1/2] build_bug.h: remove negative-array fallback for BUILD_BUG_ON()

2018-11-15 Thread Masahiro Yamada
rning") enabled -Wvla warning. The use of variable length arrays is banned. Signed-off-by: Masahiro Yamada --- include/linux/build_bug.h | 14 -- 1 file changed, 14 deletions(-) diff --git a/include/linux/build_bug.h b/include/linux/build_bug.h index 43d1fd5..d415c64 100644 ---

[PATCH 2/2] build_bug.h: remove all dummy BUILD_BUG_ON stubs for sparse

2018-11-15 Thread Masahiro Yamada
ected by the normal compile test process.) Signed-off-by: Masahiro Yamada --- include/linux/build_bug.h | 11 --- 1 file changed, 11 deletions(-) diff --git a/include/linux/build_bug.h b/include/linux/build_bug.h index d415c64..b0828f7 100644 --- a/include/linux/build_bug.h +++ b/include/linux/

[PATCH v2 2/2] build_bug.h: remove all dummy BUILD_BUG_ON stubs for sparse

2018-11-15 Thread Masahiro Yamada
ected by the normal compile test process.) Signed-off-by: Masahiro Yamada --- Changes in v2: - Fix a coding style error (two consecutive blank lines) include/linux/build_bug.h | 12 1 file changed, 12 deletions(-) diff --git a/include/linux/build_bug.h b/include/linux/build_bug.h ind

[PATCH v2 1/2] build_bug.h: remove negative-array fallback for BUILD_BUG_ON()

2018-11-15 Thread Masahiro Yamada
rning") enabled -Wvla warning. The use of variable length arrays is banned. Signed-off-by: Masahiro Yamada --- Changes in v2: None include/linux/build_bug.h | 14 -- 1 file changed, 14 deletions(-) diff --git a/include/linux/build_bug.h b/include/linux/build_bug.h index 43d1fd

Re: [PATCH 4/8] kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS

2018-11-15 Thread Masahiro Yamada
On Fri, Nov 16, 2018 at 2:13 PM Nicolas Pitre wrote: > > On Thu, 15 Nov 2018, Masahiro Yamada wrote: > > > My main motivation of this commit is to clean up scripts/Kbuild.include > > and scripts/Makefile.build. > > > > Currently, CONFIG_TRIM_UNUSED_KSYMS works wi

Re: [PATCH v2 2/2] x86: set a dependency on macros.S

2018-11-15 Thread Masahiro Yamada
$(obj)/%.o: $(src)/%.c $(recordmcount_source) > $(objtool_dep) FORCE > +$(single-used-m): $(obj)/%.o: $(src)/%.c $(recordmcount_source) > $(objtool_dep) $(ASM_MACRO_FILE:.s=.S) FORCE > $(call cmd,force_checksrc) > $(call if_changed_rule,cc_o_c) > @{ echo $(@:.o=.ko); echo $@; \ > -- > 2.17.1 > -- Best Regards Masahiro Yamada

Re: [PATCH v2 1/2] Makefile: Fix distcc compilation with x86 macros

2018-11-15 Thread Masahiro Yamada
> +cmd_cc_o_c = $(call cmd_cc_o_c_helper,$@) > > else > # When module versioning is enabled the following steps are executed: > @@ -171,7 +197,7 @@ else > # replace the unresolved symbols __crc_exported_symbol with > # the actual value of the checksum generated by genksyms > > -cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< > +cmd_cc_o_c = $(call cmd_cc_o_c_helper,$(@D)/.tmp_$(@F)) > > cmd_modversions_c = > \ > if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then > \ > -- > 2.17.1 > -- Best Regards Masahiro Yamada

Re: [PATCH v3] scripts/setlocalversion: Improve -dirty check with git-status --no-optional-locks

2018-11-16 Thread Masahiro Yamada
igned-off-by: Brian Norris Worked for me, and clean implementation. Nice! I will wait a few days before I pick it up in case some people may give comments, Reviewed-by, Tested-by, etc. -- Best Regards Masahiro Yamada

Re: [PATCH] kbuild: rpm-pkg: fix binrpm-pkg breakage when O= is used

2018-11-17 Thread Masahiro Yamada
Hi Laurent, On Sun, Nov 18, 2018 at 4:22 AM Laurent Pinchart wrote: > > Hi Yamada-san, > > On Monday, 5 November 2018 09:51:49 EET Masahiro Yamada wrote: > > Zhenzhong Duan reported that running 'make O=/build/kernel binrpm-pkg' > > failed with the following

Re: [PATCH v2 1/2] Makefile: Fix distcc compilation with x86 macros

2018-11-17 Thread Masahiro Yamada
On Sat, Nov 17, 2018 at 6:02 AM Nadav Amit wrote: > > From: Masahiro Yamada > Sent: November 16, 2018 at 7:45:45 AM GMT > > To: Nadav Amit > > Cc: Ingo Molnar , Michal Marek , > > Thomas Gleixner , Borislav Petkov , H. > > Peter Anvin , X86 ML , Linux Kbuild

Re: [PATCH 3/8] kbuild: refactor modversions build rules

2018-11-17 Thread Masahiro Yamada
Hi Sam, On Sat, Nov 17, 2018 at 5:01 AM Sam Ravnborg wrote: > > Hi Masahiro > > On Thu, Nov 15, 2018 at 05:27:10PM +0900, Masahiro Yamada wrote: > > Let $(CC) compile objects into normal files *.o instead of .tmp_*.o > > whether CONFIG_MODVERSIONS is enabled or not.

[PATCH v3 1/3] compiler_types.h: make __builtin_types_compatible_p() noop for Sparse

2018-11-19 Thread Masahiro Yamada
(4 0) test_code.c:9:51: warning: unknown expression (4 0) Interstingly, just removing the 'inline' keyword in the test code makes Sparse happy. I concluded that Sparse cannot handle __builtin_types_compatible_p() correctly. Make it no-op. Signed-off-by: Masahiro Yamada --- Changes i

[PATCH v3 3/3] build_bug.h: remove most of dummy BUILD_BUG_ON stubs for sparse

2018-11-19 Thread Masahiro Yamada
ERO(). Otherwise, Sparse would complain about the following code, which GCC is fine with: static const int x = 0; int y = BUILD_BUG_ON_ZERO(x); Signed-off-by: Masahiro Yamada Acked-by: Kees Cook --- Changes in v3: - Add Kees' Acked-by - Clarify log that BUILD_BUG_ON() *was* producing f

[PATCH v3 2/3] build_bug.h: remove negative-array fallback for BUILD_BUG_ON()

2018-11-19 Thread Masahiro Yamada
e VLA warning") enabled -Wvla warning. The use of variable length arrays is banned. Signed-off-by: Masahiro Yamada Acked-by: Kees Cook --- Changes in v3: None Changes in v2: None include/linux/build_bug.h | 14 -- 1 file changed, 14 deletions(-) diff --git a/include/linux/bui

Re: [PATCH v2 2/2] build_bug.h: remove all dummy BUILD_BUG_ON stubs for sparse

2018-11-19 Thread Masahiro Yamada
On Sat, Nov 17, 2018 at 9:33 AM Luc Van Oostenryck wrote: > > On Fri, Nov 16, 2018 at 03:27:25PM +0900, Masahiro Yamada wrote: > > The introduction of these dummy BUILD_BUG_ON stubs dates back to > > commit 903c0c7cdc21 ("sparse: define dummy BUILD_BUG_ON definition > &g

Re: [PATCH 2/2] build_bug.h: remove all dummy BUILD_BUG_ON stubs for sparse

2018-11-19 Thread Masahiro Yamada
t tree, please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Masahiro-Yamada/build_bug-h-remove-negative-array-fallback-for-BUILD_BUG_ON/20181116-190414 > config: x86_64-allmodconfig (attached as .config) > compiler

Re: [PATCH v2] openrisc: make function cache_loop() inline

2018-11-19 Thread Masahiro Yamada
n of macro 'mtspr' > > mtspr(reg, line); > > ^ > > arch/openrisc/include/asm/spr.h:20:27: error: impossible constraint in 'asm' > > > > Signed-off-by: Changbin Du > > Reported-by: kbuild test robot > > Cc: Stafford Horne

Re: [PATCH v3] scripts/setlocalversion: Improve -dirty check with git-status --no-optional-locks

2018-11-19 Thread Masahiro Yamada
ls. Note that git-diff-index does not refresh the > + # index, so it may give misleading results. See > + # git-update-index(1), git-diff-index(1), and git-status(1). > + if { > + git --no-optional-locks status -uno --porcelain > 2>/dev/null || > + git diff-index --name-only HEAD > + } | grep -qvE '^(.. )?scripts/package'; then > printf '%s' -dirty > fi > > -- > 2.19.1.930.g4563a0d9d0-goog -- Best Regards Masahiro Yamada

[PATCH] x86: remove gcc-x86_*-has-stack-protector.sh checks

2018-11-11 Thread Masahiro Yamada
or"), which did not clearly state whether compilers were still producing broken code at that time. Now, the minimum reuquired GCC version is 4.6, which was released in 2011. Probably, we can dump these old compiler checks. Signed-off-by: Masahiro Yamada --- arch/x86/Kconfig

[PATCH] kbuild: remove 'prepare' and 'scripts' dummies for external module build

2018-11-11 Thread Masahiro Yamada
Make is lenient enough to ignore missing rules as long as they are marked as PHONY. Remove dummy targets. Signed-off-by: Masahiro Yamada --- Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile b/Makefile index 766a64e..7508243 100644 --- a/Makefile +++ b/Makefile

Re: [PATCH] x86: remove gcc-x86_*-has-stack-protector.sh checks

2018-11-12 Thread Masahiro Yamada
On Mon, Nov 12, 2018 at 5:29 PM Kees Cook wrote: > > On Sun, Nov 11, 2018 at 9:06 PM, Masahiro Yamada > wrote: > > gcc-x86_64-has-stack-protector.sh was introduced by commit 4f7fd4d7a791 > > ("[PATCH] Add the -fstack-protector option to the CFLAGS") in 2006 >

Re: [PATCH 2/2] modpost: skip ELF local symbols by default during section mismatch check

2018-11-12 Thread Masahiro Yamada
88802b22d4e2daf7eb027dd14175a0f8#n1256 > > Since it might be useful for some static analysis runs to detect > whether any new symbols have been added that result in any section > mismatches, even from ELF local symbols, this change can be disabled > (along with other tests that ca

Re: [PATCH v2 1/2] Makefile: Export clang toolchain variables

2018-11-12 Thread Masahiro Yamada
'export'. > Either way, I think it would be clearer to export this after all the > relevant flags are set. OK. It is just a matter of preference, but I will move the export line below when I pick up this patch set. > > KBUILD_CFLAGS += $(CLANG_FLAGS) > > KBUILD_AFLAGS += $(CLANG_FLAGS) > > -- > > 2.19.1 > > > > > -- > Thanks, > ~Nick Desaulniers -- Best Regards Masahiro Yamada

Re: [PATCH v3] scripts/kconfig/merge_config: don't redefine 'y' to 'm'

2018-11-13 Thread Masahiro Yamada
[ "x$PREV_VAL" != "x$NEW_VAL" ] ; then > + echo Value of $CFG is redefined by fragment > $ORIG_MERGE_FILE: > echo Previous value: $PREV_VAL > echo New value: $NEW_VAL > echo > elif [ "$WARNREDUN" = "true" ]; then > - echo Value of $CFG is redundant by fragment > $MERGE_FILE: > + echo Value of $CFG is redundant by fragment > $ORIG_MERGE_FILE: > + fi > + if [ "$BUILTIN_FLAG" = "false" ]; then > + sed -i "/$CFG[ =]/d" $TMP_FILE > + else > + sed -i "/$CFG[ =]/d" $MERGE_FILE > fi > - sed -i "/$CFG[ =]/d" $TMP_FILE > done > cat $MERGE_FILE >> $TMP_FILE > done > -- > 2.19.1 > -- Best Regards Masahiro Yamada

Re: [PATCH] kbuild: remove 'prepare' and 'scripts' dummies for external module build

2018-11-13 Thread Masahiro Yamada
On Mon, Nov 12, 2018 at 1:02 PM Masahiro Yamada wrote: > > Make is lenient enough to ignore missing rules as long as they are marked > as PHONY. Remove dummy targets. > > Signed-off-by: Masahiro Yamada > --- Applied to linux-kbuild. > > Makefile | 3 --- >

[PATCH] x86/build: fix compiler support check for CONFIG_RETPOLINE

2018-12-04 Thread Masahiro Yamada
9ac1 ("x86: Allow generating user-space headers without a compiler") did. Link: https://lkml.org/lkml/2018/12/4/206 Reported-by: Meelis Roos Fixes: 4cd24de3a098 ("x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support") Signed-off-by: Masahiro Yamada --- arch/x86/Makefi

Re: Compiling with old gcc breaks when CONFIG_RETPOLINE is off

2018-12-04 Thread Masahiro Yamada
nly when CONFIG_RETPOLINE is > > enabled, but it still breaks. > > > > $ grep -r CONFIG_RETPOLINE .config > > # CONFIG_RETPOLINE is not set > > > > $ grep -r CONFIG_RETPOLINE include/ > > include/generated/autoconf.h:#define CONFIG_RETPOLINE 1 > > include/config/auto.conf:CONFIG_RETPOLINE=y > > > > So the headers have not been updated yet, maybe? > > -- Best Regards Masahiro Yamada

Re: [PATCH 07/14] clock: milbeaut: Add Milbeaut M10V clock control

2018-12-04 Thread Masahiro Yamada
On Wed, Dec 5, 2018 at 3:14 AM Stephen Boyd wrote: > > Quoting Masahiro Yamada (2018-12-04 03:03:53) > > Hi Stephen, > > > > > > On Fri, Nov 30, 2018 at 5:31 PM Stephen Boyd wrote: > > > > > > Quoting Sugaya Taichi (2018-11-18 17:01:12) > >

Re: [PATCH] x86/build: fix compiler support check for CONFIG_RETPOLINE

2018-12-04 Thread Masahiro Yamada
ONFIG_MATH_EMULATION) += arch/x86/math-emu/ > drivers-$(CONFIG_PCI) += arch/x86/pci/ > drivers-$(CONFIG_OPROFILE) += arch/x86/oprofile/ > drivers-$(CONFIG_PM) += arch/x86/power/ > drivers-$(CONFIG_FB) += arch/x86/video/ > ifeq ($(CONFIG_X86_DECODER_SELFTEST),y) > > Thanks >

Re: [PATCH] x86/build: fix compiler support check for CONFIG_RETPOLINE

2018-12-04 Thread Masahiro Yamada
On Wed, Dec 5, 2018 at 3:08 PM Zhenzhong Duan wrote: > > > On 2018/12/5 11:00, Masahiro Yamada wrote: > > It is wrong to add CONFIG option diagnostic to the Makefile parse > > stage. > > > > Once you are hit by the error about non-retpoline compiler, the > &

[PATCH v2] x86/build: fix compiler support check for CONFIG_RETPOLINE

2018-12-04 Thread Masahiro Yamada
ort") Reported-by: Meelis Roos Signed-off-by: Masahiro Yamada --- Changes in v2: - Revive ifdef CONFIG_RETPOLINE surrounding the KBUILD_CFLAGS addition - Rephase the commit log a bit, hoping the cause of the issue will be clearer arch/x86/Makefile | 10 +++--- 1 file changed, 7 inser

[PATCH] kbuild: remove a special handling for *.agh in Makefile.headersinst

2018-12-04 Thread Masahiro Yamada
ned-off-by: Masahiro Yamada --- scripts/Makefile.headersinst | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index 0d4a96d..3d1ebaa 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst @@ -44,7 +44,6 @@ k

[PATCH] kbuild: exploit parallel building for CONFIG_HEADERS_CHECK

2018-12-04 Thread Masahiro Yamada
When CONFIG_HEADERS_CHECK is enabled, the headers_check is executed as a serialized task in the vmlinux recipe. Make it independent of vmlinux so that parallel building can process the headers_check and other build targets simultaneously. Signed-off-by: Masahiro Yamada --- Makefile | 7

[PATCH 1/3] kbuild: refactor Makefile.asm-generic

2018-12-05 Thread Masahiro Yamada
- Use conventional $(MAKE) $(asm-generic)= style for directory descending - Remove unneeded FORCE since "all" is a phony target - Remove unneeded "_dummy :=" assignment - Skip $(shell mkdir ...) when headers exist in the directory - Misc cleanups Signed-off

[PATCH] pinctrl: uniphier: convert to SPDX License Identifier

2018-12-05 Thread Masahiro Yamada
checkpatch.pl suggests to use SPDX license tag. I am happy to follow it. Signed-off-by: Masahiro Yamada --- drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | 18 -- drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c | 18 -- drivers/pinctrl/uniphier/pinctrl

[PATCH] gpio: uniphier: convert to SPDX License Identifier

2018-12-05 Thread Masahiro Yamada
checkpatch.pl suggests to use SPDX license tag. I am happy to follow it. Signed-off-by: Masahiro Yamada --- drivers/gpio/gpio-uniphier.c | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c index

[PATCH 4/4] i2c: uniphier-f: fix violation of tLOW requirement for Fast-mode

2018-12-05 Thread Masahiro Yamada
us Signed-off-by: Masahiro Yamada --- drivers/i2c/busses/i2c-uniphier-f.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-uniphier-f.c b/drivers/i2c/busses/i2c-uniphier-f.c index d8a5db14..03da4a5 100644 --- a/drivers/i2c/busses/

[PATCH 1/4] i2c: uniphier-f: fix timeout error after reading 8 bytes

2018-12-05 Thread Masahiro Yamada
al. Fixes: eaba68785c2d ("i2c: uniphier-f: fix race condition when IRQ is cleared") Signed-off-by: Masahiro Yamada --- drivers/i2c/busses/i2c-uniphier-f.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-uniphier-f.c b/drivers/i2c/bus

[PATCH 2/4] i2c: uniphier-f: fill TX-FIFO only in IRQ handler for repeated START

2018-12-05 Thread Masahiro Yamada
, the data after a repeated START may not be transferred if the interrupt is asserted while the TX-FIFO is being filled up. A more reliable way is to append TX data only in the interrupt handler. Signed-off-by: Masahiro Yamada --- drivers/i2c/busses/i2c-uniphier-f.c | 13 + 1 file

[PATCH 3/4] i2c: uniphier: fix violation of tLOW requirement for Fast-mode

2018-12-05 Thread Masahiro Yamada
us Signed-off-by: Masahiro Yamada --- drivers/i2c/busses/i2c-uniphier.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-uniphier.c b/drivers/i2c/busses/i2c-uniphier.c index 454f914..c488e55 100644 --- a/drivers/i2c/busses/i2c-uniphier.c ++

[PATCH 0/4] UniPhier I2C fixes

2018-12-05 Thread Masahiro Yamada
Masahiro Yamada (4): i2c: uniphier-f: fix timeout error after reading 8 bytes i2c: uniphier-f: fill TX-FIFO only in IRQ handler for repeated START i2c: uniphier: fix violation of tLOW requirement for Fast-mode i2c: uniphier-f: fix violation of tLOW requirement for Fast-mode drivers/i2c

Re: [PATCH 0/7] microblaze: fix various problems in building boot images

2018-12-05 Thread Masahiro Yamada
Hi Michal, On Thu, Dec 6, 2018 at 1:41 AM Michal Simek wrote: > > On 03. 12. 18 8:50, Masahiro Yamada wrote: > > This patch set fixes various issues in microblaze Makefiles. > > > > BTW, "simpleImage." works like a phony target to generate the > > followin

Re: [PATCH 2/7] microblaze: adjust the help to the real behavior

2018-12-05 Thread Masahiro Yamada
Hi Michal, On Thu, Dec 6, 2018 at 12:41 AM Michal Simek wrote: > > On 03. 12. 18 8:50, Masahiro Yamada wrote: > > "make ARCH=microblaze help" mentions simpleImage..unstrip, > > but it never works because Makefile assumes "system.unstrip" is > > th

Re: [PATCH 2/7] microblaze: adjust the help to the real behavior

2018-12-07 Thread Masahiro Yamada
On Thu, Dec 6, 2018 at 9:54 PM Michal Simek wrote: > > On 06. 12. 18 6:27, Masahiro Yamada wrote: > > Hi Michal, > > > > On Thu, Dec 6, 2018 at 12:41 AM Michal Simek wrote: > >> > >> On 03. 12. 18 8:50, Masahiro Yamada wrote: > >>> &qu

Re: [PATCH 2/7] microblaze: adjust the help to the real behavior

2018-12-07 Thread Masahiro Yamada
On Thu, Dec 6, 2018 at 9:54 PM Michal Simek wrote: > > On 06. 12. 18 6:27, Masahiro Yamada wrote: > > Hi Michal, > > > > On Thu, Dec 6, 2018 at 12:41 AM Michal Simek wrote: > >> > >> On 03. 12. 18 8:50, Masahiro Yamada wrote: > >>> &qu

Re: [PATCH 0/7] microblaze: fix various problems in building boot images

2018-12-07 Thread Masahiro Yamada
On Thu, Dec 6, 2018 at 10:10 PM Michal Simek wrote: > > Hi, > > On 06. 12. 18 6:08, Masahiro Yamada wrote: > > Hi Michal, > > > > On Thu, Dec 6, 2018 at 1:41 AM Michal Simek wrote: > >> > >> On 03. 12. 18 8:50, Masahiro Yamada wrote: > &g

Re: [PATCH 0/7] microblaze: fix various problems in building boot images

2018-12-07 Thread Masahiro Yamada
On Thu, Dec 6, 2018 at 11:55 PM Michal Simek wrote: > > On 03. 12. 18 8:50, Masahiro Yamada wrote: > > This patch set fixes various issues in microblaze Makefiles. > > > > BTW, "simpleImage." works like a phony target to generate the > > following fou

[PATCH 0/6] microblaze: fix various problems in building boot images

2018-12-07 Thread Masahiro Yamada
it should apply to MicroBlaze tree. Resolved the conflict with: commit 1e17ab5320a654eaf1e4ce121c61e7aa9732805a Author: Firoz Khan Date: Tue Nov 13 11:34:34 2018 +0530 microblaze: generate uapi header and system call table files Masahiro Yamada (6): microblaze: adjust the help t

[PATCH 2/6] microblaze: move "... is ready" messages to arch/microblaze/Makefile

2018-12-07 Thread Masahiro Yamada
To prepare for more fixes, move this to arch/microblaze/Makefile. Otherwise, the same "... is ready" would be printed multiple times. Signed-off-by: Masahiro Yamada --- Changes in v2: None arch/microblaze/Makefile | 2 ++ arch/microblaze/boot/Makefile | 4 2 files

[PATCH 6/6] microblaze: remove the explicit removal of system.dtb

2018-12-07 Thread Masahiro Yamada
quivalent cmd_shipped from scripts/Makefile.lib. Signed-off-by: Masahiro Yamada --- Changes in v2: None arch/microblaze/boot/dts/Makefile | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/microblaze/boot/dts/Makefile b/arch/microblaze/boot/dts/Makefile index c7324e7.

[PATCH 5/6] microblaze: fix race condition in building boot images

2018-12-07 Thread Masahiro Yamada
two threads descend into arch/microblaze/boot simultaneously. Add proper dependencies to avoid it. Signed-off-by: Masahiro Yamada --- Changes in v2: None arch/microblaze/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/microblaze/Makefile b/arch/micro

[PATCH 3/6] microblaze: fix multiple bugs in arch/microblaze/boot/Makefile

2018-12-07 Thread Masahiro Yamada
ux.bin.* ones to not change the behavior. Lastly, this commit fixes "make ARCH=microblaze clean". Previously, it only cleaned up the unstrip image. Now, all the simpleImage files are cleaned. Signed-off-by: Masahiro Yamada --- Changes in v2: - Squash the first patch into this - Separate

[PATCH 1/6] microblaze: adjust the help to the real behavior

2018-12-07 Thread Masahiro Yamada
- Build for mmu nommu_defconfig - Build for nommu Signed-off-by: Masahiro Yamada --- Changes in v2: - Show all the four images in help - Delete redundant *_defconfig explanation arch/microblaze/Makefile | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff

[PATCH 4/6] microblaze: add linux.bin* and simpleImage.* to PHONY

2018-12-07 Thread Masahiro Yamada
ned-off-by: Masahiro Yamada --- Changes in v2: None arch/microblaze/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index ff5abbd..180dffa 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile @@ -82

Re: [PATCH 0/7] microblaze: fix various problems in building boot images

2018-12-07 Thread Masahiro Yamada
On Sat, Dec 8, 2018 at 12:20 AM Michal Simek wrote: > > On 07. 12. 18 14:29, Michal Simek wrote: > > On 07. 12. 18 12:29, Masahiro Yamada wrote: > >> On Thu, Dec 6, 2018 at 11:55 PM Michal Simek wrote: > >>> > >>> On 03. 12. 18 8:50, Masahiro Yama

Re: [PATCH 6/7] microblaze: fix race condition in building boot images

2018-12-07 Thread Masahiro Yamada
On Thu, Dec 6, 2018 at 1:32 AM Michal Simek wrote: > > On 03. 12. 18 8:50, Masahiro Yamada wrote: > > I fixed a race condition in the parallel building of ARM in commit > > 3939f3345050 ("ARM: 8418/1: add boot image dependencies to not > > generate invalid images"

Re: [PATCH 1/5] kconfig: remove unneeded setsym label in conf_read_simple()

2018-12-07 Thread Masahiro Yamada
On Fri, Nov 30, 2018 at 6:17 PM Masahiro Yamada wrote: > > The two 'goto setsym' statements are reachable only when sym == NULL. > > The code below the 'setsym:' label does nothing when sym == NULL > since there is just one if-block guarded by 'if (sym &

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