[PATCH v2 08/16] drm/sun4i: Add support for H3 mixer 0

2018-02-27 Thread Jernej Skrabec
This mixer supports 1 VI plane, 3 UI plane and HW scaling on all planes. Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/sun8i_mixer.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c index 9b0256

[PATCH v2 10/16] drm/sun4i: Add support for variants to DW HDMI PHY

2018-02-27 Thread Jernej Skrabec
There are multiple variants of DW HDMI PHYs in Allwinner SoCs. While some things like clock and reset setup are the same, PHY configuration differs a lot. Split out code which is PHY specific to separate functions and create a structure which holds pointers to those functions. Signed-off-by: Jern

[PATCH v2 07/16] drm/sun4i: Add support for H3 display engine

2018-02-27 Thread Jernej Skrabec
H3 display engine has two mixers which are connected to HDMI and TV output. Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/sun4i_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c index 3957c2ff6870..a0f43b81c

[PATCH v2 09/16] drm/sun4i: Fix polarity configuration for DW HDMI PHY

2018-02-27 Thread Jernej Skrabec
Current polarity configuration code is cleary wrong since it compares same flag two times. However, even if flag name is fixed, it won't work well for resolutions which have one polarity positive and another negative. Fix that by properly set each bit according to each polarity. Since those two bi

[PATCH] qlogic/qed: Constify *pkt_type_str[]

2018-02-27 Thread Hernán Gonzalez
Note: This is compile only tested as I have no access to the hw. Constifying and declaring as static saves 24 bytes. add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-24 (-24) Function old new delta pkt_type_str 24 - -

[PATCH v2 04/16] clk: sunxi-ng: h3: h5: export CLK_PLL_VIDEO

2018-02-27 Thread Jernej Skrabec
CLK_PLL_VIDEO needs to be referenced in HDMI DT entry as a possible PHY clock parent. Export it so it can be used later in DT. Signed-off-by: Jernej Skrabec --- drivers/clk/sunxi-ng/ccu-sun8i-h3.h | 4 +++- include/dt-bindings/clock/sun8i-h3-ccu.h | 2 ++ 2 files changed, 5 insertions(+),

[PATCH v2 03/16] clk: sunxi-ng: h3: h5: Allow some clocks to set parent rate

2018-02-27 Thread Jernej Skrabec
Some units have to be able to set it's own clock precisely to work correctly. Allow them to do so by adding CLK_SET_RATE_PARENT flag. Add this flag to DE, TCON and HDMI clocks. Signed-off-by: Jernej Skrabec --- drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 9 ++--- 1 file changed, 6 insertions(+),

Re: [PATCH] sparse doesn't support indirect_branch attribute

2018-02-27 Thread Linus Torvalds
On Tue, Feb 27, 2018 at 2:30 PM, Randy Dunlap wrote: > > There is also a kernel kbuild patch from Luc that Masahiro has also merged > that > does -Wno-unknown-attributes (or however that is spelled). That's probably a better interim workaround. Linus

[PATCH v2 01/16] clk: sunxi-ng: Add check for minimal rate to NM PLLs

2018-02-27 Thread Jernej Skrabec
Some NM PLLs doesn't work well when their output clock rate is set below certain rate. Add support for that constrain. Signed-off-by: Jernej Skrabec --- drivers/clk/sunxi-ng/ccu_nm.c | 11 +++ drivers/clk/sunxi-ng/ccu_nm.h | 27 +++ 2 files changed, 34 insertions

Re: [PATCH] selftest: fix kselftest-merge depend on 'RUNTIME_TESTING_MENU'

2018-02-27 Thread Anders Roxell
On 23 February 2018 at 08:05, Zong Li wrote: > 2018-02-23 3:57 GMT+08:00 Anders Roxell : >> On 22 February 2018 at 12:53, Zong Li wrote: >>> Since the 'commit d3deafaa8b5c ("lib/: make RUNTIME_TESTS a menuconfig >>> to ease disabling it all")', the make kselftest-merge cannot merge the >>> config

[RFC 3/3] perf pmu: Restore auto-merging of PMU events created by prefix match

2018-02-27 Thread Agustin Vega-Frias
This was disabled when auto-merging of non-alias events was disabled in commit 63ce844 (perf stat: Only auto-merge events that are PMU aliases). Signed-off-by: Agustin Vega-Frias --- tools/perf/util/parse-events.c | 13 +++-- tools/perf/util/parse-events.h | 2 +- tools/perf/util/parse-

[RFC 0/3] perf stat: improvements for handling of multiple PMUs

2018-02-27 Thread Agustin Vega-Frias
This series of patches adds some simple improvements to the way perf stat handles PMUs that have multiple instances by: 1. Adding glob-like matching in addition to the prefix-based matching introduced previously (patch 1). 2. Adding the ability to recover the PMU names when printing the events

[RFC 1/3] perf, tools: Support wildcards on pmu name in dynamic pmu events

2018-02-27 Thread Agustin Vega-Frias
Starting on v4.12 event parsing code for dynamic pmu events already supports prefix-based matching of multiple pmus when creating dynamic events. E.g., in a system with the following dynamic pmus: mypmu_0 mypmu_1 mypmu_2 mypmu_4 passing mypmu// as an event spec will result in the

[RFC 2/3] perf, tools: Display pmu name when printing unmerged events in stat

2018-02-27 Thread Agustin Vega-Frias
Starting on v4.12 event parsing code for dynamic pmu events supports prefix-based matching of multiple pmus when creating dynamic events. E.g., in a system with the following dynamic pmus: l3cache_0_0 l3cache_0_1 l3cache_0_2 l3cache_0_3 passing l3cache// as an event spec will resu

[PATCH v2 05/16] dt-bindings: display: sun4i-drm: Add compatibles for H3 HDMI pipeline

2018-02-27 Thread Jernej Skrabec
Add missing compatibles for H3 HDMI pipeline. These compatibles can also be used with H5 SoC. Signed-off-by: Jernej Skrabec --- Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/display/sunxi/

[PATCH v2 06/16] drm/sun4i: Don't process LVDS if TCON doesn't support it

2018-02-27 Thread Jernej Skrabec
TCON checks for LVDS properties even if it doesn't support it. Add a check to skip that part of the code if TCON doesn't support channel 0. Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 120 +++-- 1 file changed, 63 insertions(+), 57 delet

Re: [PATCH] sparse doesn't support indirect_branch attribute

2018-02-27 Thread Luc Van Oostenryck
On Tue, Feb 27, 2018 at 02:12:28PM -0800, Linus Torvalds wrote: > On Tue, Feb 27, 2018 at 12:18 PM, Randy Dunlap wrote: > > > > I don't mind the patch, but I did send a patch for this attribute on Feb. > > 13, 2018, > > to the sparse mailing list. > > I think the sparse plan is to just stop warn

[PATCH v2 13/16] drm/sun4i: Allow building on arm64

2018-02-27 Thread Jernej Skrabec
64-bit ARM SoCs from Allwinner have DE2/TCON/HDMI periphery which is compatible to 32-bit SoCs, so allow building DRM driver for arm64 architecture. Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm

Re: [PATCH 04/12] i2c: qup: schedule EOT and FLUSH tags at the end of transfer

2018-02-27 Thread Andy Gross
On Sat, Feb 03, 2018 at 01:28:09PM +0530, Abhishek Sahu wrote: > A single BAM transfer can have multiple read and write messages. > The EOT and FLUSH tags should be scheduled at the end of BAM HW > descriptors. Since the READ and WRITE can be present in any order > so for some of the cases, these t

Re: [PATCH 05/12] i2c: qup: fix the transfer length for BAM rx EOT FLUSH tags

2018-02-27 Thread Andy Gross
On Sat, Feb 03, 2018 at 01:28:10PM +0530, Abhishek Sahu wrote: > In case of FLUSH operation, BAM copies INPUT EOT FLUSH (0x94) > instead of normal EOT (0x93) tag in input data stream when an > input EOT tag is received during flush operation. So only one tag > will be written instead of 2 separate

Re: [PATCH 00/17] Include linux trace docs to Sphinx TOC tree

2018-02-27 Thread Steven Rostedt
On Tue, 27 Feb 2018 17:34:22 +0800 "Du, Changbin" wrote: > Hello Steven and Corbet, > Ten days past, will you accept this serias? Thank you! > > On Sat, Feb 17, 2018 at 01:39:33PM +0800, changbin...@intel.com wrote: > > From: Changbin Du > > > > Hi All, > > The linux tracers are so useful that

Re: [RFC PATCH V3] virtio_pci: Add SR-IOV support

2018-02-27 Thread Rustad, Mark D
> On Feb 27, 2018, at 7:35 AM, David Miller wrote: > > I don't like these helpers on many different levels. > So kill off pci_sriov_enable() helper completely, it is unnecessary, > and rename the disable helper so that it says something meaningful to > the reader. Yes. Once pointed out, I com

Re: [PATCH] usbip: tools usbip_attach: Fix cryptic error messages

2018-02-27 Thread Krzysztof Opasiak
On 02/27/2018 11:23 PM, Shuah Khan wrote: Attach device error message is cryptic and useless. Fix it to be informative. Signed-off-by: Shuah Khan --- tools/usb/usbip/src/usbip_attach.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/usb/usbip/src/usbip_attach.c

[PATCH 2/2] fs/sysctl: remove redundant link check in proc_sys_link_fill_cache()

2018-02-27 Thread Danilo Krummrich
proc_sys_link_fill_cache() does not need to check whether we're called for a link - it's already done by scan(). Signed-off-by: Danilo Krummrich --- fs/proc/proc_sysctl.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c

[PATCH 1/2] fs/sysctl: fix potential page fault while unregistering sysctl table

2018-02-27 Thread Danilo Krummrich
proc_sys_link_fill_cache() does not take currently unregistering sysctl tables into account, which might result into a page fault in sysctl_follow_link() - add a check to fix it. Signed-off-by: Danilo Krummrich --- fs/proc/proc_sysctl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/p

[PATCH 0/2] TDA7419 audio processor driver

2018-02-27 Thread Matt Porter
This series adds an ASoC component driver for the ST TDA7419 audio processor which is commonly used in automotive audio applications. The datasheet can be found at http://www.st.com/resource/en/datasheet/tda7419.pdf Matt Porter (2): ASoC: add tda7419 audio processor binding ASoC: add tda7419 a

[PATCH 2/2] ASoC: add tda7419 audio processor driver

2018-02-27 Thread Matt Porter
Component driver for the tda7419 audio processor. Signed-off-by: Matt Porter --- sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/tda7419.c | 571 + 3 files changed, 579 insertions(+) create mode 100644 sound/so

Re: [PATCH] nbd: fix return value in error handling path

2018-02-27 Thread Jens Axboe
On 2/12/18 10:14 AM, Gustavo A. R. Silva wrote: > It seems that the proper value to return in this particular case is the > one contained into variable new_index instead of ret. Thanks, applied. -- Jens Axboe

Re: [PATCH] usbip: tools usbip_attach: Fix cryptic error messages

2018-02-27 Thread Shuah Khan
On 02/27/2018 03:45 PM, Krzysztof Opasiak wrote: > > > On 02/27/2018 11:23 PM, Shuah Khan wrote: >> Attach device error message is cryptic and useless. Fix it to be >> informative. >> >> Signed-off-by: Shuah Khan >> --- >>   tools/usb/usbip/src/usbip_attach.c | 3 ++- >>   1 file changed, 2 inser

[PATCH 1/2] ASoC: add tda7419 audio processor binding

2018-02-27 Thread Matt Porter
DeviceTree binding for the tda7419 audio processor. Signed-off-by: Matt Porter --- Documentation/devicetree/bindings/sound/tda7419.txt | 15 +++ 1 file changed, 15 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/tda7419.txt diff --git a/Documentation/device

linux-next: manual merge of the net-next tree with the net tree

2018-02-27 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/ipv4/ip_tunnel.c between commit: 4e994776e7bd ("ip_tunnel: Do not use mark in skb by default") from the net tree and commit: b0066da52ea5 ("ip_tunnel: Rename & publish init_tunnel_flow") from the net-next tree

Re: [PATCH 06/12] i2c: qup: proper error handling for i2c error in BAM mode

2018-02-27 Thread Andy Gross
On Sat, Feb 03, 2018 at 01:28:11PM +0530, Abhishek Sahu wrote: > @@ -841,20 +856,12 @@ static int qup_i2c_bam_do_xfer(struct qup_i2c_dev *qup, > struct i2c_msg *msg, > goto desc_err; > } > > - if (rx_buf) > - writel(QUP_BAM_I

Re: [PATCH 2/2] fs/sysctl: remove redundant link check in proc_sys_link_fill_cache()

2018-02-27 Thread Kees Cook
On Tue, Feb 27, 2018 at 2:43 PM, Danilo Krummrich wrote: > proc_sys_link_fill_cache() does not need to check whether we're > called for a link - it's already done by scan(). > > Signed-off-by: Danilo Krummrich > --- > fs/proc/proc_sysctl.c | 11 +-- > 1 file changed, 5 insertions(+), 6 d

Re: [PATCH 07/12] i2c: qup: use the complete transfer length to choose DMA mode

2018-02-27 Thread Andy Gross
On Sat, Feb 03, 2018 at 01:28:12PM +0530, Abhishek Sahu wrote: > Currently each message length in complete transfer is being > checked for determining DMA mode and if any of the message length > is less than FIFO length then non DMA mode is being used which > will increase overhead. DMA can be used

Re: selftests/x86/fsgsbase_64 test problem

2018-02-27 Thread Dan Rue
On Mon, Jan 29, 2018 at 10:30:05AM -0800, H. Peter Anvin wrote: > On 01/29/18 10:26, Andy Lutomirski wrote: > >>> > >>> That will utterly suck on non-UMIP machines that have > >>> hypervisor-provided UMIP emulation. > >> > >> Is that a valid thing to optimize for, especially given that paranoid > >

Re: [PATCH 2/2] fs/sysctl: remove redundant link check in proc_sys_link_fill_cache()

2018-02-27 Thread Danilo Krummrich
On 2018-02-27 23:59, Kees Cook wrote: On Tue, Feb 27, 2018 at 2:43 PM, Danilo Krummrich wrote: proc_sys_link_fill_cache() does not need to check whether we're called for a link - it's already done by scan(). Signed-off-by: Danilo Krummrich --- fs/proc/proc_sysctl.c | 11 +-- 1 file c

Re: [PATCH bpf-next v8 08/11] landlock: Add ptrace restrictions

2018-02-27 Thread Andy Lutomirski
On Tue, Feb 27, 2018 at 10:14 PM, Mickaël Salaün wrote: > > On 27/02/2018 06:01, Andy Lutomirski wrote: >> >> >>> On Feb 26, 2018, at 8:17 PM, Andy Lutomirski wrote: >>> On Tue, Feb 27, 2018 at 12:41 AM, Mickaël Salaün wrote: A landlocked process has less privileges than a non-landlock

Re: [PATCH 1/2] fs/sysctl: fix potential page fault while unregistering sysctl table

2018-02-27 Thread Kees Cook
On Tue, Feb 27, 2018 at 2:43 PM, Danilo Krummrich wrote: > proc_sys_link_fill_cache() does not take currently unregistering > sysctl tables into account, which might result into a page fault in > sysctl_follow_link() - add a check to fix it. > > Signed-off-by: Danilo Krummrich > --- > fs/proc/pr

Re: [PATCH] nbd: fix return value in error handling path

2018-02-27 Thread Gustavo A. R. Silva
On 02/26/2018 05:01 PM, Omar Sandoval wrote: On Mon, Feb 12, 2018 at 11:14:55AM -0600, Gustavo A. R. Silva wrote: It seems that the proper value to return in this particular case is the one contained into variable new_index instead of ret. Addresses-Coverity-ID: 1465148 ("Copy-paste error") F

Re: [PATCH 08/12] i2c: qup: change completion timeout according to transfer length

2018-02-27 Thread Andy Gross
On Mon, Feb 19, 2018 at 04:26:18PM +0530, Abhishek Sahu wrote: > On 2018-02-16 10:18, Sricharan R wrote: > >On 2/3/2018 1:28 PM, Abhishek Sahu wrote: > >>Currently the completion timeout is being taken according to > >>maximum transfer length which is too high if SCL is operating in > >>high freque

Re: [RFC 1/3] perf, tools: Support wildcards on pmu name in dynamic pmu events

2018-02-27 Thread Andi Kleen
On Tue, Feb 27, 2018 at 05:34:06PM -0500, Agustin Vega-Frias wrote: > Starting on v4.12 event parsing code for dynamic pmu events already > supports prefix-based matching of multiple pmus when creating dynamic > events. E.g., in a system with the following dynamic pmus: > > mypmu_0 > mypmu

Re: [PATCH v2 01/11] test_firmware: enable custom fallback testing on limited kernel configs

2018-02-27 Thread Kees Cook
On Fri, Feb 23, 2018 at 6:46 PM, Luis R. Rodriguez wrote: > When a kernel is not built with: > > CONFIG_HAS_FW_LOADER_USER_HELPER_FALLBACK=y > > We don't currently enable testing fw_fallback.sh. For kernels that > still enable the fallback mechanism, its possible to use the async > request firmwar

Re: [PATCH v2 02/11] test_firmware: replace syfs fallback check with kconfig_has helper

2018-02-27 Thread Kees Cook
On Fri, Feb 23, 2018 at 6:46 PM, Luis R. Rodriguez wrote: > Now that we have a kconfig checker just use that instead of relying > on testing a sysfs directory being present, since our requirements > are spelled out. I don't see the reason to depend on config.gz, but it's a reasonable requirement

Re: [PATCH bpf-next v8 00/11] Landlock LSM: Toward unprivileged sandboxing

2018-02-27 Thread Andy Lutomirski
On Tue, Feb 27, 2018 at 10:03 PM, Mickaël Salaün wrote: > > On 27/02/2018 05:36, Andy Lutomirski wrote: >> On Tue, Feb 27, 2018 at 12:41 AM, Mickaël Salaün wrote: >>> Hi, >>> >>> >>> ## Why use the seccomp(2) syscall? >>> >>> Landlock use the same semantic as seccomp to apply access rule >>> res

Re: [PATCH 4.14 00/54] 4.14.23-stable review

2018-02-27 Thread Guenter Roeck
On Tue, Feb 27, 2018 at 07:36:18PM +0100, Greg Kroah-Hartman wrote: > On Tue, Feb 27, 2018 at 06:38:59AM -0800, Guenter Roeck wrote: > > On 02/27/2018 05:08 AM, Greg Kroah-Hartman wrote: > > > On Tue, Feb 27, 2018 at 02:59:39AM -0800, Guenter Roeck wrote: > > > > On 02/26/2018 12:21 PM, Greg Kroah-

Re: [PATCH v2 07/11] firmware: split firmware fallback functionality into its own file

2018-02-27 Thread Kees Cook
On Fri, Feb 23, 2018 at 6:46 PM, Luis R. Rodriguez wrote: > The firmware fallback code is optional. Split that code out to help > distinguish the fallback functionlity from othere core firmware loader > features. This should make it easier to maintain and review code > changes. > > The reason for

Re: [PATCH v1 2/2] perf/core: Add support for PMUs that can be read from any CPU

2018-02-27 Thread skannan
On 2018-02-27 03:43, Mark Rutland wrote: On Mon, Feb 26, 2018 at 06:11:45PM -0800, skan...@codeaurora.org wrote: On 2018-02-25 06:38, Mark Rutland wrote: > On Fri, Feb 23, 2018 at 04:19:38PM -0800, Saravana Kannan wrote: > > Some PMUs events can be read from any CPU. So allow the PMU to mark > >

Re: [PATCH 09/12] i2c: qup: fix buffer overflow for multiple msg of maximum xfer len

2018-02-27 Thread Andy Gross
On Sat, Feb 03, 2018 at 01:28:14PM +0530, Abhishek Sahu wrote: > The BAM mode requires buffer for start tag data and tx, rx SG > list. Currently, this is being taken for maximum transfer length > (65K). But an I2C transfer can have multiple messages and each > message can be of this maximum length

Re: [PATCH v2 10/11] test_firmware: add a library for shared helpers

2018-02-27 Thread Kees Cook
On Fri, Feb 23, 2018 at 6:46 PM, Luis R. Rodriguez wrote: > Both fw_fallback.sh and fw_filesystem.sh share a common set of > boiler plate setup and tests. We can share these in a common place. > While at it, move both test to use /bin/bash. > > Signed-off-by: Luis R. Rodriguez > --- > tools/test

Re: [PATCH 10/12] i2c: qup: send NACK for last read sub transfers

2018-02-27 Thread Andy Gross
On Sat, Feb 03, 2018 at 01:28:15PM +0530, Abhishek Sahu wrote: > According to I2c specification, “If a master-receiver sends a > repeated START condition, it sends a not-acknowledge (A) just > before the repeated START condition”. QUP v2 supports sending > of NACK without stop with QUP_TAG_V2_DATAR

Re: [PATCH v2 11/11] test_firmware: test three firmware kernel configs using a proc knob

2018-02-27 Thread Kees Cook
On Fri, Feb 23, 2018 at 6:46 PM, Luis R. Rodriguez wrote: > Since we now have knobs to twiddle what used to be set on kernel > configurations we can build one base kernel configuration and modify > behaviour to mimic such kernel configurations to test them. > > Provided you build a kernel with: >

[PATCH] PCI/ASPM: Change type of threshold_ns variable to u32

2018-02-27 Thread Gustavo A. R. Silva
It seems that the expression threshold_us * 1000 will never exceed the 32-bit limits [1]. So changing the type of threshold_ns from u64 to u32 seems sensible [2]. [1] https://marc.info/?l=linux-kernel&m=151855021100725&w=2 [2] https://marc.info/?l=linux-kernel&m=151976318924615&w=2 Addresses-Cove

Re: [PATCH 1/2] fs/sysctl: fix potential page fault while unregistering sysctl table

2018-02-27 Thread Danilo Krummrich
On 2018-02-28 00:02, Kees Cook wrote: On Tue, Feb 27, 2018 at 2:43 PM, Danilo Krummrich wrote: proc_sys_link_fill_cache() does not take currently unregistering sysctl tables into account, which might result into a page fault in sysctl_follow_link() - add a check to fix it. Signed-off-by: Danil

Re: [PATCH v2 04/11] firmware: simplify CONFIG_FW_LOADER_USER_HELPER_FALLBACK further

2018-02-27 Thread Kees Cook
On Fri, Feb 23, 2018 at 6:46 PM, Luis R. Rodriguez wrote: > All CONFIG_FW_LOADER_USER_HELPER_FALLBACK really is, is just a bool, > initailized at build time. Define it as such. This simplifies the > logic even further, removing now all explicit #ifdefs around the code. In the next revision, can y

Re: [PATCH v2 05/11] firmware: use helpers for setting up a temporary cache timeout

2018-02-27 Thread Kees Cook
On Fri, Feb 23, 2018 at 6:46 PM, Luis R. Rodriguez wrote: > We only use the timeout for the firmware fallback mechanism > except for trying to set the timeout during the cache setup > for resume/suspend. For those cases, setting the timeout should > be a no-op, so just reflect this in code by addi

Re: [PATCH v2 06/11] firmware: move loading timeout under struct firmware_fallback_config

2018-02-27 Thread Kees Cook
On Fri, Feb 23, 2018 at 6:46 PM, Luis R. Rodriguez wrote: > The timeout is a fallback construct, so we can just stuff the > timeout configuration under struct firmware_fallback_config. > > While at it, add a few helpers which vets the use of getting or > setting the timeout as an int. The main use

[RFT 3/7] firmware: make fw_add_devm_name() return 0 if cache present

2018-02-27 Thread Luis R. Rodriguez
Currently fw_add_devm_name() returns 1 if the firmware cache was already set. This makes it complicated for us to check for correctness. It is actually non-fatal if the firmware cache is already setup, so just return 0, and simplify the checkers. Signed-off-by: Luis R. Rodriguez --- drivers/base

[RFT 7/7] mt7601u: use request_firmware_cache() to address cache on reboot

2018-02-27 Thread Luis R. Rodriguez
request_firmware_cache() will ensure the firmware is available on resume from suspend if on reboot the device retains the firmware. This optimization is in place given otherwise on reboot we have to reload the firmware, the opmization saves us about max 1s, minimum 10ms. Reported-by: Cantabile S

[RFT 6/7] firmware: add request_firmware_cache() to help with cache on reboot

2018-02-27 Thread Luis R. Rodriguez
Some devices have an optimization in place to enable the firmware to be retaineed during a system reboot, so after reboot the device can skip requesting and loading the firmware. This can save up to 1s in load time. The mt7601u 802.11 device happens to be such a device. When these devices retain t

[RFT 2/7] firmware: fix checking for return values for fw_add_devm_name()

2018-02-27 Thread Luis R. Rodriguez
fw_add_devm_name() adds device's name onto the devres for the device so that prior to suspend we cache the firmware onto memory, so that on resume the firmware is reliably available. We never were checking for success for this call though, meaning in some really rare cases we my have never setup th

Re: [PATCH v2 08/11] firmware: enable run time change of forcing fallback loader

2018-02-27 Thread Kees Cook
On Fri, Feb 23, 2018 at 6:46 PM, Luis R. Rodriguez wrote: > Currently one requires to test four kernel configurations to test the > firmware API completely: > > 0) > CONFIG_FW_LOADER=y > > 1) > o CONFIG_FW_LOADER=y > o CONFIG_FW_LOADER_USER_HELPER=y > > 2) > o CONFIG_FW_LOADER=y > o CONF

[RFT 5/7] firmware: ensure the firmware cache is not used on incompatible calls

2018-02-27 Thread Luis R. Rodriguez
request_firmware_into_buf() explicitly disables the firmware cache, meanwhile the firmware cache cannot be used when request_firmware_nowait() is used without the uevent. Enforce a sanity check for this to avoid future issues undocumented behaviours should misuses of the firmware cache happen later

Re: [PATCH v2 09/11] firmware: enable to force disable the fallback mechanism at run time

2018-02-27 Thread Kees Cook
On Fri, Feb 23, 2018 at 6:46 PM, Luis R. Rodriguez wrote: > You currently need four different kernel builds to test the firmware > API fully. By adding a proc knob to force disable the fallback mechanism > completely we are able to reduce the amount of kernels you need built > to test the firmware

Re: [PATCH RFC v3] auxdisplay: charlcd: Fix and clean up handling of x/y commands

2018-02-27 Thread Robert Abel
On 27 Feb 2018 23:09, Miguel Ojeda wrote:> @@ -469,24 +543,11 @@ static inline int handle_lcd_special_code(struct charlcd *lcd) > } > case 'x': /* gotoxy : LxXXX[yYYY]; */ > case 'y': /* gotoxy : LyYYY[xXXX]; */ > - if (!strchr(esc, ';')) > -

[RFT 4/7] firmware: add helper to check to see if fw cache is setup

2018-02-27 Thread Luis R. Rodriguez
Add a helper to check if the firmware cache is already setup for a device. This will be used later. Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_loader.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/base/firmware_loader.c b/drivers/bas

Re: [PATCH] test_kmod: fix limit check on number of test devices created

2018-02-27 Thread Kees Cook
On Fri, Feb 23, 2018 at 7:00 PM, Luis R. Rodriguez wrote: > As reported by Dan the parentheses is in the wrong place, and since > unlikely() call returns either 0 or 1 it's never less than zero. > The second issue is that signed integer overflows like "INT_MAX + 1" are > undefined behavior. > > Si

Re: [PATCH 12/12] i2c: qup: reorganization of driver code to remove polling for qup v2

2018-02-27 Thread Christ, Austin
On 2/3/2018 12:58 AM, Abhishek Sahu wrote: Following are the major issues in current driver code 1. The current driver simply assumes the transfer completion whenever its gets any non-error interrupts and then simply do the polling of available/free bytes in FIFO. 2. The block mode is

Re: [PATCH bpf-next v8 08/11] landlock: Add ptrace restrictions

2018-02-27 Thread Andy Lutomirski
On Tue, Feb 27, 2018 at 11:02 PM, Andy Lutomirski wrote: > On Tue, Feb 27, 2018 at 10:14 PM, Mickaël Salaün wrote: >> >> On 27/02/2018 06:01, Andy Lutomirski wrote: >>> >>> On Feb 26, 2018, at 8:17 PM, Andy Lutomirski wrote: > On Tue, Feb 27, 2018 at 12:41 AM, Mickaël Salaün wrote

[PATCH 0/2] drivers: soc: xilinx: Add support for ZynqMP PM driver

2018-02-27 Thread Jolly Shah
Add ZynqMP PM driver. PM driver provides power management support for ZynqMP. This patchset has dependency on below drivers: Firmware Driver: https://patchwork.kernel.org/patch/10230773/ IPI Mailbox Driver: https://patchwork.kernel.org/patch/10145799/ Jolly Shah (2): dt-bindings: soc: Add Z

[RFT 0/7] firmware: enable caching of firmware for reboot optimization

2018-02-27 Thread Luis R. Rodriguez
spin and let me know if it fixes your reported issue. They depend on other pending patches I have in line waiting to be merged so the easiest I thing I think is for you to test my 20180227-firmware-cache branch [0], based on Linus' tree. To get that tree, cd into your Linus git tree and do:

[RFT 1/7] rename: _request_firmware_load() fw_load_sysfs_fallback()

2018-02-27 Thread Luis R. Rodriguez
This reflects much clearer what is being done. Signed-off-by: Luis R. Rodriguez --- Documentation/driver-api/firmware/fallback-mechanisms.rst | 2 +- drivers/base/firmware_fallback.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/d

[PATCH 2/2] drivers: soc: xilinx: Add ZynqMP PM driver

2018-02-27 Thread Jolly Shah
Add ZynqMP PM driver. PM driver provides power management support for ZynqMP. Signed-off-by: Jolly Shah Signed-off-by: Rajan Vaja --- drivers/soc/Makefile| 1 + drivers/soc/xilinx/Kconfig | 2 + drivers/soc/xilinx/Makefile | 2 + drivers/soc/xi

[PATCH 1/2] dt-bindings: soc: Add ZynqMP PM bindings

2018-02-27 Thread Jolly Shah
Add documentation to describe Xilinx ZynqMP power management bindings. Signed-off-by: Jolly Shah Signed-off-by: Rajan Vaja --- .../bindings/soc/xilinx/xlnx,zynqmp-power.txt | 28 ++ 1 file changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/

[PATCH] mm:swap: do not check readahead flag with THP anon

2018-02-27 Thread Minchan Kim
Huang reported PG_readahead flag marked PF_NO_COMPOUND so that we cannot use the flag for THP page. So, we need to check first whether page is THP or not before using TestClearPageReadahead in lookup_swap_cache. This patch fixes it. Furthermore, swap_[cluster|vma]_readahead cannot mark PG_readahe

Re: [RFT 1/7] rename: _request_firmware_load() fw_load_sysfs_fallback()

2018-02-27 Thread Kees Cook
On Tue, Feb 27, 2018 at 3:20 PM, Luis R. Rodriguez wrote: > This reflects much clearer what is being done. > > Signed-off-by: Luis R. Rodriguez > --- > Documentation/driver-api/firmware/fallback-mechanisms.rst | 2 +- > drivers/base/firmware_fallback.c | 4 ++-- > 2 file

Re: [PATCH 3/4] auxdisplay: charlcd: fix x/y address commands

2018-02-27 Thread Robert Abel
Hi Willy, On 27 Feb 2018 06:19, Willy Tarreau wrote: > Well actually I don't see a problem there at all. The principle is simply > to accept any sequence assigning x or y or both. If you write x4y2x6, it > simply means that you changed your mind regarding x and that the last > value (6) is the one

Re: [PATCH] mm:swap: do not check readahead flag with THP anon

2018-02-27 Thread Minchan Kim
On Wed, Feb 28, 2018 at 08:26:11AM +0900, Minchan Kim wrote: > Huang reported PG_readahead flag marked PF_NO_COMPOUND so that > we cannot use the flag for THP page. So, we need to check first > whether page is THP or not before using TestClearPageReadahead > in lookup_swap_cache. > > This patch fi

Re: [RFT 2/7] firmware: fix checking for return values for fw_add_devm_name()

2018-02-27 Thread Kees Cook
On Tue, Feb 27, 2018 at 3:20 PM, Luis R. Rodriguez wrote: > fw_add_devm_name() adds device's name onto the devres for the > device so that prior to suspend we cache the firmware onto memory, > so that on resume the firmware is reliably available. We never > were checking for success for this call

Re: [RFT 3/7] firmware: make fw_add_devm_name() return 0 if cache present

2018-02-27 Thread Kees Cook
On Tue, Feb 27, 2018 at 3:20 PM, Luis R. Rodriguez wrote: > Currently fw_add_devm_name() returns 1 if the firmware cache > was already set. This makes it complicated for us to check for > correctness. It is actually non-fatal if the firmware cache > is already setup, so just return 0, and simplify

[PATCH v2 2/2] fs/sysctl: remove redundant link check in proc_sys_link_fill_cache()

2018-02-27 Thread Danilo Krummrich
proc_sys_link_fill_cache() does not need to check whether we're called for a link - it's already done by scan(). Signed-off-by: Danilo Krummrich --- v2: removed 'err' as it's only used for sysctl_follow_link() --- fs/proc/proc_sysctl.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(

[PATCH v2 1/2] fs/sysctl: fix potential page fault while unregistering sysctl table

2018-02-27 Thread Danilo Krummrich
proc_sys_link_fill_cache() does not take currently unregistering sysctl tables into account, which might result into a page fault in sysctl_follow_link() - add a check to fix it. Signed-off-by: Danilo Krummrich --- v2: removed empty line between between sysctl_head_grab and IS_ERR --- fs/proc/pr

Re: [PATCH v2 1/2] fs/sysctl: fix potential page fault while unregistering sysctl table

2018-02-27 Thread Kees Cook
On Tue, Feb 27, 2018 at 3:31 PM, Danilo Krummrich wrote: > proc_sys_link_fill_cache() does not take currently unregistering > sysctl tables into account, which might result into a page fault in > sysctl_follow_link() - add a check to fix it. > > Signed-off-by: Danilo Krummrich Acked-by: Kees Coo

Re: [PATCH RFC v3] auxdisplay: charlcd: Fix and clean up handling of x/y commands

2018-02-27 Thread Miguel Ojeda
On Wed, Feb 28, 2018 at 12:23 AM, Robert Abel wrote: > On 27 Feb 2018 23:09, Miguel Ojeda wrote:> @@ -469,24 +543,11 @@ static > inline int handle_lcd_special_code(struct charlcd *lcd) >> } >> case 'x': /* gotoxy : LxXXX[yYYY]; */ >> case 'y': /* gotoxy : LyYYY[xXXX];

Re: [PATCH v2 2/2] fs/sysctl: remove redundant link check in proc_sys_link_fill_cache()

2018-02-27 Thread Kees Cook
On Tue, Feb 27, 2018 at 3:31 PM, Danilo Krummrich wrote: > proc_sys_link_fill_cache() does not need to check whether we're > called for a link - it's already done by scan(). > > Signed-off-by: Danilo Krummrich Acked-by: Kees Cook > --- > v2: removed 'err' as it's only used for sysctl_follow_li

Re: [PATCH V1 1/3] x86/efi: Call efi_delete_dummy_variable() during efi subsystem initialization

2018-02-27 Thread kbuild test robot
Hi Sai, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.16-rc3 next-20180227] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

Regression in IPMI on 4.15.6

2018-02-27 Thread Laura Abbott
Hi, Fedora got a bug report of a crash in IPMI on 4.15.6 https://bugzilla.redhat.com/show_bug.cgi?id=1549316 Unfortunately, it's only a screenshot but it's fairly clear. It looks like a panic in the error handling path in platform_device_unregister. Any ideas? Thanks, Laura

[PATCH 2/2] drivers: soc: xilinx: Add ZynqMP power domain driver

2018-02-27 Thread Jolly Shah
The zynqmp-genpd driver communicates the usage requirements for logical power domains / devices to the platform FW. FW is responsible for choosing appropriate power states, taking Linux' usage information into account. Signed-off-by: Jolly Shah Signed-off-by: Rajan Vaja --- drivers/soc/xilinx/K

[PATCH 1/2] dt-bindings: power: Add ZynqMP power domain bindings

2018-02-27 Thread Jolly Shah
Add documentation to describe ZynqMP power domain bindings. Signed-off-by: Jolly Shah Signed-off-by: Rajan Vaja --- .../devicetree/bindings/power/zynqmp-genpd.txt | 46 ++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/zynqmp

[PATCH 0/2] drivers: soc: xilinx: Add support for ZynqMP power domain driver

2018-02-27 Thread Jolly Shah
The zynqmp power domain driver communicates the usage requirements for logical power domains / devices to the platform FW. FW is responsible for choosing appropriate power states, taking Linux' usage information into account. This patchset has dependency on below drivers: Firmware Driver: http

Re: [PATCH bpf-next v8 08/11] landlock: Add ptrace restrictions

2018-02-27 Thread Mickaël Salaün
On 28/02/2018 00:23, Andy Lutomirski wrote: > On Tue, Feb 27, 2018 at 11:02 PM, Andy Lutomirski wrote: >> On Tue, Feb 27, 2018 at 10:14 PM, Mickaël Salaün wrote: >>> >>> On 27/02/2018 06:01, Andy Lutomirski wrote: > On Feb 26, 2018, at 8:17 PM, Andy Lutomirski wrote: > >>

Re: [PATCH] mm/zsmalloc: strength reduce zspage_size calculation

2018-02-27 Thread Minchan Kim
Hi Joey, On Mon, Feb 26, 2018 at 02:21:26AM -1000, Joey Pabalinas wrote: > Replace the repeated multiplication in the main loop > body calculation of zspage_size with an equivalent > (and cheaper) addition operation. > > Signed-off-by: Joey Pabalinas > > 1 file changed, 2 insertions(+), 2 dele

[PATCH RFC 0/2] auxdisplay: charlcd: fix movement and home commands

2018-02-27 Thread Robert Abel
I reworked the previous patches 2-4 into these two patches. The first patch proproses a different solution to the movement command parse code that reduces the movement command two at most two movement subcommands (x or y standalone, x followed by y or vice-versa). The second patch add comments in

[PATCH 2/2] auxdisplay: charlcd: make home command unshift display

2018-02-27 Thread Robert Abel
A user has no way of unshifting the display programmatically once shifted. Users cannot rely on ^[[H (home) to result in their message being seen either. Use the actual HOME command 0x02 instead of only returning to x0/y0. Users can still do ^[[Lx0y0; (go to x/y) if they wish to use the 'old' home

[PATCH 1/2] auxdisplay: charlcd: fix x/y address commands

2018-02-27 Thread Robert Abel
The current version does not parse x/y commands at all. Simplify the x/y command syntax to the one indicated in the comment all along and introduce a parsing function that handles parsing a sequence of one or two subcommands where each subcommand must appear at most once. Signed-off-by: Robert Abe

Re: [PATCH bpf-next v8 08/11] landlock: Add ptrace restrictions

2018-02-27 Thread Andy Lutomirski
On Wed, Feb 28, 2018 at 12:00 AM, Mickaël Salaün wrote: > > On 28/02/2018 00:23, Andy Lutomirski wrote: >> On Tue, Feb 27, 2018 at 11:02 PM, Andy Lutomirski wrote: >>> On Tue, Feb 27, 2018 at 10:14 PM, Mickaël Salaün wrote: >>> >>> I think you're wrong here. Any sane container trying to us

Re: [PATCH] riscv/barrier: Define __smp_{store_release,load_acquire}

2018-02-27 Thread Andrea Parri
On Tue, Feb 27, 2018 at 02:20:37PM -0800, Daniel Lustig wrote: > On 2/27/2018 10:21 AM, Palmer Dabbelt wrote: > > On Mon, 26 Feb 2018 18:24:11 PST (-0800), parri.and...@gmail.com wrote: > >> Introduce __smp_{store_release,load_acquire}, and rely on the generic > >> definitions for smp_{store_releas

[PATCH v3 1/2] iio: light: add driver for bh1730fvc chips

2018-02-27 Thread Pierre Bourdon
Ambient light sensor that supports visible light and IR measurements and configurable gain/integration time. This is written as an additional driver instead of being added into the existing bh1750 / bh1780 drivers. The bh1730 chip is significantly different from either of these two: * bh1750 is n

[PATCH v3 2/2] dt-bindings: iio: light: Add bh1730fvc bindings

2018-02-27 Thread Pierre Bourdon
Signed-off-by: Pierre Bourdon --- .../devicetree/bindings/iio/light/bh1730.txt | 15 +++ 1 file changed, 15 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/light/bh1730.txt diff --git a/Documentation/devicetree/bindings/iio/light/bh1730.txt b/Documentati

[PATCH v2 1/6] kconfig: do not call check_conf() for olddefconfig

2018-02-27 Thread Masahiro Yamada
check_conf() traverses the menu tree, but it is completely no-op for olddefconfig because the following if-else block does nothing. if (input_mode == listnewconfig) { ... } else if (input_mode != olddefconfig) { ... } As the help message says, olddefconfig auto

[PATCH v2 0/6] kconfig: some clean-ups and rename silentoldconfig

2018-02-27 Thread Masahiro Yamada
Masahiro Yamada (6): kconfig: do not call check_conf() for olddefconfig kconfig: remove unneeded input_mode test in conf() kconfig: remove redundant input_mode test for check_conf() loop kconfig: hide irrelevant sub-menus for oldconfig kconfig: invoke oldconfig instead of silentoldconfig

<    4   5   6   7   8   9   10   >