Re: [PATCH v6] taskstats: fix data-race

2019-10-21 Thread Rasmus Villemoes
On 21/10/2019 13.33, Christian Brauner wrote: > The first approach used smp_load_acquire() and smp_store_release(). > However, after having discussed this it seems that the data dependency > for kmem_cache_alloc() would be fixed by WRITE_ONCE(). > Furthermore, the smp_load_acquire() would only mana

Re: [PATCH 0/7] towards QE support on ARM

2019-10-21 Thread Rasmus Villemoes
On 18/10/2019 23.52, Li Yang wrote: > On Fri, Oct 18, 2019 at 3:54 PM Rasmus Villemoes > wrote: >> >> On 18/10/2019 22.16, Leo Li wrote: >>> >>>> >>>> There have been several attempts in the past few years to allow building >>>> the

Re: [PATCH 0/7] towards QE support on ARM

2019-10-18 Thread Rasmus Villemoes
On 18/10/2019 22.16, Leo Li wrote: > >> >> There have been several attempts in the past few years to allow building the >> QUICC engine drivers for platforms other than PPC. This is (the beginning of) >> yet another attempt. I hope I can get someone to pick up these relatively >> trivial patches (

[PATCH 6/7] serial: ucc_uart.c: explicitly include asm/cpm.h

2019-10-18 Thread Rasmus Villemoes
This driver uses #defines from asm/cpm.h, so instead of relying on some other header pulling that in, do that explicitly. Signed-off-by: Rasmus Villemoes --- drivers/tty/serial/ucc_uart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial

[PATCH 5/7] serial: make SERIAL_QE depend on PPC32

2019-10-18 Thread Rasmus Villemoes
rt in drivers/soc/fsl/qe, while preventing allmodconfig/randconfig failures due to SERIAL_QE not being supported yet. Signed-off-by: Rasmus Villemoes --- drivers/tty/serial/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig

[PATCH 7/7] soc/fsl/qe/qe.h: remove include of asm/cpm.h

2019-10-18 Thread Rasmus Villemoes
asm/cpm.h only exists on PPC, so this prevents use of this header on other platforms. Drivers that need asm/cpm.h (and are thus inherently PPC-specific) must include that explicitly. Signed-off-by: Rasmus Villemoes --- include/soc/fsl/qe/qe.h | 1 - 1 file changed, 1 deletion(-) diff --git a

[PATCH 2/7] soc: fsl: qe: drop volatile qualifier of struct qe_ic::regs

2019-10-18 Thread Rasmus Villemoes
The actual io accessors (e.g. in_be32) implicitly add a volatile qualifier to their address argument. Remove volatile from the struct definition and the qe_ic_(read/write) helpers, in preparation for switching from the ppc-specific io accessors to generic ones. Signed-off-by: Rasmus Villemoes

[PATCH 0/7] towards QE support on ARM

2019-10-18 Thread Rasmus Villemoes
t all), and then I'll continue slowly working towards removing the PPC32 dependency for CONFIG_QUICC_ENGINE. Tested on an MPC8309-derived board. Rasmus Villemoes (7): soc: fsl: qe: remove space-before-tab soc: fsl: qe: drop volatile qualifier of struct qe_ic::regs soc: fsl: qe: avoid pp

[PATCH 3/7] soc: fsl: qe: avoid ppc-specific io accessors

2019-10-18 Thread Rasmus Villemoes
; @@ - clrbits8(addr, clr) + qe_clrbits8(addr, clr) Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/gpio.c | 30 drivers/soc/fsl/qe/qe.c | 35 +-- drivers/soc/fsl/qe/qe_ic.c| 4 +-- drivers/soc/fsl/qe/qe_io.c| 40 ++--- drivers

[PATCH 1/7] soc: fsl: qe: remove space-before-tab

2019-10-18 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index 417df7e19281..6fcbfad408de 100644 --- a/drivers/soc/fsl/qe/qe.c +++ b/drivers/soc/fsl/qe/qe.c @@ -378,8

[PATCH 4/7] soc: fsl: qe: replace spin_event_timeout by readx_poll_timeout_atomic

2019-10-18 Thread Rasmus Villemoes
In preparation for allowing QE to be built for architectures other than ppc, use the generic readx_poll_timeout_atomic() helper from iopoll.h rather than the ppc-only spin_event_timeout(). Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 13 +++-- 1 file changed, 7

Re: [RFC PATCH 0/3] watchdog servicing during decompression

2019-10-17 Thread Rasmus Villemoes
On 17/10/2019 14.03, Russell King - ARM Linux admin wrote: > We used to have this on ARM - it was called from the decompressor > code via an arch_decomp_wdog() hook. > > That code got removed because it is entirely unsuitable for a multi- > platform kernel. This looks like it takes an address for

[RFC PATCH 2/3] lib: lz4: wire up watchdog keepalive during decompression

2019-10-17 Thread Rasmus Villemoes
, the decompression routine needs to service the watchdog in its main loop. This wires up lz4 to do that via the decompress_keepalive() macro defined in the new linux/decompress/keepalive.h. Signed-off-by: Rasmus Villemoes --- lib/lz4/lz4_decompress.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[RFC PATCH 0/3] watchdog servicing during decompression

2019-10-17 Thread Rasmus Villemoes
fact suffices for all the various boards I've come across): An external watchdog serviced by toggling a gpio, with the value of that gpio being settable in a memory-mapped register. Rasmus Villemoes (3): decompress/keepalive.h: prepare for watchdog keepalive during kernel decompression

[RFC PATCH 3/3] decompress/keepalive.h: add config option for toggling a set of bits

2019-10-17 Thread Rasmus Villemoes
rage user. Signed-off-by: Rasmus Villemoes --- include/linux/decompress/keepalive.h | 8 +++ init/Kconfig | 33 2 files changed, 41 insertions(+) diff --git a/include/linux/decompress/keepalive.h b/include/linux/decompress/keepalive.h index 3

[RFC PATCH 1/3] decompress/keepalive.h: prepare for watchdog keepalive during kernel decompression

2019-10-17 Thread Rasmus Villemoes
, the decompression routine needs to service the watchdog in its main loop. This adds a header making it easy to wire up each decompressor - just include this header and add a decompress_keepalive() in the main loop. Outside of the pre-boot stage, this is always a no-op. Signed-off-by: Rasmus Vill

Re: [RFC PATCH 03/21] pipe: Use head and tail pointers for the ring, not cursor and length

2019-10-16 Thread Rasmus Villemoes
On 15/10/2019 23.48, David Howells wrote: > Convert pipes to use head and tail pointers for the buffer ring rather than > pointer and length as the latter requires two atomic ops to update (or a > combined op) whereas the former only requires one. > > (1) The head pointer is the point at which pr

Re: [PATCH v4 1/1] printf: add support for printing symbolic error names

2019-10-15 Thread Rasmus Villemoes
On 14/10/2019 15.02, Petr Mladek wrote: > On Fri 2019-10-11 15:36:17, Rasmus Villemoes wrote: >> It has been suggested several times to extend vsnprintf() to be able >> to convert the numeric value of ENOSPC to print "ENOSPC". This >> implements that as a %p

[PATCH v4 1/1] printf: add support for printing symbolic error names

2019-10-11 Thread Rasmus Villemoes
of find arch include -iname 'errno*.h' | xargs grep -E 'define\s*E' In the cases where some common aliasing exists (e.g. EAGAIN=EWOULDBLOCK on all platforms, EDEADLOCK=EDEADLK on most), I've moved the more popular one (in terms of 'git grep -w Efoo | wc) to the

[PATCH v4 0/1] printf: add support for printing symbolic error names

2019-10-11 Thread Rasmus Villemoes
that it's perhaps easier to recognize for a kernel developer) just speak up. I've also given some thought to Petr's suggestion of how to improve the handling of ERR_PTRs that are accidentally passed to %p. But I'll do that as a separate series on top - for now I think this shou

Re: [PATCH] string.h: Mark 34 functions with __must_check

2019-10-10 Thread Rasmus Villemoes
On 09/10/2019 18.31, Nick Desaulniers wrote: > On Wed, Oct 9, 2019 at 7:30 AM Dan Carpenter wrote: >> >> On Wed, Oct 09, 2019 at 04:21:20PM +0200, Rasmus Villemoes wrote: >>> On 09/10/2019 15.56, Dan Carpenter wrote: >>>> That's because glibc strlen i

Re: [PATCH] string.h: Mark 34 functions with __must_check

2019-10-09 Thread Rasmus Villemoes
On 09/10/2019 15.56, Dan Carpenter wrote: > [ I haven't reviewed the original patch ] > > On Wed, Oct 09, 2019 at 03:26:18PM +0200, Rasmus Villemoes wrote: >> On 09/10/2019 14.14, Markus Elfring wrote: >>> From: Markus Elfring >>> Date: Wed, 9 Oct 2019 13

Re: [PATCH] string.h: Mark 34 functions with __must_check

2019-10-09 Thread Rasmus Villemoes
On 09/10/2019 14.14, Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 9 Oct 2019 13:53:59 +0200 > > Several functions return values with which useful data processing > should be performed. These values must not be ignored then. > Thus use the annotation “__must_check” in the shown functi

[PATCH] kernel/cred.c: make init_groups static

2019-10-09 Thread Rasmus Villemoes
init_groups is declared in both cred.h and init_task.h, but it is not actually referenced anywhere outside of cred.c where it is defined. So make it static and remove the declarations. Signed-off-by: Rasmus Villemoes --- include/linux/cred.h | 1 - include/linux/init_task.h | 1 - kernel

Re: [PATCH] kernel/groups.c: use bsearch library function

2019-10-09 Thread Rasmus Villemoes
On 07/10/2019 21.26, Thomas Meyer wrote: > commit b7b2562f7252 ("kernel/groups.c: use sort library function") > introduced the sort library function. > also use the bsearch library function instead of open-coding the binary > search. Yes, but please note the difference between sorting the group_in

Re: [PATCH 1/2] x86: mmu.h: move mm_context_t::lock member inside CONFIG_MODIFY_LDT_SYSCALL

2019-10-07 Thread Rasmus Villemoes
On 28/08/2019 21.38, Rasmus Villemoes wrote: > The placement of the lock member in mm_context_t suggests that it is > used to protect the vdso* members, but AFAICT, it is only ever used > under #ifdef CONFIG_MODIFY_LDT_SYSCALL. So guarding the member by the > same config option is a

[PATCH v2 2/6] pwm: mxs: remove legacy methods

2019-10-04 Thread Rasmus Villemoes
Since we now have ->apply, these are no longer relevant. Signed-off-by: Rasmus Villemoes --- drivers/pwm/pwm-mxs.c | 77 --- 1 file changed, 77 deletions(-) diff --git a/drivers/pwm/pwm-mxs.c b/drivers/pwm/pwm-mxs.c index 10efd3de0bb3..5a6835e18

[PATCH v2 4/6] dt-bindings: pwm: mxs-pwm: Increase #pwm-cells

2019-10-04 Thread Rasmus Villemoes
We need to increase the pwm-cells for the optional flags parameter, in order to implement support for polarity setting via DT. Acked-by: Rob Herring Signed-off-by: Rasmus Villemoes --- Documentation/devicetree/bindings/pwm/mxs-pwm.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH v2 6/6] pwm: update comment on struct pwm_ops::apply

2019-10-04 Thread Rasmus Villemoes
Commit 71523d1812ac (pwm: Ensure pwm_apply_state() doesn't modify the state argument) updated the kernel-doc for pwm_apply_state(), but not for the ->apply callback in the pwm_ops struct. Signed-off-by: Rasmus Villemoes --- include/linux/pwm.h | 5 + 1 file changed, 1 inserti

[PATCH v2 5/6] pwm: mxs: avoid a division in mxs_pwm_apply()

2019-10-04 Thread Rasmus Villemoes
constant. Signed-off-by: Rasmus Villemoes --- drivers/pwm/pwm-mxs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pwm/pwm-mxs.c b/drivers/pwm/pwm-mxs.c index 57562221c439..f2e57fcf8f8b 100644 --- a/drivers/pwm/pwm-mxs.c +++ b/drivers/pwm/pwm-mxs.c @@ -33,8

[PATCH v2 0/6] pwm: mxs: add support for setting polarity via DT

2019-10-04 Thread Rasmus Villemoes
re had changed. Rasmus Villemoes (6): pwm: mxs: implement ->apply pwm: mxs: remove legacy methods pwm: mxs: add support for inverse polarity dt-bindings: pwm: mxs-pwm: Increase #pwm-cells pwm: mxs: avoid a division in mxs_pwm_apply() pwm: update comment on struct pwm_ops::app

[PATCH v2 1/6] pwm: mxs: implement ->apply

2019-10-04 Thread Rasmus Villemoes
In preparation for supporting setting the polarity, switch the driver to support the ->apply method. Signed-off-by: Rasmus Villemoes --- drivers/pwm/pwm-mxs.c | 70 +++ 1 file changed, 70 insertions(+) diff --git a/drivers/pwm/pwm-mxs.c b/drivers/pwm/

[PATCH v2 3/6] pwm: mxs: add support for inverse polarity

2019-10-04 Thread Rasmus Villemoes
If I'm reading of_pwm_xlate_with_flags() right, existing device trees that set #pwm-cells = 2 will continue to work. Signed-off-by: Rasmus Villemoes --- drivers/pwm/pwm-mxs.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/pwm/pwm-mxs.c b/driver

[PATCH] clk: mark clk_disable_unused() as __init

2019-10-04 Thread Rasmus Villemoes
clk_disable_unused is only called once, as a late_initcall, so reclaim a bit of memory by marking it (and the functions and data it is the sole user of) as __init/__initdata. This moves ~1900 bytes from .text to .init.text for a imx_v6_v7_defconfig. Signed-off-by: Rasmus Villemoes --- drivers

Re: x86/purgatory: undefined symbol __stack_chk_fail

2019-09-28 Thread Rasmus Villemoes
On 03/09/2019 17.50, Andreas Smas wrote: > Hi, > > For me, kernels built including this commit > b059f801a937 (x86/purgatory: Use CFLAGS_REMOVE rather than reset > KBUILD_CFLAGS) > > results in kexec() failing to load the kernel: > > kexec: Undefined symbol: __stack_chk_fail > kexec-bzImage64:

Re: [PATCH v6 2/2] dt/bindings: Add bindings for Layerscape external irqs

2019-09-27 Thread Rasmus Villemoes
On 27/09/2019 18.11, Rob Herring wrote: > On Mon, Sep 23, 2019 at 12:15:13PM +0200, Kurt Kanzenbach wrote: >> From: Rasmus Villemoes >> >> This adds Device Tree binding documentation for the external interrupt >> lines with configurable polarity present on some Layers

Re: [PATCH 4/7] module: avoid code duplication in include/linux/export.h

2019-09-27 Thread Rasmus Villemoes
On 27/09/2019 11.36, Masahiro Yamada wrote: > include/linux/export.h has lots of code duplication between > EXPORT_SYMBOL and EXPORT_SYMBOL_NS. > > To improve the maintainability and readability, unify the > implementation. > > When the symbol has no namespace, pass the empty string "" to > the '

Re: [PATCH V2 1/2] string: Add stracpy and stracpy_pad mechanisms

2019-09-26 Thread Rasmus Villemoes
On 26/09/2019 10.25, Stephen Kitt wrote: > Le 26/09/2019 09:29, Rasmus Villemoes a écrit : >> On 26/09/2019 02.01, Stephen Kitt wrote: >>> Le 25/09/2019 23:50, Andrew Morton a écrit : >>>> On Tue, 23 Jul 2019 06:51:36 -0700 Joe Perches wrote: >>>> >

Re: [PATCH V2 1/2] string: Add stracpy and stracpy_pad mechanisms

2019-09-26 Thread Rasmus Villemoes
On 26/09/2019 02.01, Stephen Kitt wrote: > Le 25/09/2019 23:50, Andrew Morton a écrit : >> On Tue, 23 Jul 2019 06:51:36 -0700 Joe Perches wrote: >> >>> Several uses of strlcpy and strscpy have had defects because the >>> last argument of each function is misused or typoed. >>> >>> Add macro mechan

[PATCH] pinctrl: devicetree.c: remove orphan pinctrl_dt_has_hogs()

2019-09-23 Thread Rasmus Villemoes
The helper pinctrl_dt_has_hogs() was introduced in 99e4f67508e1 (pinctrl: core: Use delayed work for hogs), but the sole use then got removed shortly after in 950b0d91dc10 (pinctrl: core: Fix regression caused by delayed work for hogs). Signed-off-by: Rasmus Villemoes --- drivers/pinctrl

Re: [PATCH 1/4] pwm: mxs: implement ->apply

2019-09-23 Thread Rasmus Villemoes
On 23/09/2019 10.24, Uwe Kleine-König wrote: > Hello Rasmus, > > On Mon, Sep 23, 2019 at 10:13:45AM +0200, Rasmus Villemoes wrote: >> In preparation for supporting setting the polarity, switch the driver >> to support the ->apply method. >> > > Maybe it would

Re: [PATCH 3/4] pwm: mxs: add support for inverse polarity

2019-09-23 Thread Rasmus Villemoes
On 23/09/2019 10.27, Uwe Kleine-König wrote: > On Mon, Sep 23, 2019 at 10:13:47AM +0200, Rasmus Villemoes wrote: >> >> >> +pol_bits = state->polarity == PWM_POLARITY_NORMAL ? >> +PERIOD_POLARITY_NORMAL : PERIOD_POLARITY_INVERSE; >>

[PATCH 0/4] pwm: mxs: add support for setting polarity via DT

2019-09-23 Thread Rasmus Villemoes
7 and 8a88b2a2017d1e7e80db53080baff591fd454722, while arch/arm/boot/dts/bcm283x.dtsi still has #pwm-cells = <2>. Rasmus Villemoes (4): pwm: mxs: implement ->apply pwm: mxs: remove legacy methods pwm: mxs: add support for inverse polarity dt-bindings: pwm: mxs-pwm: Increase #pwm-cells .../devicetree/bindings/p

[PATCH 3/4] pwm: mxs: add support for inverse polarity

2019-09-23 Thread Rasmus Villemoes
If I'm reading of_pwm_xlate_with_flags() right, existing device trees that set #pwm-cells = 2 will continue to work. Signed-off-by: Rasmus Villemoes --- drivers/pwm/pwm-mxs.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/pwm/pwm-mxs.c b/driver

[PATCH 1/4] pwm: mxs: implement ->apply

2019-09-23 Thread Rasmus Villemoes
In preparation for supporting setting the polarity, switch the driver to support the ->apply method. Signed-off-by: Rasmus Villemoes --- drivers/pwm/pwm-mxs.c | 62 +++ 1 file changed, 62 insertions(+) diff --git a/drivers/pwm/pwm-mxs.c b/drivers/pwm/

[PATCH 4/4] dt-bindings: pwm: mxs-pwm: Increase #pwm-cells

2019-09-23 Thread Rasmus Villemoes
We need to increase the pwm-cells for the optional flags parameter, in order to implement support for polarity setting via DT. Signed-off-by: Rasmus Villemoes --- Documentation/devicetree/bindings/pwm/mxs-pwm.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH 2/4] pwm: mxs: remove legacy methods

2019-09-23 Thread Rasmus Villemoes
Since we now have ->apply, these are no longer relevant. Signed-off-by: Rasmus Villemoes --- drivers/pwm/pwm-mxs.c | 77 --- 1 file changed, 77 deletions(-) diff --git a/drivers/pwm/pwm-mxs.c b/drivers/pwm/pwm-mxs.c index c70c26a9ff68..284107784

Re: INFO: task hung in pipe_write (2)

2019-09-19 Thread Rasmus Villemoes
On 19/09/2019 19.19, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:    288b9117 Add linux-next specific files for 20190918 > git tree:   linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=17e8664560 > kernel config:  https://syzkaller.

[PATCH] pwm: rockchip: simplify rockchip_pwm_get_state()

2019-09-19 Thread Rasmus Villemoes
The way state->enabled is computed is rather convoluted and hard to read - both branches of the if() actually do the exact same thing. So remove the if(), and further simplify " ? true : false" to "". Signed-off-by: Rasmus Villemoes --- I stumbled on this while trying to

Re: Linux 5.3-rc8

2019-09-18 Thread Rasmus Villemoes
On 17/09/2019 22.58, Linus Torvalds wrote: > Side note, and entirely unrelated to this particular problem, but > _because_ I was looking at the entropy init and sources of randomness > we have, I notice that we still don't use the ToD clock as a source. And unrelated to the non-use of the RTC (whi

Re: [RFC] Improve memset

2019-09-16 Thread Rasmus Villemoes
On 13/09/2019 18.36, Borislav Petkov wrote: > On Fri, Sep 13, 2019 at 12:42:32PM +0200, Borislav Petkov wrote: >> Or should we talk to Intel hw folks about it... > > Or, I can do something like this, while waiting. Benchmark at the end. > > The numbers are from a KBL box: > > model : 1

Re: [RFC] Improve memset

2019-09-13 Thread Rasmus Villemoes
On 13/09/2019 11.00, Linus Torvalds wrote: > On Fri, Sep 13, 2019 at 8:22 AM Borislav Petkov wrote: >> >> since the merge window is closing in and y'all are on a conference, I >> thought I should take another stab at it. It being something which Ingo, >> Linus and Peter have suggested in the past

Re: [RFC] Improve memset

2019-09-13 Thread Rasmus Villemoes
On 13/09/2019 09.22, Borislav Petkov wrote: > > Instead of calling memset: > > 8100cd8d: e8 0e 15 7a 00 callq 817ae2a0 > <__memset> > > and having a JMP inside it depending on the feature supported, let's simply > have the REP; STOSB directly in the code: > > ..

Re: [PATCH v3 0/6] make use of gcc 9's "asm inline()"

2019-09-12 Thread Rasmus Villemoes
On 13/09/2019 00.30, Miguel Ojeda wrote: > On Fri, Sep 13, 2019 at 12:19 AM Rasmus Villemoes > wrote: >> >> Patch 1 has already been picked up by Greg in staging-next, it's >> included here for completeness. I don't know how to route the rest, or >> if t

[PATCH v3 4/6] compiler-types.h: add asm_inline definition

2019-09-12 Thread Rasmus Villemoes
ttributes, making gcc barf if one literally does "asm inline()". However, the third spelling __inline is available for referring to the bare keyword. [2] https://lore.kernel.org/lkml/20190907001411.gg9...@gate.crashing.org/ [3] https://lore.kernel.org/lkml/1544695154-15250-1-git-send

[PATCH v3 3/6] compiler_types.h: don't #define __inline

2019-09-12 Thread Rasmus Villemoes
that?), and the ACPI_INLINE macro is only used in the definition of utterly trivial stub functions, where I doubt a small change of semantics (lack of __gnu_inline) changes anything. Signed-off-by: Rasmus Villemoes --- include/linux/compiler_types.h | 11 ++- 1 file changed, 10 insertions

[PATCH v3 6/6] x86: bug.h: use asm_inline in _BUG_FLAGS definitions

2019-09-12 Thread Rasmus Villemoes
5203068 1630280 265426781950256 vmlinux.after while bloat-o-meter says add/remove: 10/28 grow/shrink: 103/51 up/down: 3669/-2854 (815) ... Total: Before=14783683, After=14784498, chg +0.01% Signed-off-by: Rasmus Villemoes --- arch/x86/include/asm/bug.h | 4 ++-- 1 file changed, 2 insert

[PATCH v3 2/6] lib/zstd/mem.h: replace __inline by inline

2019-09-12 Thread Rasmus Villemoes
uaranteed to be in effect whenever ZSTD_STATIC is expanded. Signed-off-by: Rasmus Villemoes --- lib/zstd/mem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/zstd/mem.h b/lib/zstd/mem.h index 3a0f34c8706c..93d7a2c377fe 100644 --- a/lib/zstd/mem.h +++ b/lib/zstd/mem.h

[PATCH v3 5/6] x86: alternative.h: use asm_inline for all alternative variants

2019-09-12 Thread Rasmus Villemoes
statement. New enough versions of gcc allow one to overrule the estimated size by using "asm inline" instead of just "asm". So replace asm by the helper asm_inline, which for older gccs just expands to asm. Signed-off-by: Rasmus Villemoes --- arch/x86/include/as

[PATCH v3 1/6] staging: rtl8723bs: replace __inline by inline

2019-09-12 Thread Rasmus Villemoes
Currently, __inline is #defined as inline in compiler_types.h, so this should not change functionality. It is preparation for removing said #define. While at it, change some "inline static" to the customary "static inline" order. Signed-off-by: Rasmus Villemoes --- drive

[PATCH v3 0/6] make use of gcc 9's "asm inline()"

2019-09-12 Thread Rasmus Villemoes
that gcc has. Patch 1 has already been picked up by Greg in staging-next, it's included here for completeness. I don't know how to route the rest, or if they should simply wait for 5.5 given how close we are to the merge window for 5.4. Rasmus Villemoes (6): staging: rtl8723bs: replace

Re: [PATCH] Staging: octeon: Avoid several usecases of strcpy

2019-09-11 Thread Rasmus Villemoes
On 11/09/2019 11.16, Dan Carpenter wrote: > On Wed, Sep 11, 2019 at 11:04:38AM +0200, Sandro Volery wrote: >> >> >>> On 11 Sep 2019, at 10:52, Dan Carpenter wrote: >>> >>> On Wed, Sep 11, 2019 at 08:23:59AM +0200, Sandro Volery wrote: strcpy was used multiple times in strcpy to write into de

Re: [PATCH] Staging: exfat: Avoid use of strcpy

2019-09-11 Thread Rasmus Villemoes
On 11/09/2019 10.41, Dan Carpenter wrote: > On Wed, Sep 11, 2019 at 07:57:49AM +0200, Sandro Volery wrote: >> Replaced strcpy with strscpy in exfat_core.c. >> >> Signed-off-by: Sandro Volery >> --- >> drivers/staging/exfat/exfat_core.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >

Re: [PATCH 1/5] mm, slab: Make kmalloc_info[] contain all types of names

2019-09-09 Thread Rasmus Villemoes
On 09/09/2019 18.53, Pengfei Li wrote: > On Mon, Sep 9, 2019 at 10:59 PM Vlastimil Babka wrote: >>> /* >>>* kmalloc_info[] is to make slub_debug=,kmalloc-xx option work at boot >>> time. >>>* kmalloc_index() supports up to 2^26=64MB, so the final entry of the >>> table is >>>* kma

Re: [PATCH v2 4/6] compiler-gcc.h: add asm_inline definition

2019-09-05 Thread Rasmus Villemoes
On 05/09/2019 15.45, Segher Boessenkool wrote: > Hi Rasmus, > > On Thu, Sep 05, 2019 at 01:07:11PM +0200, Rasmus Villemoes wrote: >> On 05/09/2019 02.18, Nick Desaulniers wrote: >>> Is it too late to ask for a feature test macro? Maybe one already >>> exists

Re: [PATCH] printf: add support for printing symbolic error codes

2019-09-05 Thread Rasmus Villemoes
On 04/09/2019 18.28, Uwe Kleine-König wrote: > On 9/4/19 6:19 PM, Andy Shevchenko wrote: >> On Sat, Aug 31, 2019 at 12:48 AM Rasmus Villemoes >> wrote: >>> >> >>> +/* >>> + * Ensure these tables to not accidentally become gigantic if some >>&g

Re: [PATCH v2 3/6] compiler_types.h: don't #define __inline

2019-09-05 Thread Rasmus Villemoes
On 05/09/2019 02.13, Nick Desaulniers wrote: > On Fri, Aug 30, 2019 at 4:15 PM Rasmus Villemoes > wrote: >> > > Besides patch 1 and 2 of this series, I also see: > Documentation/trace/tracepoint-analysis.rst > 318: : extern __inline void > __

Re: [PATCH v2 2/6] lib/zstd/mem.h: replace __inline by inline

2019-09-05 Thread Rasmus Villemoes
On 05/09/2019 02.07, Miguel Ojeda wrote: > On Thu, Sep 5, 2019 at 2:00 AM Nick Desaulniers > wrote: >> >> While you're here, would you mind replacing `__attribute__((unused))` >> with `__unused`? I would consider "naked attributes" (haven't been >> feature tested in include/linux/compiler_attrib

Re: [PATCH] printf: add support for printing symbolic error codes

2019-09-04 Thread Rasmus Villemoes
On 02/09/2019 17.29, Uwe Kleine-König wrote: > Hello Rasmus, > > On 8/30/19 11:46 PM, Rasmus Villemoes wrote: >> It has been suggested several times to extend vsnprintf() to be able >> to convert the numeric value of ENOSPC to print "ENOSPC". This is yet >>

Re: [PATCH] media: meson: Add NULL check after the call to kmalloc()

2019-09-04 Thread Rasmus Villemoes
On 04/09/2019 10.22, Austin Kim wrote: > If the kmalloc() return NULL, the NULL pointer dereference will occur. > new_ts->ts = ts; > > Add exception check after the call to kmalloc() is made. > > Signed-off-by: Austin Kim > --- > drivers/staging/media/meson/vdec/vdec_helpers.c | 4 >

[PATCH v2 6/6] x86: bug.h: use asm_inline in _BUG_FLAGS definitions

2019-08-30 Thread Rasmus Villemoes
5203068 1630280 265426781950256 vmlinux.after while bloat-o-meter says add/remove: 10/28 grow/shrink: 103/51 up/down: 3669/-2854 (815) ... Total: Before=14783683, After=14784498, chg +0.01% Signed-off-by: Rasmus Villemoes --- arch/x86/include/asm/bug.h | 4 ++-- 1 file changed, 2 insert

[PATCH v2 5/6] x86: alternative.h: use asm_inline for all alternative variants

2019-08-30 Thread Rasmus Villemoes
statement. gcc >= 9.1 allows one to overrule the estimated size by using "asm inline" instead of just "asm". So replace asm by the helper asm_inline, which for older gccs just expands to asm. Signed-off-by: Rasmus Villemoes --- arch/x86/include/asm/alternative.h | 14

[PATCH v2 2/6] lib/zstd/mem.h: replace __inline by inline

2019-08-30 Thread Rasmus Villemoes
compiler_types.h has not yet been processed, both __inline and inline both refer to the compiler keyword, so again this does not change anything.) Signed-off-by: Rasmus Villemoes --- lib/zstd/mem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/zstd/mem.h b/lib/zstd/mem.h index

[PATCH v2 3/6] compiler_types.h: don't #define __inline

2019-08-30 Thread Rasmus Villemoes
that?), and the ACPI_INLINE macro is only used in the definition of utterly trivial stub functions, where I doubt a small change of semantics (lack of __gnu_inline) changes anything. Signed-off-by: Rasmus Villemoes --- include/linux/compiler_types.h | 11 ++- 1 file changed, 10 insertions

[PATCH v2 4/6] compiler-gcc.h: add asm_inline definition

2019-08-30 Thread Rasmus Villemoes
we'd prefer to spell that asm_inline_volatile() anyway. [1] Technically, asm __inline, since both inline and __inline__ are macros that attach various attributes, making gcc barf if one literally does "asm inline()". However, the third spelling __inline is available for referring to t

[PATCH v2 1/6] staging: rtl8723bs: replace __inline by inline

2019-08-30 Thread Rasmus Villemoes
Currently, __inline is #defined as inline in compiler_types.h, so this should not change functionality. It is preparation for removing said #define. While at it, change some "inline static" to the customary "static inline" order. Signed-off-by: Rasmus Villemoes --- drive

[PATCH v2 0/6] make use of gcc 9's "asm inline()"

2019-08-30 Thread Rasmus Villemoes
cript to generate patch 1), so if the x86 folks want 5/6 and 6/6, perhaps the whole thing can be routed that way. Rasmus Villemoes (6): staging: rtl8723bs: replace __inline by inline lib/zstd/mem.h: replace __inline by inline compiler_types.h: don't #define __inline compiler-gcc.h: a

Re: [PATCH] printf: add support for printing symbolic error codes

2019-08-30 Thread Rasmus Villemoes
On 31/08/2019 00.21, Joe Perches wrote: > On Sat, 2019-08-31 at 00:03 +0200, Rasmus Villemoes wrote: >> On 30/08/2019 23.53, Joe Perches wrote: >>>> diff --git a/lib/vsprintf.c b/lib/vsprintf.c >>> [] >>>> @@ -2178,8 +2204,6 @@ char *pointer(const char *

Re: [PATCH] printf: add support for printing symbolic error codes

2019-08-30 Thread Rasmus Villemoes
On 30/08/2019 23.53, Joe Perches wrote: > >> diff --git a/lib/vsprintf.c b/lib/vsprintf.c > [] >> @@ -2178,8 +2204,6 @@ char *pointer(const char *fmt, char *buf, char *end, >> void *ptr, >> return flags_string(buf, end, ptr, spec, fmt); >> case 'O': >> return kobjec

[PATCH] printf: add support for printing symbolic error codes

2019-08-30 Thread Rasmus Villemoes
grep -w Efoo | wc) to the bottom so that one takes precedence. Signed-off-by: Rasmus Villemoes --- include/linux/errcode.h | 14 +++ lib/Kconfig.debug | 8 ++ lib/Makefile| 1 + lib/errcode.c | 215 lib/test_printf.c

Re: [RFC PATCH 0/5] make use of gcc 9's "asm inline()"

2019-08-30 Thread Rasmus Villemoes
On 29/08/2019 18.05, Linus Torvalds wrote: > On Thu, Aug 29, 2019 at 1:32 AM Rasmus Villemoes > wrote: >> >> But since we #define the identifier inline to attach some attributes, >> we have to use the alternate spelling __inline__ of that >> keyword. Unfortunately,

Re: [PATCH RESEND v11 7/8] open: openat2(2) syscall

2019-08-29 Thread Rasmus Villemoes
On 29/08/2019 14.15, Aleksa Sarai wrote: > On 2019-08-24, Daniel Colascione wrote: >> Why pad the structure when new functionality (perhaps accommodated via >> a larger structure) could be signaled by passing a new flag? Adding >> reserved fields to a structure with a size embedded in the ABI mak

[RFC PATCH 4/5] x86: alternative.h: use asm_inline for all alternative variants

2019-08-29 Thread Rasmus Villemoes
statement. gcc >= 9.1 allows one to overrule the estimated size by using "asm inline" instead of just "asm". So replace asm by the helper asm_inline, which for older gccs just expands to asm. Signed-off-by: Rasmus Villemoes --- arch/x86/include/asm/alternative.h | 14

[RFC PATCH 2/5] compiler_types.h: don't #define __inline__

2019-08-29 Thread Rasmus Villemoes
ts a small change of semantics. Signed-off-by: Rasmus Villemoes --- include/linux/compiler_types.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index 599c27b56c29..4a8b63e3a31d 100644 --- a/include/linux/compiler_types.h +++ b/inc

[RFC PATCH 0/5] make use of gcc 9's "asm inline()"

2019-08-29 Thread Rasmus Villemoes
nces than I'd expect, but I think we do want the asm_inline thing available sooner or later, so this is just to get the ball rolling. Rasmus Villemoes (5): treewide: replace __inline__ by inline compiler_types.h: don't #define __inline__ compiler-gcc.h: add asm_inline definition

[RFC PATCH 3/5] compiler-gcc.h: add asm_inline definition

2019-08-29 Thread Rasmus Villemoes
prefer to spell that asm_inline_volatile() anyway. Signed-off-by: Rasmus Villemoes --- include/linux/compiler-gcc.h | 4 include/linux/compiler_types.h | 4 2 files changed, 8 insertions(+) diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index d7ee4c6ba

[RFC PATCH 5/5] x86: bug.h: use asm_inline in _BUG_FLAGS definitions

2019-08-29 Thread Rasmus Villemoes
5203068 1630280 265426781950256 vmlinux.after while bloat-o-meter says add/remove: 10/28 grow/shrink: 103/51 up/down: 3669/-2854 (815) ... Total: Before=14783683, After=14784498, chg +0.01% Signed-off-by: Rasmus Villemoes --- arch/x86/include/asm/bug.h | 4 ++-- 1 file changed, 2 insert

[PATCH 1/2] x86: mmu.h: move mm_context_t::lock member inside CONFIG_MODIFY_LDT_SYSCALL

2019-08-28 Thread Rasmus Villemoes
!CONFIG_MODIFY_LDT_SYSCALL kernels, of course). Signed-off-by: Rasmus Villemoes --- arch/x86/include/asm/mmu.h | 11 --- arch/x86/include/asm/mmu_context.h | 3 +-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/x86/include/asm/mmu.h b/arch/x86/include/asm/mmu.h

[PATCH 2/2] x86: mmu.h: move mm_context_t::ia32_compat member a bit down

2019-08-28 Thread Rasmus Villemoes
s the 6-byte hole to another place in mm_context_t. Putting the ia32_compat member after the pkey members is deliberate to keep the latter two (when present) in the same 4-byte unit. Signed-off-by: Rasmus Villemoes --- arch/x86/include/asm/mmu.h | 8 1 file changed, 4 insertions(

Re: [PATCH] scripts: coccinelle: check for !(un)?likely usage

2019-08-28 Thread Rasmus Villemoes
On 28/08/2019 14.33, Denis Efremov wrote: > On 8/28/19 2:33 PM, Rasmus Villemoes wrote: >> On 25/08/2019 21.19, Julia Lawall wrote: >>> >>> >>>> On 26 Aug 2019, at 02:59, Denis Efremov wrote: >>>> >>>> >>>> >>>

Re: [PATCH] watchdog: imx2_wdt: fix min() calculation in imx2_wdt_set_timeout

2019-08-26 Thread Rasmus Villemoes
On 12/08/2019 15.28, Guenter Roeck wrote: > On 8/12/19 6:13 AM, Rasmus Villemoes wrote: >> Converting from ms to s requires dividing by 1000, not multiplying. So >> this is currently taking the smaller of new_timeout and 1.28e8, >> i.e. effectively new_timeout. >> >

[PATCH] mm/init-mm.c: use CPU_BITS_NONE to initialize .cpu_bitmap

2019-08-22 Thread Rasmus Villemoes
init_mm is sizeof(long) larger than it needs to be. Use the CPU_BITS_NONE macro meant for this, which will initialize just the indices 0...(BITS_TO_LONGS(NR_CPUS)-1) and hence make the array size actually BITS_TO_LONGS(NR_CPUS). Signed-off-by: Rasmus Villemoes --- mm/init-mm.c | 2 +- 1 file

[PATCH] watchdog: imx2_wdt: fix min() calculation in imx2_wdt_set_timeout

2019-08-12 Thread Rasmus Villemoes
plus anything the above got backported to Signed-off-by: Rasmus Villemoes --- This should really be handled in the watchdog core for any driver that reports max_hw_heartbeat_ms. The same pattern appears in aspeed_wdt.c. I don't have the hardware, but s#wdd->max_hw_heartbeat_ms * 1000#WDT_

Re: [PATCH 02/10] mm/page_alloc: use unsigned int for "order" in __rmqueue_fallback()

2019-07-26 Thread Rasmus Villemoes
On 25/07/2019 20.42, Pengfei Li wrote: > Because "order" will never be negative in __rmqueue_fallback(), > so just make "order" unsigned int. > And modify trace_mm_page_alloc_extfrag() accordingly. > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 75c18f4fd66a..1432cbcd87cd 100644 > ---

Re: [PATCH 1/9] lib/sort.c: implement sort() variant taking context argument

2019-07-25 Thread Rasmus Villemoes
On 26/07/2019 02.05, Andrew Morton wrote: > On Wed, 19 Jun 2019 14:15:32 +0200 Boris Brezillon > wrote: > >> From: Rasmus Villemoes >> >> Our list_sort() utility has always supported a context argument that >> is passed through to the comparison routine.

Re: [PATCH 7/9] media: hantro: Add core bits to support H264 decoding

2019-07-25 Thread Rasmus Villemoes
On 19/06/2019 14.15, Boris Brezillon wrote: > From: Hertz Wong > > Add helpers and patch hantro_{drv,v4l2}.c to prepare addition of H264 > decoding support. > > Signed-off-by: Hertz Wong > Signed-off-by: Boris Brezillon > --- > + > + /* > + * Short term pics in descending pic num orde

Re: [PATCH 1/2] string: Add stracpy and stracpy_pad mechanisms

2019-07-24 Thread Rasmus Villemoes
On 24/07/2019 14.05, Yann Droneaud wrote: > Hi, > > Beware that snprintf(), per C standard, is supposed to return the > length of the formatted string, regarless of the size of the > destination buffer. > > So encouraging developper to write something like code below because > snprintf() in kern

Re: [PATCH V2 1/2] string: Add stracpy and stracpy_pad mechanisms

2019-07-23 Thread Rasmus Villemoes
On 23/07/2019 17.39, Joe Perches wrote: > On Tue, 2019-07-23 at 16:37 +0200, Rasmus Villemoes wrote: >> On 23/07/2019 15.51, Joe Perches wrote: >>> >>> These mechanisms verify that the dest argument is an array of >>> char or other compatible types like u

Re: [PATCH V2 1/2] string: Add stracpy and stracpy_pad mechanisms

2019-07-23 Thread Rasmus Villemoes
On 23/07/2019 15.51, Joe Perches wrote: > Several uses of strlcpy and strscpy have had defects because the > last argument of each function is misused or typoed. > > Add macro mechanisms to avoid this defect. > > stracpy (copy a string to a string array) must have a string > array as the first ar

Re: [PATCH net-next] net: dsa: mv88e6xxx: avoid some redundant vtu load/purge operations

2019-07-23 Thread Rasmus Villemoes
On 23/07/2019 15.40, Andrew Lunn wrote: > On Mon, Jul 22, 2019 at 11:37:26PM +0000, Rasmus Villemoes wrote: >> We have an ERPS (Ethernet Ring Protection Switching) setup involving >> mv88e6250 switches which we're in the process of switching to a BSP >> based on the mai

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