Re: [PATCH 2/2] kbuild: clang: Disable the 'duplicate-decl-specifier' warning

2017-07-31 Thread Matthias Kaehlcke
El Wed, Jun 21, 2017 at 07:59:42PM +0200 Arnd Bergmann ha dit: > On Wed, Jun 21, 2017 at 6:58 PM, Matthias Kaehlcke <m...@chromium.org> wrote: > > El Wed, Jun 21, 2017 at 12:11:55PM +0200 Arnd Bergmann ha dit: > >> I see that container_of() has been modified in linux-next

[PATCH] mm/zsmalloc: Change stat type parameter to int

2017-07-31 Thread Matthias Kaehlcke
zs_stat_inc/dec/get() uses enum zs_stat_type for the stat type, however some callers pass an enum fullness_group value. Change the type to int to reflect the actual use of the functions and get rid of 'enum-conversion' warnings Signed-off-by: Matthias Kaehlcke <m...@chromium.org> -

[PATCH] clocksource: arm_arch_timer: Fix mem frame loop initialization

2017-07-31 Thread Matthias Kaehlcke
ore the second loop is never executed. Initialize the loop counter with 0 to iterate over all timers, which supposedly was the intention before the typo monster attacked. Fixes: c2743a36765d3 ("clocksource: arm_arch_timer: add GTDT support for memory-mapped timer") Signed-off-by: Matthia

Re: [PATCH 2/2] arm64: Define PAGE_OFFSET using GENMASK_ULL

2017-08-02 Thread Matthias Kaehlcke
kernel-wahoo/private/msm-google/arch/arm64/include/asm/memory.h:52:22: > > note: > > > > expanded from macro 'PAGE_OFFSET' > > #define PAGE_OFFSET GENMASK_ULL(BITS_PER_LONG_LONG - 1, VA_BITS > > - 1) > > ^ > > 1 error generat

[PATCH 1/2] bitops: Avoid integer overflow warning in GENMASK_ULL

2017-08-02 Thread Matthias Kaehlcke
GENMASK_ULL performs a left-shift of (~0ULL), which technically results in an integer overflow. clang raises a warning about this if the overflow occurs in a preprocessor expression. To avoid the overflow first perform a right-shift to clear the bits that are shifted out. Signed-off-by: Matthias

[PATCH 2/2] arm64: Define PAGE_OFFSET using GENMASK_ULL

2017-08-02 Thread Matthias Kaehlcke
e overflow. Reported-by: Nick Desaulniers <ndesaulni...@google.com> Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- arch/arm64/include/asm/memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memor

Re: [PATCH] zram: Fix buffer size passed to strlcpy()

2017-08-02 Thread Matthias Kaehlcke
El Thu, Aug 03, 2017 at 08:44:37AM +0900 Minchan Kim ha dit: > Hi Doug, > > On Wed, Aug 02, 2017 at 03:54:32PM -0700, Doug Anderson wrote: > > Hi, > > > > On Fri, Jul 28, 2017 at 10:12 AM, Matthias Kaehlcke <m...@chromium.org> > > wrote: >

[PATCH v2] zram: Rework copy of compressor name in comp_algorithm_store()

2017-08-03 Thread Matthias Kaehlcke
buffer is terminated. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- Changes in v2: - make destination buffer explicitly of the same size as source buffer - use strcpy() instead of strlcpy() - updated subject and commit message drivers/block/zram/zram_drv.c | 4 ++-- 1 file chan

Re: [PATCH 1/2] bitops: Avoid integer overflow warning in GENMASK_ULL

2017-08-03 Thread Matthias Kaehlcke
El Thu, Aug 03, 2017 at 04:24:56PM +0300 Yury Norov ha dit: > On Wed, Aug 02, 2017 at 03:51:58PM -0700, Matthias Kaehlcke wrote: > > GENMASK_ULL performs a left-shift of (~0ULL), which technically > > results in an integer overflow. clang raises a warning about > > this i

[PATCH v2] bitops: Avoid integer overflow in GENMASK(_ULL)

2017-08-03 Thread Matthias Kaehlcke
GENMASK(_ULL) performs a left-shift of ~0UL(L), which technically results in an integer overflow. clang raises a warning if the overflow occurs in a preprocessor expression. Clear the low-order bits through a substraction instead of the left-shift to avoid the overflow. Signed-off-by: Matthias

[PATCH v2 2/2] x86/build: Fix stack alignment for CLang

2017-08-14 Thread Matthias Kaehlcke
-alignment to be the actual alignment instead of a power of two. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- Changes in v2: - use the reworked [__]cc-option instead of cc-option-3, the macro now also evaluates the alternative option arch/x86/Makefile | 16 +--- 1 file chang

[PATCH v2 1/2] kbuild: Also evaluate alternative option passed to cc-option, etc

2017-08-14 Thread Matthias Kaehlcke
. In case of failure 'base command' + option 2 is executed, in case of success option 2 is returned, otherwise an empty string. Rework [__]cc-option, ld-option, and cc-ldoption to use try-run-opt instead of try-run to make sure the alternative option is evaluated. Signed-off-by: Matthias Kaehlcke &l

Re: [PATCH v2] drm/i915: Return correct EDP voltage swing table for 0.85V

2017-08-11 Thread Matthias Kaehlcke
El Mon, Jul 17, 2017 at 12:58:54PM -0700 Matthias Kaehlcke ha dit: > For 0.85V cnl_get_buf_trans_edp() returns the DP table, instead of EDP. > Use the correct table. > > The error was pointed out by this clang warning: > > drivers/gpu/drm/i915/intel_ddi.c:392:39:

[PATCH v3] x86/build: Fix stack alignment for CLang

2017-08-16 Thread Matthias Kaehlcke
n is valid it would incorrectly select the clang option -mstack-alignment.. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- Changes in v3: - Don't rely on cc-option to evaluate the alternative option. Instead check once if the compiler supports the option and use variables with th

Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm"

2017-07-13 Thread Matthias Kaehlcke
El Thu, Jul 13, 2017 at 01:00:01PM -0500 Josh Poimboeuf ha dit: > On Wed, Jul 12, 2017 at 04:22:13PM -0700, Matthias Kaehlcke wrote: > > El Wed, Jul 12, 2017 at 05:36:30PM -0500 Josh Poimboeuf ha dit: > > > > > On Wed, Jul 12, 2017 at 05:35:47PM -0500, Josh Poimboeuf wr

Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm"

2017-07-13 Thread Matthias Kaehlcke
El Fri, Jul 14, 2017 at 12:25:42AM +0300 Andrey Rybainin ha dit: > > > On 07/14/2017 12:14 AM, Matthias Kaehlcke wrote: > > El Thu, Jul 13, 2017 at 11:20:04PM +0300 Andrey Rybainin ha dit: > > > >> On 07/13/2017 09:47 PM, Matthias Kaehlcke wrote: >

Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm"

2017-07-13 Thread Matthias Kaehlcke
El Thu, Jul 13, 2017 at 11:20:04PM +0300 Andrey Rybainin ha dit: > On 07/13/2017 09:47 PM, Matthias Kaehlcke wrote: > > > Thanks for your analysis! > > > >> What happens if you try the below patch instead of the revert? Any > >> chance the offending instruc

Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm"

2017-07-13 Thread Matthias Kaehlcke
El Thu, Jul 13, 2017 at 04:34:06PM -0500 Josh Poimboeuf ha dit: > On Thu, Jul 13, 2017 at 02:12:45PM -0700, Matthias Kaehlcke wrote: > > El Thu, Jul 13, 2017 at 03:34:16PM -0500 Josh Poimboeuf ha dit: > > > And yet another one to try (clobbering sp) :-) > > > > >

Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm"

2017-07-13 Thread Matthias Kaehlcke
El Thu, Jul 13, 2017 at 03:34:16PM -0500 Josh Poimboeuf ha dit: > On Thu, Jul 13, 2017 at 11:20:04PM +0300, Andrey Rybainin wrote: > > On 07/13/2017 09:47 PM, Matthias Kaehlcke wrote: > > > > > Thanks for your analysis! > > > > > >> What happens if

Re: [PATCH] drm/i915: Consistently use enum pipe for PCH transcoders

2017-07-17 Thread Matthias Kaehlcke
El Mon, Jul 17, 2017 at 11:07:01AM +0200 Daniel Vetter ha dit: > On Fri, Jul 14, 2017 at 06:04:03PM -0700, Matthias Kaehlcke wrote: > > The current code uses two different enum types for PCH transcoders and > > performs implicit conversions between the two types. This

[PATCH] drm/i915: Return correct EDP voltage swing table for 0.85V

2017-07-17 Thread Matthias Kaehlcke
-internal-declaration] static const struct cnl_ddi_buf_trans cnl_ddi_translations_edp_0_85V[] = { Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- drivers/gpu/drm/i915/intel_ddi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/d

[PATCH v2] drm/i915: Consistently use enum pipe for PCH transcoders

2017-07-17 Thread Matthias Kaehlcke
'enum transcoder' [-Wenum-conversion] intel_set_pch_fifo_underrun_reporting(dev_priv, PIPE_A, false); Consistently use the type enum pipe for PCH transcoders. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- Changes in v2: - rebased on drm-intel/drm-intel-next-queued drivers/g

[PATCH v2] drm/i915: Return correct EDP voltage swing table for 0.85V

2017-07-17 Thread Matthias Kaehlcke
-internal-declaration] static const struct cnl_ddi_buf_trans cnl_ddi_translations_edp_0_85V[] = { Fixes: cf54ca8bc567 ("drm/i915/cnl: Implement voltage swing sequence.") Signed-off-by: Matthias Kaehlcke <m...@chromium.org> Reviewed-by: Manasi Navare <manasi.d.nav...@intel.com

[PATCH] x86/build: Fix stack alignment for clang

2017-07-11 Thread Matthias Kaehlcke
the actual alignment instead of a power of two. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- Apparently I had really bad luck when testing d77698df39a5. It fixed the crash I was investigating and the stack in the debugged function looked good with the patch, so I didn't had any do

Re: [Intel-gfx] [PATCH RESEND] drm/i915: Fix pipe/transcoder enum mismatches

2017-07-14 Thread Matthias Kaehlcke
om your side) there's > > suddenly mass panic and multiple escalations on all available > > channels, which feels like a rather decent overreaction and not a > > terrible constructive way to collaborate on the upstream codebase. > > I'm sorry - I'm not on th

[PATCH] drm/i915: Consistently use enum pipe for PCH transcoders

2017-07-14 Thread Matthias Kaehlcke
' to different enumeration type 'enum transcoder' [-Wenum-conversion] intel_set_pch_fifo_underrun_reporting(dev_priv, PIPE_A, false); Consistently use the type enum pipe for PCH transcoders. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- drivers/gpu/drm/i915/i915

Re: [PATCH v2] drm/i915: Consistently use enum pipe for PCH transcoders

2017-07-18 Thread Matthias Kaehlcke
Hi Daniel, El Tue, Jul 18, 2017 at 08:39:50AM +0200 Daniel Vetter ha dit: > On Mon, Jul 17, 2017 at 11:14:03AM -0700, Matthias Kaehlcke wrote: > > The current code uses in some instances enum transcoder for PCH > > transcoders and enum pipe in others. This is error prone and c

[PATCH] drm/i915: Pass enum pipe to intel_set_pch_fifo_underrun_reporting()

2017-07-19 Thread Matthias Kaehlcke
Commit a21960339c8c ("drm/i915: Consistently use enum pipe for PCH transcoders") misses some pieces, due to a problem with the patch format, this patch adds the remaining bits. Fixes: a21960339c8c ("drm/i915: Consistently use enum pipe for PCH transcoders") Signed-off-by:

Re: [PATCH v2] drm/i915: Consistently use enum pipe for PCH transcoders

2017-07-19 Thread Matthias Kaehlcke
El Wed, Jul 19, 2017 at 08:30:36AM +0200 Daniel Vetter ha dit: > On Tue, Jul 18, 2017 at 01:48:53PM -0700, Matthias Kaehlcke wrote: > > Hi Daniel, > > > > El Tue, Jul 18, 2017 at 08:39:50AM +0200 Daniel Vetter ha dit: > > > > > On Mon, Jul 17, 2017 at 11:14

Re: [PATCH] drm/i915: Pass enum pipe to intel_set_pch_fifo_underrun_reporting()

2017-07-20 Thread Matthias Kaehlcke
On Thu, Jul 20, 2017 at 1:27 AM, Daniel Vetter <dan...@ffwll.ch> wrote: > On Wed, Jul 19, 2017 at 10:39:28AM -0700, Matthias Kaehlcke wrote: >> Commit a21960339c8c ("drm/i915: Consistently use enum pipe for PCH >> transcoders") misses some pieces, due to a p

Re: [linux-next:master 1341/1811] cc1: error: unrecognized command line option "-mstack-alignment=8"

2017-07-20 Thread Matthias Kaehlcke
On Thu, Jul 20, 2017 at 1:29 AM, Ingo Molnar wrote: > > * kbuild test robot wrote: > >> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git >> master >> head: c981f0b3fb08ee58aacb208fe7f45628af420bba >> commit:

[PATCH 2/2] x86/build: Fix stack alignment for CLang

2017-07-21 Thread Matthias Kaehlcke
-alignment to be the actual alignment instead of a power of two. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- arch/x86/Makefile | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 1e902f926be3..2b2f59c1a5f0 10064

[PATCH 1/2] kbuild: Add macros cc-option-3 and __cc-option-3

2017-07-21 Thread Matthias Kaehlcke
, and otherwise paramater 3. The macro __cc-option-3 works analogously. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- scripts/Kbuild.include | 9 + 1 file changed, 9 insertions(+) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index dd8e2dde0b34..dc83635f2317

[PATCH] netpoll: Fix device name check in netpoll_setup()

2017-07-25 Thread Matthias Kaehlcke
lue. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- net/core/netpoll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 8357f164c660..912731bed7b7 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -666,7 +666

[PATCH] x86/boot/compressed: Disable address-of-packed-member warning

2017-07-25 Thread Matthias Kaehlcke
' #define this_cpu_read_stable(var) percpu_stable_op("mov", var) ^~~ ./arch/x86/include/asm/percpu.h:228:16: note: expanded from macro 'percpu_stable_op' : "p" (&(var))); ^~~ Signed-o

[PATCH RESEND] x86/boot: #undef memcpy etc in string.c

2017-07-24 Thread Matthias Kaehlcke
x from the function name when compiling it), but clang does not. Adding these #undef's appears to preserve what I assume was the original intent of the code. Signed-off-by: Michael Davidson <m...@google.com> Acked-by: H. Peter Anvin <h...@zytor.com> Signed-off-by: Matthias Kaehlcke

[PATCH] module: Remove const attribute from alias for MODULE_DEVICE_TABLE

2017-07-24 Thread Matthias Kaehlcke
const typeof(name) __mod_##type##__##name##_device_table Remove the const attribute from the alias to avoid the duplicate specifier. After all it is only an alias and the attribute shouldn't have any effect. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- include/linux/module.h | 2

[PATCH v2] btrfs: Remove extra parentheses from condition in copy_items()

2017-07-27 Thread Matthias Kaehlcke
))) ~~^~~ Also remove the unnecessary parentheses around the substraction. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- Changes in v2: - also remove parentheses around substraction fs/btrfs/tree-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrf

Re: [PATCH] mm: memcontrol: Cast mismatched enum types passed to memcg state and event functions

2017-07-27 Thread Matthias Kaehlcke
El Thu, Jul 27, 2017 at 10:17:42AM -0400 Johannes Weiner ha dit: > On Thu, Jul 27, 2017 at 09:24:51AM +0200, Michal Hocko wrote: > > On Wed 26-07-17 15:03:32, Andrew Morton wrote: > > > On Wed, 26 Jul 2017 14:49:14 -0700 Matthias Kaehlcke <m...@chromium.org> > >

[PATCH] mm: memcontrol: Cast mismatched enum types passed to memcg state and event functions

2017-07-26 Thread Matthias Kaehlcke
. The casts add noise, but this seems preferable over losing the typesafe interface or/and disabling the warning. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- include/linux/memcontrol.h | 11 ++- mm/memcontrol.c| 11 +++ mm/swap.c | 2

[PATCH] clk: sunxi-ng: Fix header guard of ccu-sun8i-r.h

2017-07-26 Thread Matthias Kaehlcke
Remove trailing extra underscore in definition of _CCU_SUN8I_R_H Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- drivers/clk/sunxi-ng/ccu-sun8i-r.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-r.h b/drivers/clk/sunxi-ng/ccu

Re: [PATCH] mm: memcontrol: Cast mismatched enum types passed to memcg state and event functions

2017-07-26 Thread Matthias Kaehlcke
El Wed, Jul 26, 2017 at 02:23:09PM -0700 Andrew Morton ha dit: > On Wed, 26 Jul 2017 12:23:56 -0700 Matthias Kaehlcke <m...@chromium.org> > wrote: > > > In multiple instances enum values of an incorrect type are passed to > > mod_memcg_state() and other

[PATCH] btrfs: Remove extra parentheses from condition in copy_items()

2017-07-26 Thread Matthias Kaehlcke
))) ~~^~~ Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- fs/btrfs/tree-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index f20ef211a73d..b92408a3f834 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree

Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm"

2017-07-12 Thread Matthias Kaehlcke
Hi Josh, thanks for your prompt reply. El Wed, Jul 12, 2017 at 05:12:42PM -0500 Josh Poimboeuf ha dit: > On Wed, Jul 12, 2017 at 02:27:44PM -0700, Matthias Kaehlcke wrote: > > Commit f05058c4d652 supposedly "forces a stack frame to be created before > >

[PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm"

2017-07-12 Thread Matthias Kaehlcke
and x86-64 the generated code is exactly the same with and without the patch. However clang adds an extra instruction that adjusts %rsp, which ends up causing double faults all over the place. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- arch/x86/include/asm/uaccess.h | 5 ++--- 1

Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm"

2017-07-12 Thread Matthias Kaehlcke
El Wed, Jul 12, 2017 at 05:36:30PM -0500 Josh Poimboeuf ha dit: > On Wed, Jul 12, 2017 at 05:35:47PM -0500, Josh Poimboeuf wrote: > > On Wed, Jul 12, 2017 at 03:20:40PM -0700, Matthias Kaehlcke wrote: > > > > This is admittedly an awkward way of achieving this goal, but it's

Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm"

2017-07-19 Thread Matthias Kaehlcke
El Wed, Jul 19, 2017 at 12:46:31PM -0500 Josh Poimboeuf ha dit: > On Thu, Jul 13, 2017 at 02:57:04PM -0700, Matthias Kaehlcke wrote: > > El Thu, Jul 13, 2017 at 04:34:06PM -0500 Josh Poimboeuf ha dit: > > > > > On Thu, Jul 13, 2017 at 02:12:45PM -0700, Matthias Kaehlc

Re: [PATCH 4/7] x86, boot, LLVM: #undef memcpy etc in string.c

2017-06-30 Thread Matthias Kaehlcke
El Thu, Jun 22, 2017 at 03:37:23PM -0700 H. Peter Anvin ha dit: > On 06/22/17 15:31, Matthias Kaehlcke wrote: > > (removed some non-x86 lists and folks from recipients) > > > > El Thu, Mar 16, 2017 at 05:15:17PM -0700 Michael Davidson ha dit: > > > >> undef

Re: [PATCH] iio: magnetometer: Only declare ACPI table when ACPI is enable

2017-07-06 Thread Matthias Kaehlcke
El Sat, Jul 01, 2017 at 01:11:12PM +0100 Jonathan Cameron ha dit: > On Thu, 29 Jun 2017 14:51:56 +0200 > Linus Walleij <linus.wall...@linaro.org> wrote: > > > On Tue, Jun 27, 2017 at 2:25 AM, Matthias Kaehlcke <m...@chromium.org> > > wrote: > > > &

[PATCH v2] kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS

2017-04-25 Thread Matthias Kaehlcke
the MC layer can handle it. Disable clangs integrated assembler and use the GNU assembler instead. Wording-mostly-from: Saleem Abdulrasool <compn...@compnerd.org> Signed-off-by: Michael Davidson <m...@google.com> Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- Changes

Re: [PATCH] x86/mm/kaslr: Add operand size suffix to 'mul' instruction

2017-04-26 Thread Matthias Kaehlcke
Hi Kees, El Wed, Apr 26, 2017 at 12:09:13PM -0700 Kees Cook ha dit: > On Wed, Apr 26, 2017 at 12:01 PM, Matthias Kaehlcke <m...@chromium.org> wrote: > > In difference to gas clang doesn't seem to infer the size from the > > operands. Adding the suffix fixes the followin

[PATCH v2] x86/mm/kaslr: Use _ASM_MUL macro for multiplication

2017-04-26 Thread Matthias Kaehlcke
/tmp/kaslr-dfe1ad.s: Assembler messages: /tmp/kaslr-dfe1ad.s:182: Error: no instruction mnemonic suffix given and no register operands; can't size instruction Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- Changes in v2: - use _ASM_MUL instead of #ifdef - updated commit message

[PATCH] x86/mm/kaslr: Add operand size suffix to 'mul' instruction

2017-04-26 Thread Matthias Kaehlcke
and no register operands; can't size instruction Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- arch/x86/lib/kaslr.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/x86/lib/kaslr.c b/arch/x86/lib/kaslr.c index 121f59c6ee54..947d4aa92ff7 100644 --- a/arch/x

[PATCH v2] arm64: Add ASM modifier for xN register operands

2017-04-26 Thread Matthias Kaehlcke
] ... arch/arm64/include/asm/barrier.h:62:23: note: expanded from macro '__smp_store_release' asm volatile ("stlr %1, %0" Add the modifiers to keep clang happy. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- Changes in v2: - also add modifiers to multiline ASM statement

[PATCH] tracing: Use cpumask_available() to check if cpumask variable may be used

2017-04-21 Thread Matthias Kaehlcke
This fixes the following clang warning: kernel/trace/trace.c:3231:12: warning: address of array 'iter->started' will always evaluate to 'true' [-Wpointer-bool-conversion] if (iter->started) Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- Dependencies: - "cp

Re: [PATCH v2] crypto: arm64/sha: Add constant operand modifier to ASM_EXPORT

2017-04-25 Thread Matthias Kaehlcke
Hi, El Tue, Apr 18, 2017 at 04:35:02PM +0100 Ard Biesheuvel ha dit: > On 18 April 2017 at 15:47, Paul Gortmaker <paul.gortma...@windriver.com> > wrote: > > On Wed, Apr 5, 2017 at 2:34 PM, Matthias Kaehlcke <m...@chromium.org> wrote: > >> The operand is an int

Re: [PATCH] arm64: Add ASM modifier for xN register operands

2017-04-24 Thread Matthias Kaehlcke
Hi, El Mon, Apr 24, 2017 at 06:34:14PM +0100 Will Deacon ha dit: > On Mon, Apr 24, 2017 at 06:22:51PM +0100, Ard Biesheuvel wrote: > > On 24 April 2017 at 18:00, Will Deacon <will.dea...@arm.com> wrote: > > > Hi Matthias, > > > > > > On Thu, Apr 20, 2

[PATCH v4] kbuild: Add support to generate LLVM assembly files

2017-04-24 Thread Matthias Kaehlcke
Webster <beh...@converseincode.com> Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- Changes in v4: - changed 'bitcode' to 'assembly' - removed rule for creating LLVM assembly from machine assembly - added .ll files to clean rule - corrected example command in commit message .gitignore

Re: [PATCH v2] crypto: arm64/sha: Add constant operand modifier to ASM_EXPORT

2017-04-25 Thread Matthias Kaehlcke
El Tue, Apr 25, 2017 at 07:06:30PM +0100 Ard Biesheuvel ha dit: > On 25 April 2017 at 18:39, Matthias Kaehlcke <m...@chromium.org> wrote: > > Hi, > > > > El Tue, Apr 18, 2017 at 04:35:02PM +0100 Ard Biesheuvel ha dit: > > > >> On 18 April

Re: [PATCH] arm64: prefetch: Change assembly to be compatible with gcc and clang

2017-04-27 Thread Matthias Kaehlcke
Hi, Thanks for your comments! El Mon, Apr 24, 2017 at 02:34:47PM +0100 Will Deacon ha dit: > On Thu, Apr 20, 2017 at 09:42:07AM +0100, Mark Rutland wrote: > > On Wed, Apr 19, 2017 at 02:22:11PM -0700, Matthias Kaehlcke wrote: > > > clang fails to build with the current code:

Re: [PATCH v2] arm64: Add ASM modifier for xN register operands

2017-04-28 Thread Matthias Kaehlcke
El Fri, Apr 28, 2017 at 03:33:33PM +0100 Mark Rutland ha dit: > On Fri, Apr 28, 2017 at 08:18:52AM +0100, Ard Biesheuvel wrote: > > On 27 April 2017 at 23:52, Matthias Kaehlcke <m...@chromium.org> wrote: > > > El Thu, Apr 27, 2017 at 12:02:56PM +0100 Mark Rutland ha di

[PATCH RESEND] fs: compat: Remove warning from COMPATIBLE_IOCTL

2017-04-28 Thread Matthias Kaehlcke
Behan Webster <beh...@converseincode.com> Signed-off-by: Matthias Kaehlcke <m...@chromium.org> Acked-by: Arnd Bergmann <a...@arndb.de> --- fs/compat_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 11d087b2b28e..6116d5275a3e 100

[PATCH] regulator: Allow for asymmetric settling times

2017-04-28 Thread Matthias Kaehlcke
Some regulators have different settling times for voltage increases and decreases. To avoid a time penalty on the faster transition extend the settling time property to allow for different settings for upward and downward transitions. Signed-off-by: Matthias Kaehlcke <m...@chromium.

Re: [PATCH v2] arm64: Add ASM modifier for xN register operands

2017-04-27 Thread Matthias Kaehlcke
Hi Mark, Thanks for your comments. El Thu, Apr 27, 2017 at 12:02:56PM +0100 Mark Rutland ha dit: > Hi, > > On Wed, Apr 26, 2017 at 02:46:16PM -0700, Matthias Kaehlcke wrote: > > Many inline assembly statements don't include the 'x' modifier when > > using xN

[PATCH v2] mm: memcontrol: Use int for event/state parameter in several functions

2017-07-28 Thread Matthias Kaehlcke
building the kernel with clang. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- Changes in v2: - also change parameter type of inc/dec/mod_memcg_page_state() include/linux/memcontrol.h | 52 -- mm/memcontrol.c| 4 +++- 2

Re: [PATCH] mm: memcontrol: Use int for event/state parameter in several functions

2017-07-28 Thread Matthias Kaehlcke
El Thu, Jul 27, 2017 at 02:10:04PM -0700 Matthias Kaehlcke ha dit: > Several functions use an enum type as parameter for an event/state, > but are called in some locations with an argument of a different enum > type. Adjust the interface of these functions to reality by changing the &g

[PATCH] zram: Fix buffer size passed to strlcpy()

2017-07-28 Thread Matthias Kaehlcke
comp_algorithm_store() passes the size of the source buffer to strlcpy() instead of the destination buffer size, fix this. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bloc

Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm"

2017-07-28 Thread Matthias Kaehlcke
El Thu, Jul 20, 2017 at 03:56:52PM -0500 Josh Poimboeuf ha dit: > On Thu, Jul 20, 2017 at 06:30:24PM +0300, Andrey Ryabinin wrote: > > FWIW bellow is my understanding of what's going on. > > > > It seems clang treats local named register almost the same as ordinary > > local variables. > > The

Re: [PATCH 1/2] kbuild: Add macros cc-option-3 and __cc-option-3

2017-08-02 Thread Matthias Kaehlcke
El Fri, Jul 21, 2017 at 02:56:56PM -0700 Matthias Kaehlcke ha dit: > The macro cc-option receives two parameters (the second may be empty). It > returns the first parameter if it is a valid compiler option, otherwise > the second one. It is not evaluated if the second parameter i

Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm"

2017-07-28 Thread Matthias Kaehlcke
El Fri, Jul 28, 2017 at 07:55:21PM -0500 Josh Poimboeuf ha dit: > On Fri, Jul 28, 2017 at 05:38:52PM -0700, Matthias Kaehlcke wrote: > > El Thu, Jul 20, 2017 at 03:56:52PM -0500 Josh Poimboeuf ha dit: > > > > > On Thu, Jul 20, 2017 at 06:30:24PM +0300, Andrey Ryabinin wr

[PATCH v2] drm/rockchip: Skip suspend/resume if no display is attached

2017-08-09 Thread Matthias Kaehlcke
pointer. The suspend/resume code relies on a valid drm_device object, skip it if the pointer is NULL. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drive

Re: [PATCH v2] drm/rockchip: Skip suspend/resume if no display is attached

2017-08-09 Thread Matthias Kaehlcke
El Wed, Aug 09, 2017 at 04:03:02PM -0700 Matthias Kaehlcke ha dit: > rockchip_drm_sys_suspend/resume() obains a struct drm_device pointer > from drvdata, the pointer is then dereferenced to obtain private data. > drvdata is set when a display is bound, on systems without a > (success

[PATCH] drm/rockchip: Skip suspend/resume if no display is attached

2017-08-09 Thread Matthias Kaehlcke
pointer. The suspend/resume code relies on a valid drm_device object, skip it if the pointer is NULL. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drive

Re: [PATCH 1/2] kbuild: Add macros cc-option-3 and __cc-option-3

2017-08-07 Thread Matthias Kaehlcke
Hi Masahiro, El Mon, Aug 07, 2017 at 10:01:41AM +0900 Masahiro Yamada ha dit: > Hi Matthias, > > Sorry for my late reply. > > 2017-08-03 1:46 GMT+09:00 Matthias Kaehlcke <m...@chromium.org>: > > El Fri, Jul 21, 2017 at 02:56:56PM -0700 Matthias Kaehlcke ha dit: &

[PATCH] mm: memcontrol: Use int for event/state parameter in several functions

2017-07-27 Thread Matthias Kaehlcke
building the kernel with clang. Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- include/linux/memcontrol.h | 20 mm/memcontrol.c| 4 +++- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/include/linux/memcontrol.h b/include

Re: [PATCH v2 1/2] kbuild: Also evaluate alternative option passed to cc-option, etc

2017-08-16 Thread Matthias Kaehlcke
El Thu, Aug 17, 2017 at 12:03:05AM +0900 Masahiro Yamada ha dit: > Hi Matthias, > > > 2017-08-15 10:29 GMT+09:00 Matthias Kaehlcke <m...@chromium.org>: > > The macro cc-option receives two parameters (the second may be empty). It > > returns the first parameter if

Re: [PATCH v2 1/3] ASoC: rockchip: Parse dai links from dts

2017-08-16 Thread Matthias Kaehlcke
El Thu, Aug 10, 2017 at 12:54:56PM +0800 Jeffy Chen ha dit: > Refactor rockchip_sound_probe, parse dai links from dts instead of > hard coding them. Mark doesn't seem to be overly convinced that 'rockchip,codec-names' is a good idea (https://lkml.org/lkml/2017/8/10/511). How about using

Re: [PATCH v2 1/3] ASoC: rockchip: Parse dai links from dts

2017-08-16 Thread Matthias Kaehlcke
El Thu, Aug 17, 2017 at 06:55:20AM +0800 jeffy ha dit: > hi matthias, > > thanks for your suggestion. > > On 08/17/2017 05:59 AM, Matthias Kaehlcke wrote: > >El Thu, Aug 10, 2017 at 12:54:56PM +0800 Jeffy Chen ha dit: > > > >>>Refactor rockchip_sound_

Clang patch stacks for LTS kernels (v4.4 and v4.9) and status update

2017-08-22 Thread Matthias Kaehlcke
Hi, Over the past months efforts have been made to upstream the remaining LLVMLinux patches (http://llvm.linuxfoundation.org) and to address other outstanding issues in order to build a usable kernel with clang. To my knowledge upstream is in a relatively good shape by now for x86 and arm64 (I

Re: [tip:x86/build 2/2] kernel/bounds.c:1: error: -mpreferred-stack-boundary=3 is not between 4 and 12

2017-08-17 Thread Matthias Kaehlcke
El Thu, Aug 17, 2017 at 10:13:20PM +0800 kbuild test robot ha dit: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/build > head: 8f91869766c00622b2eaa8ee567db4f333b78c1a > commit: 8f91869766c00622b2eaa8ee567db4f333b78c1a [2/2] x86/build: Fix stack > alignment for

[PATCH] x86/build: Use cc-option to validate stack alignment parameter

2017-08-17 Thread Matthias Kaehlcke
older gcc versions which only support stack alignment on a boundary of 16 bytes or higher. Also use (__)cc_option to add the stack alignment option to CFLAGS to make sure only valid options are added. Fixes: 8f91869766c0 ("x86/build: Fix stack alignment for CLang") Signed-off-by:

[PATCH v2] x86/mm/kaslr: Use _ASM_MUL macro for multiplication

2017-05-01 Thread Matthias Kaehlcke
nstruction Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- Changes in v2: - updated commit message with additional details arch/x86/include/asm/asm.h | 1 + arch/x86/lib/kaslr.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/asm.h b/

Re: [PATCH] arm64: Fix multiple 'asm-operand-widths' warnings

2017-05-02 Thread Matthias Kaehlcke
Hi, El Tue, May 02, 2017 at 06:29:48PM +0100 Mark Rutland ha dit: > On Mon, May 01, 2017 at 02:26:22PM -0700, Matthias Kaehlcke wrote: > > diff --git a/arch/arm64/include/asm/uaccess.h > > b/arch/arm64/include/asm/uaccess.h > > index 5308d696311b..7db143689694 100644

Re: [PATCH] arm64: Fix multiple 'asm-operand-widths' warnings

2017-05-02 Thread Matthias Kaehlcke
Hi Mark, El Tue, May 02, 2017 at 11:27:18AM +0100 Mark Rutland ha dit: > On Mon, May 01, 2017 at 02:26:22PM -0700, Matthias Kaehlcke wrote: > > clang raises 'asm-operand-widths' warnings in inline assembly code when > > the size of an operand is < 64 bits and the operand wi

[PATCH] efi/libstub: Indicate clang the relocation mode for arm64

2017-05-09 Thread Matthias Kaehlcke
; Signed-off-by: Bernhard Rosenkränzer <bernhard.rosenkran...@linaro.org> Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- drivers/firmware/efi/libstub/Makefile | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/ef

Re: [PATCH] efi/libstub: Indicate clang the relocation mode for arm64

2017-05-09 Thread Matthias Kaehlcke
El Tue, May 09, 2017 at 01:50:36PM -0700 Greg Hackmann ha dit: > On 05/09/2017 12:36 PM, Matthias Kaehlcke wrote: > >From: Greg Hackmann <ghackm...@google.com> > > > >Without any extra guidance, clang will generate libstub with either > >absolute or relati

Re: [PATCH] efi/libstub: Indicate clang the relocation mode for arm64

2017-05-10 Thread Matthias Kaehlcke
Hoi Ard, El Wed, May 10, 2017 at 08:51:44AM +0100 Ard Biesheuvel ha dit: > On 9 May 2017 at 22:49, Matthias Kaehlcke <m...@chromium.org> wrote: > > El Tue, May 09, 2017 at 01:50:36PM -0700 Greg Hackmann ha dit: > > > >> On 05/09/2017 12:36 PM, Matthias Kaehlcke wr

Re: [PATCH] efi/libstub: Indicate clang the relocation mode for arm64

2017-05-17 Thread Matthias Kaehlcke
El Thu, May 11, 2017 at 02:51:48PM +0100 Ard Biesheuvel ha dit: > (adding Arnd and Will to cc, who are likely to have an opinion as to > which GCC is the oldest we need to support for arm64) > > On 10 May 2017 at 20:47, Matthias Kaehlcke <m...@chromium.org> wrote: > > El

Re: frv build failure in mainline kernel

2017-05-15 Thread Matthias Kaehlcke
El Mon, May 15, 2017 at 10:02:15AM -0700 Guenter Roeck ha dit: > Hi all, > > frv fails to build in mainline with the following build errors. > > kernel/built-in.o: In function `__do_softirq': > (.text+0x6460): relocation truncated to fit: R_FRV_GPREL12 against symbol > `jiffies' defined in

Re: [PATCH 2/2] kbuild: clang: Disable the 'duplicate-decl-specifier' warning

2017-05-17 Thread Matthias Kaehlcke
El Wed, May 17, 2017 at 09:35:57AM +0200 Arnd Bergmann ha dit: > On Tue, May 16, 2017 at 11:41 PM, Doug Anderson <diand...@chromium.org> wrote: > > Hi > > > > On Fri, Apr 21, 2017 at 2:39 PM, Matthias Kaehlcke <m...@chromium.org> > > wrote: > &

[PATCH] r8152: Mark usb_ocp_read() as __maybe_unused

2017-05-17 Thread Matthias Kaehlcke
The function is not used, but is probably kept around for debugging and symmetry with usb_ocp_write(). Adding the attribute fixes the following clang warning: drivers/net/usb/r8152.c:825:5: error: unused function 'usb_ocp_read' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke &l

[PATCH] net1080: Mark nc_dump_ttl() as __maybe_unused

2017-05-17 Thread Matthias Kaehlcke
The function is not used, but it looks useful for debugging. Adding the attribute fixes the following clang warning: drivers/net/usb/net1080.c:271:20: error: unused function 'nc_dump_ttl' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- drivers/n

[PATCH] phy-rockchip-pcie: Mark phy_rd_cfg() as __maybe_unused

2017-05-17 Thread Matthias Kaehlcke
-by: Matthias Kaehlcke <m...@chromium.org> --- drivers/phy/phy-rockchip-pcie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-rockchip-pcie.c b/drivers/phy/phy-rockchip-pcie.c index 6904633cad68..f8c6846094c0 100644 --- a/drivers/phy/phy-rockchip-pcie.c

[PATCH] ring-buffer: Remove unused function __rb_data_page_index()

2017-05-17 Thread Matthias Kaehlcke
This fixes the following warning when building with clang: kernel/trace/ring_buffer.c:1842:1: error: unused function '__rb_data_page_index' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke <m...@chromium.org> --- kernel/trace/ring_buffer.c | 6 -- 1 file changed, 6 del

Re: frv build failure in mainline kernel

2017-05-16 Thread Matthias Kaehlcke
El Tue, May 16, 2017 at 10:21:30AM -0700 Guenter Roeck ha dit: > On Tue, May 16, 2017 at 05:04:32PM +0100, David Howells wrote: > > Guenter Roeck wrote: > > > > > Turns out not here because cacheline_aligned_in_smp includes > > > __page_aligned_data which also declares

Re: [PATCH v2 2/2] regulator: Allow for asymmetric settling times

2017-05-15 Thread Matthias Kaehlcke
El Sun, May 14, 2017 at 07:16:52PM +0900 Mark Brown ha dit: > On Mon, May 01, 2017 at 11:37:15AM -0700, Matthias Kaehlcke wrote: > > > else if (rdev->constraints->settling_time) > > return rdev->constraints->settling_time; > > + else if

Re: [PATCH] efi/libstub: Indicate clang the relocation mode for arm64

2017-05-10 Thread Matthias Kaehlcke
El Wed, May 10, 2017 at 09:05:28PM +0200 Ard Biesheuvel ha dit: > > > > On 10 May 2017, at 20:38, Matthias Kaehlcke <m...@chromium.org> wrote: > > > > Hoi Ard, > > > > El Wed, May 10, 2017 at 08:51:44AM +0100 Ard Biesheuvel ha dit: > > &

Re: [PATCH] x86/build: Specify stack alignment for clang

2017-06-12 Thread Matthias Kaehlcke
El Sat, Jun 10, 2017 at 09:03:59AM +0200 Ingo Molnar ha dit: > > * Matthias Kaehlcke <m...@chromium.org> wrote: > > > For gcc stack alignment is configured with -mpreferred-stack-boundary=N, > > clang has the option -mstack-alignment=N for that purpose. Use the sa

Re: [PATCH] x86/build: Specify stack alignment for clang

2017-06-12 Thread Matthias Kaehlcke
El Mon, Jun 12, 2017 at 09:17:14AM -0700 Matthias Kaehlcke ha dit: > El Sat, Jun 10, 2017 at 09:03:59AM +0200 Ingo Molnar ha dit: > > > > > * Matthias Kaehlcke <m...@chromium.org> wrote: > > > > > For gcc stack alignment is configured with -mpref

[PATCH 2/3] x86/build: Use cc-option-no-kbuild for boot code compiler options

2017-06-12 Thread Matthias Kaehlcke
instead of using KBUILD_C*FLAGS. For the boot code we pass REALMODE_CFLAGS. Also use separate statements for the cc-option-no-kbuild checks instead of performing them in the initial assignment of REALMODE_CFLAGS since the variable is an input of the macro. Signed-off-by: Matthias Kaehlcke &l

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