Re: [PATCH 26/34] Documentation/RCU: Use CONFIG_PREEMPTION where appropriate

2019-10-16 Thread Paul E. McKenney
On Wed, Oct 16, 2019 at 09:31:32AM +0200, Sebastian Andrzej Siewior wrote: > On 2019-10-15 21:13:30 [-0700], Paul E. McKenney wrote: > > Sadly, this one ran afoul of the .txt-to-.rst migration. Even applying > > it against linus/master and cherry-picking it does not help. I will > > defer it for

Re: [PATCH 1/8] kcsan: Add Kernel Concurrency Sanitizer infrastructure

2019-10-16 Thread Boqun Feng
On Wed, Oct 16, 2019 at 12:06:51PM +0200, Marco Elver wrote: > On Wed, 16 Oct 2019 at 11:42, Boqun Feng wrote: > > > > Hi Marco, > > > > On Wed, Oct 16, 2019 at 10:39:52AM +0200, Marco Elver wrote: > > [...] > > > --- /dev/null > > > +++ b/kernel/kcsan/kcsan.c > > > @@ -0,0 +1,81 @@ > > > +// SPDX

[PATCH] hwmon: (ina3221) Add summation feature support

2019-10-16 Thread Nicolin Chen
This patch implements the summation feature of INA3221, mainly the SCC (enabling) and SF (warning flag) bits of MASK_ENABLE register, INA3221_SHUNT_SUM (summation of shunt voltages) register, and the INA3221_CRIT_SUM (its critical alert setting) register. Although the summation feature allows user

Re: [PATCH v11 3/6] of: property: Add functional dependency link from DT bindings

2019-10-16 Thread Stephen Boyd
Quoting Saravana Kannan (2019-10-08 11:57:49) > On Tue, Oct 8, 2019 at 7:53 AM Stephen Boyd wrote: > > > > Quoting Greg Kroah-Hartman (2019-10-04 08:37:50) > > > On Wed, Sep 11, 2019 at 03:29:25AM -0700, Stephen Boyd wrote: > > > > Quoting Saravana Kannan (2019-09-04 14:11:22) > > > > > + in

[PATCH] Updated iostats docs

2019-10-16 Thread Albert Vaca Cintora
Previous docs mentioned 11 unsigned long fields, when the reality is that we have 15 fields with a mix of unsigned long and unsigned int. Signed-off-by: Albert Vaca Cintora --- Documentation/admin-guide/iostats.rst | 47 ++- 1 file changed, 24 insertions(+), 23 deletions(

Re: [PATCH 1/8] kcsan: Add Kernel Concurrency Sanitizer infrastructure

2019-10-16 Thread Marco Elver
On Wed, 16 Oct 2019 at 20:44, Peter Zijlstra wrote: > > On Wed, Oct 16, 2019 at 10:39:52AM +0200, Marco Elver wrote: > > > +bool __kcsan_check_watchpoint(const volatile void *ptr, size_t size, > > + bool is_write) > > +{ > > + atomic_long_t *watchpoint; > > + long

Re: [PATCH v3 1/3] kasan: Archs don't check memmove if not support it.

2019-10-16 Thread Palmer Dabbelt
On Mon, 07 Oct 2019 23:11:51 PDT (-0700), nic...@andestech.com wrote: Skip the memmove checking for those archs who don't support it. Signed-off-by: Nick Hu --- mm/kasan/common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/kasan/common.c b/mm/kasan/common.c index 6814d6d6a023..897

Re: [PATCH v3 2/3] kernel/ucounts: expose count of inotify watches in use

2019-10-16 Thread Albert Vaca Cintora
On Sat, Jun 1, 2019 at 8:20 PM Albert Vaca Cintora wrote: > > On Sat, Jun 1, 2019 at 2:00 AM Andrew Morton > wrote: > > > > On Fri, 31 May 2019 21:50:15 +0200 Albert Vaca Cintora > > wrote: > > > > > Adds a readonly 'current_inotify_watches' entry to the user sysctl table. > > > The handler f

Re: [PATCH 1/8] kcsan: Add Kernel Concurrency Sanitizer infrastructure

2019-10-16 Thread Peter Zijlstra
On Wed, Oct 16, 2019 at 10:39:52AM +0200, Marco Elver wrote: > +bool __kcsan_check_watchpoint(const volatile void *ptr, size_t size, > + bool is_write) > +{ > + atomic_long_t *watchpoint; > + long encoded_watchpoint; > + unsigned long flags; > + enum kcsan

Re: [PATCH v10 4/6] mfd: ioc3: Add driver for SGI IOC3 chip

2019-10-16 Thread Thomas Bogendoerfer
On Tue, 15 Oct 2019 12:23:49 -0700 Jakub Kicinski wrote: > On Tue, 15 Oct 2019 14:09:49 +0200, Thomas Bogendoerfer wrote: > > SGI IOC3 chip has integrated ethernet, keyboard and mouse interface. > > It also supports connecting a SuperIO chip for serial and parallel > > interfaces. IOC3 is used in

Re: [PATCH v10 4/6] mfd: ioc3: Add driver for SGI IOC3 chip

2019-10-16 Thread Jakub Kicinski
On Wed, 16 Oct 2019 19:23:21 +0200, Thomas Bogendoerfer wrote: > On Tue, 15 Oct 2019 12:23:49 -0700 > Jakub Kicinski wrote: > > > On Tue, 15 Oct 2019 14:09:49 +0200, Thomas Bogendoerfer wrote: > > > SGI IOC3 chip has integrated ethernet, keyboard and mouse interface. > > > It also supports conn

Re: [PATCH 8/8] x86, kcsan: Enable KCSAN for x86

2019-10-16 Thread Marco Elver
On Wed, 16 Oct 2019 at 18:14, Dave Hansen wrote: > > On 10/16/19 1:39 AM, Marco Elver wrote: > > This patch enables KCSAN for x86, with updates to build rules to not use > > KCSAN for several incompatible compilation units. > > First of all KCSAN looks really interesting! > > For the x86 code, tho

Re: [PATCH v7 0/5] Add initial support for S32V234-EVB

2019-10-16 Thread Stefan-gabriel Mirea
On 10/16/2019 4:17 PM, Greg KH wrote: > > I've taken patch 3 in my tty-next tree. The others should probably go > through an arm-specific tree, right? Thank you very much, Greg! That was all for the tty tree. I think that the other patches should go to the following trees: * git://git.kernel.or

[PATCH] thermal: update header and documentation

2019-10-16 Thread Wei Wang
The commit commit f991de53a8ab ("thermal: make device_register's type argument const") changed APIs, but only when CONFIG_THERMAL enabled case. This patch is partial from https://lkml.org/lkml/2019/5/14/631 which tries to address the same concern, Signed-off-by: Wei Wang --- Documentation/drive

Re: [PATCH v2] tpm/tpm_ftpm_tee: add shutdown call back

2019-10-16 Thread Pavel Tatashin
On Wed, Oct 16, 2019 at 11:12 AM Jarkko Sakkinen wrote: > > On Mon, Oct 14, 2019 at 04:21:35PM -0400, Pavel Tatashin wrote: > > add shutdown call back to close existing session with fTPM TA > > to support kexec scenario. > > Sentences start in English with a capital letter :-) > OK * > > + * ftp

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

2019-10-16 Thread Andy Shevchenko
On Wed, Oct 16, 2019 at 5:52 PM Petr Mladek wrote: > > On Wed 2019-10-16 16:49:41, Andy Shevchenko wrote: > > On Tue, Oct 15, 2019 at 10:07 PM Rasmus Villemoes > > wrote: > > > > > +const char *errname(int err) > > > +{ > > > + const char *name = __errname(err > 0 ? err : -err); > > > > Loo

[PATCH v3] tpm/tpm_ftpm_tee: add shutdown call back

2019-10-16 Thread Pavel Tatashin
Add shutdown call back to close existing session with fTPM TA to support kexec scenario. Add parentheses to function names in comments as specified in kdoc. Signed-off-by: Thirupathaiah Annapureddy Signed-off-by: Pavel Tatashin --- drivers/char/tpm/tpm_ftpm_tee.c | 22 ++ 1

Re: [PATCH 8/8] x86, kcsan: Enable KCSAN for x86

2019-10-16 Thread Dave Hansen
On 10/16/19 1:39 AM, Marco Elver wrote: > This patch enables KCSAN for x86, with updates to build rules to not use > KCSAN for several incompatible compilation units. First of all KCSAN looks really interesting! For the x86 code, though, I'd really appreciate some specific notes on why individual

Re: [PATCH 1/8] kcsan: Add Kernel Concurrency Sanitizer infrastructure

2019-10-16 Thread Marco Elver
On Wed, 16 Oct 2019 at 17:16, Mark Rutland wrote: > > On Wed, Oct 16, 2019 at 10:39:52AM +0200, Marco Elver wrote: > > diff --git a/include/linux/sched.h b/include/linux/sched.h > > index 2c2e56bd8913..34a1d9310304 100644 > > --- a/include/linux/sched.h > > +++ b/include/linux/sched.h > > @@ -1171

Re: [PATCH 1/8] kcsan: Add Kernel Concurrency Sanitizer infrastructure

2019-10-16 Thread Mark Rutland
On Wed, Oct 16, 2019 at 10:39:52AM +0200, Marco Elver wrote: > diff --git a/include/linux/sched.h b/include/linux/sched.h > index 2c2e56bd8913..34a1d9310304 100644 > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -1171,6 +1171,13 @@ struct task_struct { > #ifdef CONFIG_KASAN >

Re: [PATCH v2] tpm/tpm_ftpm_tee: add shutdown call back

2019-10-16 Thread Jarkko Sakkinen
On Mon, Oct 14, 2019 at 04:21:35PM -0400, Pavel Tatashin wrote: > add shutdown call back to close existing session with fTPM TA > to support kexec scenario. Sentences start in English with a capital letter :-) > > Signed-off-by: Thirupathaiah Annapureddy > Signed-off-by: Pavel Tatashin > --- >

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

2019-10-16 Thread Petr Mladek
On Wed 2019-10-16 16:49:41, Andy Shevchenko wrote: > On Tue, Oct 15, 2019 at 10:07 PM Rasmus Villemoes > wrote: > > > +const char *errname(int err) > > +{ > > + const char *name = __errname(err > 0 ? err : -err); > > Looks like mine comment left unseen. > What about to simple use abs(err)

Re: [PATCH 1/8] kcsan: Add Kernel Concurrency Sanitizer infrastructure

2019-10-16 Thread Marco Elver
> > diff --git a/Documentation/dev-tools/kcsan.rst > > b/Documentation/dev-tools/kcsan.rst > > new file mode 100644 > > index ..5b46cc5593c3 > > --- /dev/null > > +++ b/Documentation/dev-tools/kcsan.rst > > @@ -0,0 +1,202 @@ > > +The Kernel Concurrency Sanitizer (KCSAN) > > +==

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

2019-10-16 Thread Andy Shevchenko
On Tue, Oct 15, 2019 at 10:07 PM Rasmus Villemoes wrote: > +const char *errname(int err) > +{ > + const char *name = __errname(err > 0 ? err : -err); Looks like mine comment left unseen. What about to simple use abs(err) here? > + if (!name) > + return NULL; > + > +

Re: [PATCH v6 2/2] drivers/perf: Add CCPI2 PMU support in ThunderX2 UNCORE driver.

2019-10-16 Thread John Garry
+TX2_EVENT_ATTR(req_pktsent, CCPI2_EVENT_REQ_PKT_SENT); +TX2_EVENT_ATTR(snoop_pktsent, CCPI2_EVENT_SNOOP_PKT_SENT); +TX2_EVENT_ATTR(data_pktsent, CCPI2_EVENT_DATA_PKT_SENT); +TX2_EVENT_ATTR(gic_pktsent, CCPI2_EVENT_GIC_PKT_SENT); + +static struct attribute *ccpi2_pmu_events_attrs[] = { +

Re: [PATCH v7 0/5] Add initial support for S32V234-EVB

2019-10-16 Thread Greg KH
On Wed, Oct 16, 2019 at 03:48:22PM +0300, Stefan-Gabriel Mirea wrote: > Hello, > > NXP's S32V234[1] ("Treerunner") vision microprocessors are targeted for > high-performance, computationally intensive vision and sensor fusion > applications that require automotive safety levels. They include leadi

[PATCH v7 1/5] dt-bindings: arm: fsl: Add the S32V234-EVB board

2019-10-16 Thread Stefan-Gabriel Mirea
From: Eddy Petrișor Add entry for the NXP S32V234 Customer Evaluation Board to the board/SoC bindings. Signed-off-by: Eddy Petrișor Signed-off-by: Stefan-Gabriel Mirea Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/arm/fsl.yaml | 6 ++ 1 file changed, 6 insertions(+) dif

[PATCH v7 0/5] Add initial support for S32V234-EVB

2019-10-16 Thread Stefan-Gabriel Mirea
Hello, NXP's S32V234[1] ("Treerunner") vision microprocessors are targeted for high-performance, computationally intensive vision and sensor fusion applications that require automotive safety levels. They include leading edge Camera Vision modules like APEX-2, ISP and GPU. The S32V234-EVB and S32V

[PATCH v7 4/5] arm64: dts: fsl: Add device tree for S32V234-EVB

2019-10-16 Thread Stefan-Gabriel Mirea
From: Stoica Cosmin-Stefan Add initial version of device tree for S32V234-EVB, including nodes for the 4 Cortex-A53 cores, AIPS bus with UART modules, ARM architected timer and Generic Interrupt Controller (GIC). Keep SoC level separate from board level to let future boards with this SoC share c

[PATCH v7 3/5] serial: fsl_linflexuart: Be consistent with the name

2019-10-16 Thread Stefan-Gabriel Mirea
For consistency reasons, spell the controller name as "LINFlexD" in comments and documentation. Signed-off-by: Stefan-Gabriel Mirea --- Documentation/admin-guide/kernel-parameters.txt | 2 +- drivers/tty/serial/Kconfig | 8 drivers/tty/serial/fsl_linflexuart.c

[PATCH v7 2/5] arm64: Introduce config for S32

2019-10-16 Thread Stefan-Gabriel Mirea
From: Mihaela Martinas Add configuration option for the NXP S32 platform family in Kconfig.platforms. For starters, the only SoC supported will be Treerunner (S32V234), with a single execution target: the S32V234-EVB (rev 29288) board. Signed-off-by: Mihaela Martinas Signed-off-by: Stoica Cosmi

[PATCH v7 5/5] arm64: defconfig: Enable configs for S32V234

2019-10-16 Thread Stefan-Gabriel Mirea
From: Mihaela Martinas Enable support for the S32V234 SoC, including the previously added UART driver. Signed-off-by: Mihaela Martinas Signed-off-by: Adrian.Nitu Signed-off-by: Stoica Cosmin-Stefan Signed-off-by: Stefan-Gabriel Mirea --- arch/arm64/configs/defconfig | 3 +++ 1 file changed,

Re: [PATCH v7 0/8] efi/firmware/platform-x86: Add EFI embedded fw support

2019-10-16 Thread Luis Chamberlain
On Mon, Oct 14, 2019 at 12:57:54PM +0200, Greg Kroah-Hartman wrote: > On Mon, Oct 14, 2019 at 10:31:50AM +, Luis Chamberlain wrote: > > On Mon, Oct 14, 2019 at 11:29:29AM +0200, Greg Kroah-Hartman wrote: > > > On Mon, Oct 14, 2019 at 09:22:16AM +, Luis Chamberlain wrote: > > > > On Fri, Oct

Re: [PATCH 1/8] kcsan: Add Kernel Concurrency Sanitizer infrastructure

2019-10-16 Thread Andrey Konovalov
On Wed, Oct 16, 2019 at 10:41 AM Marco Elver wrote: > > Kernel Concurrency Sanitizer (KCSAN) is a dynamic data-race detector for > kernel space. KCSAN is a sampling watchpoint-based data-race detector. > See the included Documentation/dev-tools/kcsan.rst for more details. > > This patch adds basic

Re: [PATCH 7/8] locking/atomics, kcsan: Add KCSAN instrumentation

2019-10-16 Thread Marco Elver
On Wed, 16 Oct 2019 at 13:18, Mark Rutland wrote: > > Hi Marco, > > On Wed, Oct 16, 2019 at 10:39:58AM +0200, Marco Elver wrote: > > This adds KCSAN instrumentation to atomic-instrumented.h. > > > > Signed-off-by: Marco Elver > > --- > > include/asm-generic/atomic-instrumented.h | 192 ++

Re: [PATCH 7/8] locking/atomics, kcsan: Add KCSAN instrumentation

2019-10-16 Thread Mark Rutland
Hi Marco, On Wed, Oct 16, 2019 at 10:39:58AM +0200, Marco Elver wrote: > This adds KCSAN instrumentation to atomic-instrumented.h. > > Signed-off-by: Marco Elver > --- > include/asm-generic/atomic-instrumented.h | 192 +- > scripts/atomic/gen-atomic-instrumented.sh | 9 +-

Re: [PATCH v6 3/5] serial: fsl_linflexuart: Be consistent with the name

2019-10-16 Thread Stefan-gabriel Mirea
Hello Greg, On 10/15/2019 10:05 PM, Greg KH wrote: > > This patch does not apply to my tree :( > Thanks for letting me know; I will rebase it in v7. Regards, Stefan

Re: [PATCH 1/8] kcsan: Add Kernel Concurrency Sanitizer infrastructure

2019-10-16 Thread Marco Elver
On Wed, 16 Oct 2019 at 11:42, Boqun Feng wrote: > > Hi Marco, > > On Wed, Oct 16, 2019 at 10:39:52AM +0200, Marco Elver wrote: > [...] > > --- /dev/null > > +++ b/kernel/kcsan/kcsan.c > > @@ -0,0 +1,81 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > + > > +/* > > + * The Kernel Concurrency Sanitiz

Re: [PATCH 1/8] kcsan: Add Kernel Concurrency Sanitizer infrastructure

2019-10-16 Thread Boqun Feng
Hi Marco, On Wed, Oct 16, 2019 at 10:39:52AM +0200, Marco Elver wrote: [...] > --- /dev/null > +++ b/kernel/kcsan/kcsan.c > @@ -0,0 +1,81 @@ > +// SPDX-License-Identifier: GPL-2.0 > + > +/* > + * The Kernel Concurrency Sanitizer (KCSAN) infrastructure. For more info > please > + * see Documentati

[PATCH v6 2/2] drivers/perf: Add CCPI2 PMU support in ThunderX2 UNCORE driver.

2019-10-16 Thread Ganapatrao Prabhakerrao Kulkarni
CCPI2 is a low-latency high-bandwidth serial interface for inter socket connectivity of ThunderX2 processors. CCPI2 PMU supports up to 8 counters per socket. Counters are independently programmable to different events and can be started and stopped individually. The CCPI2 counters are 64-bit and d

[PATCH v6 1/2] Documentation: perf: Update documentation for ThunderX2 PMU uncore driver

2019-10-16 Thread Ganapatrao Prabhakerrao Kulkarni
Add documentation for Cavium Coherent Processor Interconnect (CCPI2) PMU. Signed-off-by: Ganapatrao Prabhakerrao Kulkarni --- .../admin-guide/perf/thunderx2-pmu.rst| 20 ++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Documentation/admin-guide/perf/thun

[PATCH v6 0/2] Add CCPI2 PMU support

2019-10-16 Thread Ganapatrao Prabhakerrao Kulkarni
Add Cavium Coherent Processor Interconnect (CCPI2) PMU support in ThunderX2 Uncore driver. v6: Rebased to 5.4-rc1 v5: Fixed minor bug of v4 (timer callback fuction was getting initialized to NULL for all PMUs). v4: Update with review comments [2]. Changed

[PATCH 6/8] asm-generic, kcsan: Add KCSAN instrumentation for bitops

2019-10-16 Thread Marco Elver
Add explicit KCSAN checks for bitops. Signed-off-by: Marco Elver --- include/asm-generic/bitops-instrumented.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/include/asm-generic/bitops-instrumented.h b/include/asm-generic/bitops-instrumented.h index ddd1c6d9d8db..5767de

[PATCH 7/8] locking/atomics, kcsan: Add KCSAN instrumentation

2019-10-16 Thread Marco Elver
This adds KCSAN instrumentation to atomic-instrumented.h. Signed-off-by: Marco Elver --- include/asm-generic/atomic-instrumented.h | 192 +- scripts/atomic/gen-atomic-instrumented.sh | 9 +- 2 files changed, 199 insertions(+), 2 deletions(-) diff --git a/include/asm-generi

[PATCH 8/8] x86, kcsan: Enable KCSAN for x86

2019-10-16 Thread Marco Elver
This patch enables KCSAN for x86, with updates to build rules to not use KCSAN for several incompatible compilation units. Signed-off-by: Marco Elver --- arch/x86/Kconfig | 1 + arch/x86/boot/Makefile| 1 + arch/x86/boot/compressed/Makefile | 1 + arch/x8

[PATCH 3/8] build, kcsan: Add KCSAN build exceptions

2019-10-16 Thread Marco Elver
This blacklists several compilation units from KCSAN. See the respective inline comments for the reasoning. Signed-off-by: Marco Elver --- kernel/Makefile | 5 + kernel/sched/Makefile | 6 ++ mm/Makefile | 8 3 files changed, 19 insertions(+) diff --git a/kernel

[PATCH 4/8] seqlock, kcsan: Add annotations for KCSAN

2019-10-16 Thread Marco Elver
Since seqlocks in the Linux kernel do not require the use of marked atomic accesses in critical sections, we teach KCSAN to assume such accesses are atomic. KCSAN currently also pretends that writes to `sequence` are atomic, although currently plain writes are used (their corresponding reads are RE

[PATCH 5/8] seqlock: Require WRITE_ONCE surrounding raw_seqcount_barrier

2019-10-16 Thread Marco Elver
This patch proposes to require marked atomic accesses surrounding raw_write_seqcount_barrier. We reason that otherwise there is no way to guarantee propagation nor atomicity of writes before/after the barrier [1]. For example, consider the compiler tears stores either before or after the barrier; i

[PATCH 1/8] kcsan: Add Kernel Concurrency Sanitizer infrastructure

2019-10-16 Thread Marco Elver
Kernel Concurrency Sanitizer (KCSAN) is a dynamic data-race detector for kernel space. KCSAN is a sampling watchpoint-based data-race detector. See the included Documentation/dev-tools/kcsan.rst for more details. This patch adds basic infrastructure, but does not yet enable KCSAN for any architect

[PATCH 2/8] objtool, kcsan: Add KCSAN runtime functions to whitelist

2019-10-16 Thread Marco Elver
This patch adds KCSAN runtime functions to the objtool whitelist. Signed-off-by: Marco Elver --- tools/objtool/check.c | 17 + 1 file changed, 17 insertions(+) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 044c9a3cb247..d1acc867b43c 100644 --- a/tools/objtool/

[PATCH 0/8] Add Kernel Concurrency Sanitizer (KCSAN)

2019-10-16 Thread Marco Elver
This is the patch-series for the Kernel Concurrency Sanitizer (KCSAN). KCSAN is a sampling watchpoint-based data-race detector. More details are included in Documentation/dev-tools/kcsan.rst. This patch-series only enables KCSAN for x86, but we expect adding support for other architectures is relat

Re: [PATCH 26/34] Documentation/RCU: Use CONFIG_PREEMPTION where appropriate

2019-10-16 Thread Sebastian Andrzej Siewior
On 2019-10-15 21:13:30 [-0700], Paul E. McKenney wrote: > Sadly, this one ran afoul of the .txt-to-.rst migration. Even applying > it against linus/master and cherry-picking it does not help. I will > defer it for the moment -- perhaps Mauro or Joel have some advice. Don't worry about it then. J