Re: [FIX bpf,perf] bpf,perf: return EOPNOTSUPP for bpf handler on PERF_COUNT_SW_DUMMY

2020-11-17 Thread Florian Lehner
On Tue, Nov 17, 2020 at 08:53:34AM +0100, Peter Zijlstra wrote: > On Mon, Nov 16, 2020 at 01:02:09PM -0800, Martin KaFai Lau wrote: > > On Mon, Nov 16, 2020 at 07:37:52PM +0100, Florian Lehner wrote: > > > bpf handlers for perf events other than tracepoints, kprobes or uprobes > > > are attached to

[PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-17 Thread Enrico Weigelt, metux IT consult
The of_match_ptr(foo) macro evaluates to foo, only if CONFIG_OF is set, otherwise to NULL. Same does ACPI_PTR with CONFIG_ACPI. That's very helpful for drivers that can be used with or without oftree / acpi. Even though most of the drivers touched here probably don't actually need that, it's also

Re: [PATCH v2 6/8] powerepc/book3s64/hash: drop WARN_ON in hash__remove_section_mapping

2020-11-17 Thread Oscar Salvador
On Wed, Nov 11, 2020 at 03:53:20PM +0100, David Hildenbrand wrote: > The single caller (arch_remove_linear_mapping()) prints a proper warning > when this function fails. No need to eventually crash the kernel - let's > drop this WARN_ON. > > Suggested-by: Oscar Salvador > Cc: Michael Ellerman >

Re: [PATCH] rtc: at91rm9200: Add sam9x60 compatible

2020-11-17 Thread Nicolas Ferre
On 17/11/2020 at 14:39, Alexandre Belloni wrote: Handle the sam9x60 RTC. While it can work with the at91sam9x5 fallback, it has crystal correction support and doesn't need to shadow IMR. Signed-off-by: Alexandre Belloni Acked-by: Nicolas Ferre --- drivers/rtc/rtc-at91rm9200.c | 3 +++ 1

Re: [PATCH v2] mm: memblock: drop __init from memblock functions to make it inline

2020-11-17 Thread Mike Rapoport
On Mon, Nov 16, 2020 at 05:05:37PM +0530, Faiyaz Mohammed wrote: > __init is used with inline due to which memblock wraper functions are > not getting inline. > for example: > [0.00] memblock_alloc_try_nid: 1490 bytes align=0x40 nid=-1 > from=0x max_addr=0x

[PATCH] drivers: clk: make gpio-gated clock support optional

2020-11-17 Thread Enrico Weigelt, metux IT consult
The gpio-gate-clock / gpio-mux-clock driver isn't used much, just by a few ARM SoCs, so there's no need to always include it unconditionally. Thus make it optional, but keep it enabled by default. Signed-off-by: Enrico Weigelt, metux IT consult --- drivers/clk/Kconfig | 7 +++ drivers/clk/

Re: [PATCH v2 4/8] powerpc/mm: protect linear mapping modifications by a mutex

2020-11-17 Thread David Hildenbrand
On 17.11.20 16:37, Oscar Salvador wrote: On Wed, Nov 11, 2020 at 03:53:18PM +0100, David Hildenbrand wrote: @@ -144,7 +147,9 @@ void __ref arch_remove_linear_mapping(u64 start, u64 size) start = (unsigned long)__va(start); flush_dcache_range_chunked(start, start + size, FLUSH_CHU

KMSAN: uninit-value in post_read_mst_fixup

2020-11-17 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:73d62e81 kmsan: random: prevent boot-time reports in _mix_.. git tree: https://github.com/google/kmsan.git master console output: https://syzkaller.appspot.com/x/log.txt?x=1038fce250 kernel config: https://syzkaller.appspot.co

Re: [PATCH v2 7/8] powerpc/mm: remove linear mapping if __add_pages() fails in arch_add_memory()

2020-11-17 Thread Oscar Salvador
On Wed, Nov 11, 2020 at 03:53:21PM +0100, David Hildenbrand wrote: > Let's revert what we did in case seomthing goes wrong and we return an "something" :-) > error - as already done on arm64 and s390x. > > Cc: Michael Ellerman > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Rashmica Gup

Re: [RFC][PATCH v2 11/21] x86/pti: Extend PTI user mappings

2020-11-17 Thread Andy Lutomirski
On Tue, Nov 17, 2020 at 12:42 AM Alexandre Chartre wrote: > > > On 11/17/20 12:06 AM, Andy Lutomirski wrote: > > On Mon, Nov 16, 2020 at 12:18 PM Alexandre Chartre > > wrote: > >> > >> > >> On 11/16/20 8:48 PM, Andy Lutomirski wrote: > >>> On Mon, Nov 16, 2020 at 6:49 AM Alexandre Chartre > >>>

Re: [PATCH 3/3] sched/numa: Limit the amount of imbalance that can exist at fork time

2020-11-17 Thread Vincent Guittot
On Tue, 17 Nov 2020 at 16:17, Mel Gorman wrote: > > On Tue, Nov 17, 2020 at 03:31:19PM +0100, Vincent Guittot wrote: > > On Tue, 17 Nov 2020 at 15:18, Peter Zijlstra wrote: > > > > > > On Tue, Nov 17, 2020 at 01:42:22PM +, Mel Gorman wrote: > > > > - if (local_sgs.idle_cpu

Re: [RFC][PATCH v2 12/21] x86/pti: Use PTI stack instead of trampoline stack

2020-11-17 Thread Andy Lutomirski
On Tue, Nov 17, 2020 at 7:07 AM Alexandre Chartre wrote: > > > > On 11/16/20 7:34 PM, Andy Lutomirski wrote: > > On Mon, Nov 16, 2020 at 10:10 AM Alexandre Chartre > > wrote: > >> > >> > >> On 11/16/20 5:57 PM, Andy Lutomirski wrote: > >>> On Mon, Nov 16, 2020 at 6:47 AM Alexandre Chartre > >>>

Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-17 Thread Thierry Reding
On Tue, Nov 17, 2020 at 04:43:40PM +0100, Enrico Weigelt, metux IT consult wrote: > The of_match_ptr(foo) macro evaluates to foo, only if > CONFIG_OF is set, otherwise to NULL. Same does ACPI_PTR with > CONFIG_ACPI. That's very helpful for drivers that can be used > with or without oftree / acpi.

Re: [PATCH v2 7/8] powerpc/mm: remove linear mapping if __add_pages() fails in arch_add_memory()

2020-11-17 Thread David Hildenbrand
On 17.11.20 16:51, Oscar Salvador wrote: On Wed, Nov 11, 2020 at 03:53:21PM +0100, David Hildenbrand wrote: Let's revert what we did in case seomthing goes wrong and we return an "something" :-) Thanks! :) @Michael, I assume if I don't have to resend, this can be fixed up? -- Thanks, David

Re: [PATCH 1/4] drivers core: Introduce CPU type sysfs interface

2020-11-17 Thread Brice Goglin
Le 12/11/2020 à 11:49, Greg Kroah-Hartman a écrit : > On Thu, Nov 12, 2020 at 10:10:57AM +0100, Brice Goglin wrote: >> Le 12/11/2020 à 07:42, Greg Kroah-Hartman a écrit : >>> On Thu, Nov 12, 2020 at 07:19:48AM +0100, Brice Goglin wrote: Hello Sorry for the late reply. As the f

[PATCH v3] firmware: arm_scmi: Add SCMI System Power Control driver

2020-11-17 Thread Cristian Marussi
Add an SCMI System Power control driver to handle platform's requests carried by SYSTEM_POWER_STATE_NOTIFIER notifications: such platform requested system-wide power state transitions are handled accordingly, gracefully or forcefully, depending on the notifications' message flags. Graceful request

Re: [RFC PATCH 8/9] cxl/mem: Register CXL memX devices

2020-11-17 Thread Jonathan Cameron
On Tue, 10 Nov 2020 21:43:55 -0800 Ben Widawsky wrote: > From: Dan Williams > > Create the /sys/bus/cxl hierarchy to enumerate memory devices > (per-endpoint control devices), memory address space devices (platform > address ranges with interleaving, performance, and persistence > attributes),

[PATCH] drm: imx: Move fbdev setup to before output polling

2020-11-17 Thread Mark Jonas
From: Leo Ruan The generic fbdev has to be setup before enabling output polling. Otherwise the fbdev client is not ready to handle delayed events. Since f53705fd, the generic fbdev is setup after the output polling init. During fbdev setup, when fbdev probes attached outputs and a status changes

Re: [PATCH v8 2/9] mmap: make mlock_future_check() global

2020-11-17 Thread Mike Rapoport
On Tue, Nov 17, 2020 at 04:09:39PM +0100, David Hildenbrand wrote: > On 15.11.20 09:26, Mike Rapoport wrote: > > On Thu, Nov 12, 2020 at 09:15:18PM +0100, David Hildenbrand wrote: ... > > My thinking was that since secretmem does what mlock() does wrt > > swapability, it should at least obey the

[PATCH][next] iwlwifi: dvm: Fix fall-through warnings for Clang

2020-11-17 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly using the fallthrough pseudo-keyword as a replacement for a number of "fall through" markings. Notice that Clang doesn't recognize "fall through" comments as implicit fall-through. Link: https://github.

Re: [PATCH v2] checkpatch: add fix option for ASSIGNMENT_CONTINUATIONS

2020-11-17 Thread Joe Perches
On Tue, 2020-11-17 at 16:22 +0530, Aditya Srivastava wrote: > Currently, checkpatch warns us if an assignment operator is placed > at the start of a line and not at the end of previous line. [] > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -3542,8 +3542,14 @@ sub process { >

Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-17 Thread Lee Jones
On Tue, 17 Nov 2020, Thierry Reding wrote: > On Tue, Nov 17, 2020 at 04:43:40PM +0100, Enrico Weigelt, metux IT consult > wrote: > > The of_match_ptr(foo) macro evaluates to foo, only if > > CONFIG_OF is set, otherwise to NULL. Same does ACPI_PTR with > > CONFIG_ACPI. That's very helpful for driv

[PATCH] (v2) drivers: clk: make gpio-gated clock support optional

2020-11-17 Thread Enrico Weigelt, metux IT consult
The gpio-gate-clock / gpio-mux-clock driver isn't used much, just by a few ARM SoCs, so there's no need to always include it unconditionally. Thus make it optional, but keep it enabled by default. fixes v2: added missing dependency on gpiolib Signed-off-by: Enrico Weigelt, metux IT consult ---

[PATCH v2] unlz4: Handle 0-size chunks, ignore trailing padding

2020-11-17 Thread siarhei . liakh
From: Siarhei Liakh SHORT DESCRIPTION: There are two places in unlz4() function where reads beyond the end of a buffer happen under certain conditions which had been observed in real life on stock Ubuntu 20.04 x86_64 with several vanilla mainline kernels, including 5.10.0. As a result of this is

Re: [PATCH v5 8/8] rpmsg: Turn name service into a stand alone driver

2020-11-17 Thread Guennadi Liakhovetski
On Tue, Nov 17, 2020 at 12:42:30PM +0100, Arnaud POULIQUEN wrote: [snip] > diff --git a/drivers/rpmsg/rpmsg_ns.c b/drivers/rpmsg/rpmsg_ns.c > index 5bda7cb44618..80c2cc23bada 100644 > --- a/drivers/rpmsg/rpmsg_ns.c > +++ b/drivers/rpmsg/rpmsg_ns.c > @@ -55,6 +55,39 @@ static int rpmsg_ns_cb(struc

Re: [PATCH 2/3] iio: adc: ad7887: convert driver to full DT probing

2020-11-17 Thread Jonathan Cameron
On Tue, 17 Nov 2020 17:03:06 +0200 Alexandru Ardelean wrote: > On Tue, Nov 17, 2020 at 1:06 PM Jonathan Cameron > wrote: > > > > On Tue, 17 Nov 2020 11:01:11 + > > Jonathan Cameron wrote: > > > > > On Tue, 17 Nov 2020 09:52:53 +0200 > > > Alexandru Ardelean wrote: > > > > > > > This ch

[PATCH v2 net-next 1/5] ptp: clockmatrix: bug fix for idtcm_strverscmp

2020-11-17 Thread min.li.xe
From: Min Li Feed kstrtou8 with NULL terminated string. Changes since v1: -Only strcpy 15 characters to leave 1 space for '\0' Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 52 +++ 1 file changed, 38 insertions(+), 14 deletions(-) diff --gi

Re: [PATCH v4 01/10] Add auxiliary bus support

2020-11-17 Thread Greg KH
On Tue, Nov 17, 2020 at 03:57:24PM +0200, Leon Romanovsky wrote: > On Tue, Nov 17, 2020 at 01:48:08PM +, Mark Brown wrote: > > On Tue, Nov 17, 2020 at 07:30:00AM +0200, Leon Romanovsky wrote: > > > On Fri, Nov 13, 2020 at 08:18:50AM -0800, Dave Ertman wrote: > > > > > > Add support for the Auxi

Re: [PATCH v4 2/2] arm64: kvm: Introduce MTE VCPU feature

2020-11-17 Thread Catalin Marinas
Hi Steven, On Mon, Oct 26, 2020 at 03:57:27PM +, Steven Price wrote: > diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > index 19aacc7d64de..38fe25310ca1 100644 > --- a/arch/arm64/kvm/mmu.c > +++ b/arch/arm64/kvm/mmu.c > @@ -862,6 +862,26 @@ static int user_mem_abort(struct kvm_vcpu *

Re: [PATCH v2 2/4] Documentation/powercap/dtpm: Add documentation for dtpm

2020-11-17 Thread Jonathan Corbet
On Mon, 16 Nov 2020 16:26:47 +0100 Daniel Lezcano wrote: > The dynamic thermal and power management is a technique to dynamically > adjust the power consumption of different devices in order to ensure a > global thermal constraint. > > An userspace daemon is usually monitoring the temperature an

[PATCH v2 net-next 2/5] ptp: clockmatrix: reset device and check BOOT_STATUS

2020-11-17 Thread min.li.xe
From: Min Li SM_RESET device only when loading full configuration and check for BOOT_STATUS. Also remove polling for write trigger done in _idtcm_settime(). Signed-off-by: Min Li --- drivers/ptp/idt8a340_reg.h| 1 + drivers/ptp/ptp_clockmatrix.c | 152

[PATCH][next] mwifiex: Fix fall-through warnings for Clang

2020-11-17 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/net/wireless/ma

[PATCH 4.14 54/85] drm/gma500: Fix out-of-bounds access to struct drm_device.vblank[]

2020-11-17 Thread Greg Kroah-Hartman
From: Thomas Zimmermann commit 06ad8d339524bf94b89859047822c31df6ace239 upstream. The gma500 driver expects 3 pipelines in several it's IRQ functions. Accessing struct drm_device.vblank[], this fails with devices that only have 2 pipelines. An example KASAN report is shown below. [ 62.26768

[PATCH 4.19 082/101] drm/gma500: Fix out-of-bounds access to struct drm_device.vblank[]

2020-11-17 Thread Greg Kroah-Hartman
From: Thomas Zimmermann commit 06ad8d339524bf94b89859047822c31df6ace239 upstream. The gma500 driver expects 3 pipelines in several it's IRQ functions. Accessing struct drm_device.vblank[], this fails with devices that only have 2 pipelines. An example KASAN report is shown below. [ 62.26768

[PATCH 5.4 024/151] iommu/vt-d: Fix a bug for PDP check in prq_event_thread

2020-11-17 Thread Greg Kroah-Hartman
From: Liu, Yi L [ Upstream commit 71cd8e2d16703a9df5c86a9e19f4cba99316cc53 ] In prq_event_thread(), the QI_PGRP_PDP is wrongly set by 'req->pasid_present' which should be replaced to 'req->priv_data_present'. Fixes: 5b438f4ba315 ("iommu/vt-d: Support page request in scalable mode") Signed-off-b

[rcu:dev.2020.11.15a] BUILD SUCCESS 0cbf40a040eee93f0060e7eebac98c91ef6af021

2020-11-17 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2020.11.15a branch HEAD: 0cbf40a040eee93f0060e7eebac98c91ef6af021 rcu: Allow rcu_irq_enter_check_tick() from NMI elapsed time: 726m configs tested: 163 configs skipped: 2 The following configs have been b

[PATCH 4.4 38/64] drm/gma500: Fix out-of-bounds access to struct drm_device.vblank[]

2020-11-17 Thread Greg Kroah-Hartman
From: Thomas Zimmermann commit 06ad8d339524bf94b89859047822c31df6ace239 upstream. The gma500 driver expects 3 pipelines in several it's IRQ functions. Accessing struct drm_device.vblank[], this fails with devices that only have 2 pipelines. An example KASAN report is shown below. [ 62.26768

[PATCH 5.4 134/151] drm/gma500: Fix out-of-bounds access to struct drm_device.vblank[]

2020-11-17 Thread Greg Kroah-Hartman
From: Thomas Zimmermann commit 06ad8d339524bf94b89859047822c31df6ace239 upstream. The gma500 driver expects 3 pipelines in several it's IRQ functions. Accessing struct drm_device.vblank[], this fails with devices that only have 2 pipelines. An example KASAN report is shown below. [ 62.26768

Re: [PATCH] fix namespaced fscaps when !CONFIG_SECURITY

2020-11-17 Thread Andrew G. Morgan
Signed-off-by: Andrew G. Morgan On Tue, Nov 17, 2020 at 7:09 AM Serge E. Hallyn wrote: > > Namespaced file capabilities were introduced in 8db6c34f1dbc . > When userspace reads an xattr for a namespaced capability, a > virtualized representation of it is returned if the caller is > in a user na

[PATCH 5.9 230/255] drm/gma500: Fix out-of-bounds access to struct drm_device.vblank[]

2020-11-17 Thread Greg Kroah-Hartman
From: Thomas Zimmermann commit 06ad8d339524bf94b89859047822c31df6ace239 upstream. The gma500 driver expects 3 pipelines in several it's IRQ functions. Accessing struct drm_device.vblank[], this fails with devices that only have 2 pipelines. An example KASAN report is shown below. [ 62.26768

Re: [PATCH net-next] r8153_ecm: avoid to be prior to r8152 driver

2020-11-17 Thread Jakub Kicinski
On Tue, 17 Nov 2020 01:50:03 + Hayes Wang wrote: > Jakub Kicinski > > Sent: Tuesday, November 17, 2020 1:03 AM > [...] > > > Yes, this fixes this issue, although I would prefer a separate Kconfig > > > entry for r8153_ecm with proper dependencies instead of this ifdefs in > > > Makefile. >

[PATCH 5.4 112/151] KVM: arm64: Dont hide ID registers from userspace

2020-11-17 Thread Greg Kroah-Hartman
From: Andrew Jones commit f81cb2c3ad41ac6d8cb2650e3d72d5f67db1aa28 upstream. ID registers are RAZ until they've been allocated a purpose, but that doesn't mean they should be removed from the KVM_GET_REG_LIST list. So far we only have one register, SYS_ID_AA64ZFR0_EL1, that is hidden from usersp

[PATCH 5.9 191/255] KVM: arm64: Dont hide ID registers from userspace

2020-11-17 Thread Greg Kroah-Hartman
From: Andrew Jones commit f81cb2c3ad41ac6d8cb2650e3d72d5f67db1aa28 upstream. ID registers are RAZ until they've been allocated a purpose, but that doesn't mean they should be removed from the KVM_GET_REG_LIST list. So far we only have one register, SYS_ID_AA64ZFR0_EL1, that is hidden from usersp

[PATCH 5.9 041/255] iommu/vt-d: Fix a bug for PDP check in prq_event_thread

2020-11-17 Thread Greg Kroah-Hartman
From: Liu, Yi L [ Upstream commit 71cd8e2d16703a9df5c86a9e19f4cba99316cc53 ] In prq_event_thread(), the QI_PGRP_PDP is wrongly set by 'req->pasid_present' which should be replaced to 'req->priv_data_present'. Fixes: 5b438f4ba315 ("iommu/vt-d: Support page request in scalable mode") Signed-off-b

[PATCH 4.9 49/78] drm/gma500: Fix out-of-bounds access to struct drm_device.vblank[]

2020-11-17 Thread Greg Kroah-Hartman
From: Thomas Zimmermann commit 06ad8d339524bf94b89859047822c31df6ace239 upstream. The gma500 driver expects 3 pipelines in several it's IRQ functions. Accessing struct drm_device.vblank[], this fails with devices that only have 2 pipelines. An example KASAN report is shown below. [ 62.26768

Re: [PATCH] checkpatch: Fix unescaped left brace

2020-11-17 Thread Joe Perches
On Tue, 2020-11-17 at 14:37 +0530, Dwaipayan Ray wrote: > I have seen that > the perl_version_ok check mandates perl 5.10 which was > released more than 10 years back. > > Do you think that check could be removed completely? > Maybe sometime in the future or just have it lay around > for backward

Re: [PATCH v2] mfd: syscon: Add syscon_regmap_lookup_by_phandle_optional() function.

2020-11-17 Thread Lee Jones
On Tue, 17 Nov 2020, Matthias Brugger wrote: > > > On 17/11/2020 13:37, Lee Jones wrote: > > On Tue, 17 Nov 2020, Matthias Brugger wrote: > > > > > Hi Lee, > > > > > > On 13/11/2020 11:19, Lee Jones wrote: > > > > On Tue, 10 Nov 2020, Enric Balletbo i Serra wrote: > > > > > > > > > This adds

Re: [PATCH] sched: Fix data-race in wakeup

2020-11-17 Thread Peter Zijlstra
On Tue, Nov 17, 2020 at 03:37:24PM +, Valentin Schneider wrote: > >> + /* > >> + * This field must not be in the scheduler word above due to wakelist > >> + * queueing no longer being serialized by p->on_cpu. However: > >> + * > >> + * p->XXX = X; ttwu() > >> + * sc

Re: [PATCH v2 01/13] seqnum_ops: Introduce Sequence Number Ops

2020-11-17 Thread Shuah Khan
On 11/16/20 7:53 AM, Peter Zijlstra wrote: On Fri, Nov 13, 2020 at 10:46:03AM -0700, Shuah Khan wrote: +Increment interface +--- + +Increments sequence number and returns the new value. :: + +seqnum32_inc_return() --> (u32) atomic_inc_return(seqnum) +seqnum64_inc

Re: [PATCH][next] mwifiex: Fix fall-through warnings for Clang

2020-11-17 Thread Joe Perches
On Tue, 2020-11-17 at 10:09 -0600, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > warnings by explicitly adding multiple break statements instead of > letting the code fall through to the next case. Thanks Gustavo. I think this is better sty

Re: [PATCH v2 3/6] dt-bindings: ata: tegra: Convert binding documentation to YAML

2020-11-17 Thread Sowjanya Komatineni
On 11/16/20 7:00 AM, Rob Herring wrote: On Fri, 13 Nov 2020 11:36:55 -0800, Sowjanya Komatineni wrote: This patch converts text based dt-binding document to YAML based dt-binding document. Signed-off-by: Sowjanya Komatineni --- .../devicetree/bindings/ata/nvidia,tegra-ahci.yaml | 137 +

Re: [PATCH v3] firmware: arm_scmi: Add SCMI System Power Control driver

2020-11-17 Thread Greg KH
On Tue, Nov 17, 2020 at 03:57:25PM +, Cristian Marussi wrote: > +/** > + * scmi_request_timeout - On timeout trigger a forceful transition > + * @t: The timer reference > + * > + * Actual work is deferred out of the timer IRQ context since shutdown/reboot > + * code do not play well when !in_t

[RFC PATCH 00/12] iio: core,buffer: add support for multiple IIO buffers per IIO device

2020-11-17 Thread Alexandru Ardelean
Continuing from: https://lore.kernel.org/linux-iio/20200517144023.6c5cb169@archlinux/ This is a V2 of the initial attempt in the discussion above. But it did not occur to me that I should mark it as V2 when I generated the patches. I've only tested [so far] that the current IIO buffer mechnism s

[RFC PATCH 07/12] iio: buffer: re-route core buffer attributes via it's new kobj_type

2020-11-17 Thread Alexandru Ardelean
For the buffer attributes that are present inside the IIO core buffer logic we can re-route them to expand the attribute into iio_buffer objects. The rest, will still expand to device_attributes. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 113 +

[RFC PATCH 09/12] iio: re-route all buffer attributes through new buffer kobj_type

2020-11-17 Thread Alexandru Ardelean
Now that the iio_buffer_set_attrs() has been removed, we can be sure that no accidents can happen with drivers that try to provide extra buffer attributes that expand to iio_dev objects. So, we can convert all remaining buffer attributes to expand to iio_buffer objects. These will look a bit weird

Re: [PATCH] namespace: make timens_on_fork() return nothing

2020-11-17 Thread Hui Su
Please ignore this change.

[PATCH v2 1/4] arm64: dts: ti: k3: squelch warning about lack of #interrupt-cells

2020-11-17 Thread Sekhar Nori
There are couple of places where INTA interrupt controller lacks #interrupt-cells property. This leads to warnings of the type: arch/arm64/boot/dts/ti/k3-j721e-main.dtsi:147.51-156.5: Warning (interrupt_provider): /bus@10/main-navss/interrupt-controller@33d0: Missing #interrupt-cells in

[RFC PATCH 10/12] iio: core: wrap iio device & buffer into struct for character devices

2020-11-17 Thread Alexandru Ardelean
In order to keep backwards compatibility with the current chardev mechanism, and in order to add support for multiple buffers per IIO device, we need to pass both the IIO device & IIO buffer to the chardev. This is particularly needed for the iio_buffer_read_outer() function, where we need to pass

[RFC PATCH 12/12] iio: buffer: add ioctl() to support opening extra buffers for IIO device

2020-11-17 Thread Alexandru Ardelean
With this change, an ioctl() call is added to open a character device for a buffer. The ioctl() will not work for the first buffer, as that buffer is already opened/reserved for the IIO device's character device. This is also to preserve backwards compatibility. For any other extra buffer (after t

[PATCH v2 2/4] arm64: dts: ti: k3: squelch warnings regarding no #address-cells for interrupt-controller

2020-11-17 Thread Sekhar Nori
With dtc 1.6.0, building TI device-tree files with W=2 results in warnings like below for all interrupt controllers. /bus@10/bus@3000/interrupt-controller1: Missing #address-cells in interrupt provider Fix these by adding #address-cells = <0>; for all interrupt controllers in TI device-t

[PATCH v2] namespace: make timens_on_fork() return nothing

2020-11-17 Thread Hui Su
timens_on_fork() always return 0, and maybe not need to judge the return value in copy_namespaces(). So make timens_on_fork() return nothing and do not judge its return val in copy_namespaces(). Signed-off-by: Hui Su --- include/linux/time_namespace.h | 6 +++--- kernel/nsproxy.c

[RFC PATCH 04/12] iio: buffer: add index to the first IIO buffer dir and symlink it back

2020-11-17 Thread Alexandru Ardelean
This change makes it so that the first buffer directory is named 'buffer0' and moves the 'scan_elements' under it. For backwards compatibility these folders are symlinked back to the original folders. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 38 +

[RFC PATCH 05/12] iio: core: split __iio_device_attr_init() to init only the attr object

2020-11-17 Thread Alexandru Ardelean
The __iio_device_attr_init() function initializes a device_attribute object, but mostly it just does a lot of name creation logic. We will want to re-use this logic for name-creation, so this change re-purposes the __iio_device_attr_init() to be a __iio_attr_init() function which just handles the

[RFC PATCH 08/12] iio: buffer: add helper to get the IIO device to which a buffer belongs

2020-11-17 Thread Alexandru Ardelean
This is useful for drivers that may have a reference to an IIO buffer, to be able to get a reference back to the IIO device. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 14 ++ include/linux/iio/buffer.h| 2 ++ 2 files changed, 16 insertions(+)

[PATCH v2 3/4] arm64: dts: ti: k3-j7200: Add gpio nodes

2020-11-17 Thread Sekhar Nori
From: Faiz Abbas There are 4 instances of gpio modules in main domain: gpio0, gpio2, gpio4 and gpio6 Groups are created to provide protection between different processor virtual worlds. Each of these modules I/O pins are muxed within the group. Exactly one module can be selected to contr

Re: [PATCH] ring-buffer: remove obsolete rb_event_is_commit()

2020-11-17 Thread Nathan Chancellor
On Tue, Nov 17, 2020 at 06:37:03AM +0100, Lukas Bulwahn wrote: > Commit a389d86f7fd0 ("ring-buffer: Have nested events still record running > time stamp") removed the only uses of rb_event_is_commit() in > rb_update_event() and rb_update_write_stamp(). > > Hence, since then, make CC=clang W=1 warn

[RFC PATCH 11/12] iio: buffer: introduce support for attaching more IIO buffers

2020-11-17 Thread Alexandru Ardelean
With this change, calling iio_device_attach_buffer() will actually attach more buffers. Right now this doesn't do any validation of whether a buffer is attached twice; maybe that can be added later (if needed). Attaching a buffer more than once should yield noticeably bad results. The first buffer

[RFC PATCH 03/12] iio: buffer: rework buffer & scan_elements dir creation

2020-11-17 Thread Alexandru Ardelean
When adding more than one IIO buffer per IIO device, we will need to create a buffer & scan_elements directory for each buffer. We also want to move the 'scan_elements' to be a sub-directory of the 'buffer' folder. The format we want to reach is, for a iio:device0 folder, for 2 buffers [for exampl

[RFC PATCH 02/12] iio: buffer: add back-ref from iio_buffer to iio_dev

2020-11-17 Thread Alexandru Ardelean
An IIO device will have multiple buffers, but it shouldn't be allowed that an IIO buffer should belong to more than 1 IIO device. Once things get moved more from IIO device to the IIO buffer, and an IIO device will be able to have more than 1 buffer attached, there will be a need for a back-ref to

[RFC PATCH 01/12] iio: core: register chardev only if needed

2020-11-17 Thread Alexandru Ardelean
We only need a chardev if we need to support buffers and/or events. With this change, a chardev will be created only if an IIO buffer is attached OR an event_interface is configured. Otherwise, no chardev will be created, and the IIO device will get registered with the 'device_add()' call. Quite

[PATCH v2 0/4] arm64: dts: ti: J7200 GPIO support and warning fixes

2020-11-17 Thread Sekhar Nori
These patches add gpio support for TI's J7200 platform. The first two patches fix existing warnings in preparation for adding GPIO support. Changes in v2: - Add patches fixing existing warnings so GPIO support does not end up adding more warnings - Addressed Nishanth's comments on GPIO patches

[PATCH v2 4/4] arm64: dts: ti: k3-j7200-common-proc-board: Disable unused gpio modules

2020-11-17 Thread Sekhar Nori
From: Faiz Abbas There are 6 gpio instances inside SoC with 2 groups as show below: Group one: wkup_gpio0, wkup_gpio1 Group two: main_gpio0, main_gpio2, main_gpio4, main_gpio6 Only one instance from each group can be used at a time. So use main_gpio0 and wkup_gpio0 in current lin

[RFC PATCH 06/12] iio: buffer: re-route scan_elements via it's kobj_type

2020-11-17 Thread Alexandru Ardelean
The scan_elements attributes are solely located inside 'industrialio-buffer-sysfs.c'. In order to support more than one buffer per IIO device, we need to expand scan_elements attributes directly to IIO buffer object, and not the IIO device. This also requires that a new 'iio_buffer_attr' type be a

Re: [PATCH 1/2] kbuild: Hoist '--orphan-handling' into Kconfig

2020-11-17 Thread Nathan Chancellor
On Tue, Nov 17, 2020 at 10:03:29PM +1100, Michael Ellerman wrote: > Nathan Chancellor writes: > > Currently, '--orphan-handling=warn' is spread out across four different > > architectures in their respective Makefiles, which makes it a little > > unruly to deal with in case it needs to be disabled

Re: [PATCH] USB: serial: mos7720: defer state restore to a workqueue

2020-11-17 Thread Johan Hovold
On Mon, Nov 16, 2020 at 02:31:02PM -0800, Davidlohr Bueso wrote: > On Mon, 16 Nov 2020, Johan Hovold wrote: > > >On Fri, Nov 13, 2020 at 08:27:25PM -0800, Davidlohr Bueso wrote: > >> @@ -1883,21 +1724,17 @@ static void mos7720_release(struct usb_serial > >> *serial) > >>if (mos_parpor

[PATCH v9 0/9] mm: introduce memfd_secret system call to create "secret" memory areas

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport Hi, This is an implementation of "secret" mappings backed by a file descriptor. The file descriptor backing secret memory mappings is created using a dedicated memfd_secret system call The desired protection mode for the memory is configured using flags parameter of the syst

Re: [External] RE: [PATCH v4 00/21] Free some vmemmap pages of hugetlb page

2020-11-17 Thread Muchun Song
On Tue, Nov 17, 2020 at 7:08 PM Song Bao Hua (Barry Song) wrote: > > > > > -Original Message- > > From: Muchun Song [mailto:songmuc...@bytedance.com] > > Sent: Tuesday, November 17, 2020 11:50 PM > > To: Song Bao Hua (Barry Song) > > Cc: cor...@lwn.net; mike.krav...@oracle.com; t...@linut

[PATCH v2 net-next 5/5] ptp: clockmatrix: deprecate firmware older than 4.8.7

2020-11-17 Thread min.li.xe
From: Min Li Add deprecated flag to indicate < v4.8.7. Fix idtcm_enable_tod() call correct settime(). Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 69 --- drivers/ptp/ptp_clockmatrix.h | 11 +++ 2 files changed, 45 insertions(+), 35 dele

Re: [PATCH v4 00/16] Overhaul multi-page lookups for THP

2020-11-17 Thread Hugh Dickins
On Tue, 17 Nov 2020, Matthew Wilcox wrote: > On Mon, Nov 16, 2020 at 02:34:34AM -0800, Hugh Dickins wrote: > > Fix to [PATCH v4 15/16] mm/truncate,shmem: Handle truncates that split THPs. > > One machine ran fine, swapping and building in ext4 on loop0 on huge tmpfs; > > one machine got occasional

[PATCH v2 net-next 4/5] ptp: clockmatrix: Fix non-zero phase_adj is lost after snap

2020-11-17 Thread min.li.xe
From: Min Li Fix non-zero phase_adj is lost after snap. Use ktime_sub to do ktime_t subtraction. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 210 +- drivers/ptp/ptp_clockmatrix.h | 5 +- 2 files changed, 190 insertions(+), 25 deletions(-)

[PATCH v9 3/9] set_memory: allow set_direct_map_*_noflush() for multiple pages

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport The underlying implementations of set_direct_map_invalid_noflush() and set_direct_map_default_noflush() allow updating multiple contiguous pages at once. Add numpages parameter to set_direct_map_*_noflush() to expose this ability with these APIs. Signed-off-by: Mike Rapoport

[PATCH v9 7/9] PM: hibernate: disable when there are active secretmem users

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport It is unsafe to allow saving of secretmem areas to the hibernation snapshot as they would be visible after the resume and this essentially will defeat the purpose of secret memory mappings. Prevent hibernation whenever there are active secret memory users. Signed-off-by: Mik

[PATCH v9 4/9] mm: introduce memfd_secret system call to create "secret" memory areas

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport Introduce "memfd_secret" system call with the ability to create memory areas visible only in the context of the owning process and not mapped not only to other processes but in the kernel page tables as well. The user will create a file descriptor using the memfd_secret() sys

[PATCH v9 8/9] arch, mm: wire up memfd_secret system call were relevant

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport Wire up memfd_secret system call on architectures that define ARCH_HAS_SET_DIRECT_MAP, namely arm64, risc-v and x86. Signed-off-by: Mike Rapoport Acked-by: Palmer Dabbelt Acked-by: Arnd Bergmann --- arch/arm64/include/asm/unistd.h| 2 +- arch/arm64/include/asm/uni

Re: md: dm-writeback: add __noreturn to BUG-ging function

2020-11-17 Thread Mike Snitzer
On Mon, Nov 16 2020 at 6:00pm -0500, Randy Dunlap wrote: > On 11/15/20 11:30 PM, Christian Borntraeger wrote: > > > > > > On 13.11.20 23:52, Randy Dunlap wrote: > >> Building on arch/s390/ flags this as an error, so add the > >> __noreturn attribute modifier to prevent the build error. > >> >

[PATCH v9 9/9] secretmem: test: add basic selftest for memfd_secret(2)

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport The test verifies that file descriptor created with memfd_secret does not allow read/write operations, that secret memory mappings respect RLIMIT_MEMLOCK and that remote accesses with process_vm_read() and ptrace() to the secret memory fail. Signed-off-by: Mike Rapoport ---

Re: possible deadlock in brd_probe

2020-11-17 Thread Christoph Hellwig
I think this is a false positive due to the cycling through different bd_mutex instances. I think my next big series aimed at 5.11 will fix this as a side effect, so I plan to ignore this for now, but will test the reproducer with the follow on work applied eventually. On Tue, Nov 17, 2020 at 02:

[PATCH] namespace: make timens_on_fork() return nothing

2020-11-17 Thread Hui Su
timens_on_fork() always return 0, and maybe not need to judge the return value in copy_namespaces(). So make timens_on_fork() return nothing and do not judge its return val in copy_namespaces(). Signed-off-by: Hui Su --- include/linux/time_namespace.h | 6 +++--- kernel/nsproxy.c

[PATCH v9 1/9] mm: add definition of PMD_PAGE_ORDER

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport The definition of PMD_PAGE_ORDER denoting the number of base pages in the second-level leaf page is already used by DAX and maybe handy in other cases as well. Several architectures already have definition of PMD_ORDER as the size of second level page table, so to avoid confl

Re: [PATCH][next] mwifiex: Fix fall-through warnings for Clang

2020-11-17 Thread Gustavo A. R. Silva
On Tue, Nov 17, 2020 at 08:15:59AM -0800, Joe Perches wrote: > On Tue, 2020-11-17 at 10:09 -0600, Gustavo A. R. Silva wrote: > > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > > warnings by explicitly adding multiple break statements instead of > > letting the code fall t

[PATCH v9 2/9] mmap: make mlock_future_check() global

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport It will be used by the upcoming secret memory implementation. Signed-off-by: Mike Rapoport --- mm/internal.h | 3 +++ mm/mmap.c | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mm/internal.h b/mm/internal.h index c43ccdddb0f6..ae146a260b14 10064

Re: [PATCH 0/8] cppc_cpufreq: fix, clarify and improve support

2020-11-17 Thread Rafael J. Wysocki
On Tue, Nov 17, 2020 at 4:32 PM Ionela Voinescu wrote: > > Hi Rafael, > > On Tuesday 17 Nov 2020 at 15:59:24 (+0100), Rafael J. Wysocki wrote: > > On Thu, Nov 5, 2020 at 1:56 PM Ionela Voinescu > > wrote: > > > > > > Hi guys, > > > > > > I found myself staring a bit too much at this driver in th

[PATCH v9 5/9] secretmem: use PMD-size pages to amortize direct map fragmentation

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport Removing a PAGE_SIZE page from the direct map every time such page is allocated for a secret memory mapping will cause severe fragmentation of the direct map. This fragmentation can be reduced by using PMD-size pages as a pool for small pages for secret memory mappings. Add a

[PATCH v9 6/9] secretmem: add memcg accounting

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport Account memory consumed by secretmem to memcg. The accounting is updated when the memory is actually allocated and freed. Signed-off-by: Mike Rapoport --- mm/filemap.c | 3 ++- mm/secretmem.c | 36 +++- 2 files changed, 37 insertions(+), 2

[PATCH v2 net-next 0/5] ptp_clockmatrix bug fix and improvement

2020-11-17 Thread min.li.xe
From: Min Li This patch series is aiming at submitting the latest bug fixes and code improvements of PHC driver for Renesas CLOCKMATRIX timing card. The code has been thouroughly tested in both customer labs and Renesas internal lab using the latest linuxptp program on Xilinx ZCU102 platform. Ch

[PATCH] kcsan: Avoid scheduler recursion by using non-instrumented preempt_disable()

2020-11-17 Thread Marco Elver
When enabling KCSAN for kernel/sched (remove KCSAN_SANITIZE := n from kernel/sched/Makefile), with CONFIG_DEBUG_PREEMPT=y, we can observe recursion due to: check_access() [via instrumentation] kcsan_setup_watchpoint() reset_kcsan_skip() kcsan_prandom_u32

Re: [PATCH v2 01/13] seqnum_ops: Introduce Sequence Number Ops

2020-11-17 Thread Shuah Khan
On 11/13/20 2:03 PM, Matthew Wilcox wrote: +== +Sequence Number Operations +== + +:Author: Shuah Khan +:Copyright: |copy| 2020, The Linux Foundation +:Copyright: |copy| 2020, Shuah Khan + +Sequence Number api provides interfaces for unsigned up cou

Re: [RFC PATCH 7/9] cxl/mem: Implement polled mode mailbox

2020-11-17 Thread Ben Widawsky
On 20-11-17 15:31:22, Jonathan Cameron wrote: > On Tue, 10 Nov 2020 21:43:54 -0800 > Ben Widawsky wrote: > > > Create a function to handle sending a command, optionally with a > > payload, to the memory device, polling on a result, and then optionally > > copying out the payload. The algorithm fo

Re: [RFC, v1 0/3] msi support for platform devices

2020-11-17 Thread Vikas Gupta
Hi Eric, On Tue, Nov 17, 2020 at 1:55 PM Auger Eric wrote: > > Hi Vikas, > > On 11/17/20 9:05 AM, Auger Eric wrote: > > Hi Vikas, > > > > On 11/17/20 7:25 AM, Vikas Gupta wrote: > >> Hi Eric, > >> > >> On Mon, Nov 16, 2020 at 6:44 PM Auger Eric wrote: > >>> > >>> Hi Vikas, > >>> > >>> On 11/13/2

Re: Time to re-enable Runtime PM per default for PCI devcies?

2020-11-17 Thread Bjorn Helgaas
[+to Rafael, author of the commit you mentioned, +cc Mika, Kai Heng, Lukas, linux-pm, linux-kernel] On Tue, Nov 17, 2020 at 04:56:09PM +0100, Heiner Kallweit wrote: > More than 10 yrs ago Runtime PM was disabled per default by bb910a7040 > ("PCI/PM Runtime: Make runtime PM of PCI devices inactive

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