Re: [patch V2 08/15] Documentation: Add lock ordering and nesting documentation

2020-03-20 Thread Paul E. McKenney
On Fri, Mar 20, 2020 at 11:36:03PM +0100, Thomas Gleixner wrote: > "Paul E. McKenney" writes: > > On Fri, Mar 20, 2020 at 08:51:44PM +0100, Thomas Gleixner wrote: > >> "Paul E. McKenney" writes: > >> > > >> > - The soft interrupt related suffix (_bh()) still disables softirq > >> >handlers.

Re: [PATCH 2/2] KVM: PPC: Book3S HV: H_SVM_INIT_START must call UV_RETURN

2020-03-20 Thread Ram Pai
On Fri, Mar 20, 2020 at 11:26:43AM +0100, Laurent Dufour wrote: > When the call to UV_REGISTER_MEM_SLOT is failing, for instance because > there is not enough free secured memory, the Hypervisor (HV) has to call secure memory, > UV_RETURN to report the error to the

Re: [PATCH 1/2] KVM: PPC: Book3S HV: check caller of H_SVM_* Hcalls

2020-03-20 Thread Ram Pai
On Fri, Mar 20, 2020 at 11:26:42AM +0100, Laurent Dufour wrote: > The Hcall named H_SVM_* are reserved to the Ultravisor. However, nothing > prevent a malicious VM or SVM to call them. This could lead to weird result > and should be filtered out. > > Checking the Secure bit of the calling MSR

Re: [PATCH v2 0/2] Don't generate thousands of new warnings when building docs

2020-03-20 Thread Jonathan Corbet
On Fri, 20 Mar 2020 16:11:01 +0100 Mauro Carvalho Chehab wrote: > This small series address a regression caused by a new patch at > docs-next (and at linux-next). I don't know how I missed that mess, sorry. I plead distracting times or something like that. Heck, I think I'll blame everything

Re: [patch V2 08/15] Documentation: Add lock ordering and nesting documentation

2020-03-20 Thread Thomas Gleixner
"Paul E. McKenney" writes: > On Fri, Mar 20, 2020 at 08:51:44PM +0100, Thomas Gleixner wrote: >> "Paul E. McKenney" writes: >> > >> > - The soft interrupt related suffix (_bh()) still disables softirq >> >handlers. However, unlike non-PREEMPT_RT kernels (which disable >> >preemption to

[powerpc:merge] BUILD SUCCESS a87b93bdf800a4d7a42d95683624a4516e516b4f

2020-03-20 Thread kbuild test robot
randconfig-a001-20200320 x86_64 randconfig-a002-20200320 x86_64 randconfig-a003-20200320 i386 randconfig-a001-20200320 i386 randconfig-a002-20200320 i386 randconfig-a003-20200320 alpharandconfig-a001-20200320 mips

[powerpc:next-test] BUILD SUCCESS b3258f133d72af0bb463e198610d47ae57498b00

2020-03-20 Thread kbuild test robot
allnoconfig parisc allyesconfig pariscgeneric-64bit_defconfig x86_64 randconfig-a001-20200320 x86_64 randconfig-a002-20200320 x86_64 randconfig-a003-20200320 i386 randconfig-a001-20200320 i386

Re: [PATCH v12 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-20 Thread Joe Perches
(removed a bunch of cc's) On Fri, 2020-03-20 at 18:31 +0200, Andy Shevchenko wrote: > On Fri, Mar 20, 2020 at 07:42:03AM -0700, Joe Perches wrote: > > On Fri, 2020-03-20 at 14:42 +0200, Andy Shevchenko wrote: > > > On Fri, Mar 20, 2020 at 12:23:38PM +0100, Michal Suchánek wrote: > > > > On Fri,

Re: [patch V2 08/15] Documentation: Add lock ordering and nesting documentation

2020-03-20 Thread Paul E. McKenney
On Fri, Mar 20, 2020 at 08:51:44PM +0100, Thomas Gleixner wrote: > "Paul E. McKenney" writes: > > > > - The soft interrupt related suffix (_bh()) still disables softirq > >handlers. However, unlike non-PREEMPT_RT kernels (which disable > >preemption to get this effect), PREEMPT_RT

Re: [patch V2 08/15] Documentation: Add lock ordering and nesting documentation

2020-03-20 Thread Thomas Gleixner
"Paul E. McKenney" writes: > > - The soft interrupt related suffix (_bh()) still disables softirq >handlers. However, unlike non-PREEMPT_RT kernels (which disable >preemption to get this effect), PREEMPT_RT kernels use a per-CPU >lock to exclude softirq handlers. I've made that:

Re: [PATCH] powerpc/64: ftrace don't trace real mode

2020-03-20 Thread Naveen N. Rao
Hi Nick, Nicholas Piggin wrote: This warns and prevents tracing attempted in a real-mode context. Is this something you're seeing often? Last time we looked at this, KVM was the biggest offender and we introduced paca->ftrace_enabled as a way to disable ftrace while in KVM code. While

Re: [PATCH v5 6/7] ASoC: dt-bindings: fsl_easrc: Add document for EASRC

2020-03-20 Thread Rob Herring
On Mon, Mar 09, 2020 at 11:58:33AM +0800, Shengjiu Wang wrote: > EASRC (Enhanced Asynchronous Sample Rate Converter) is a new > IP module found on i.MX8MN. > > Signed-off-by: Shengjiu Wang > --- > .../devicetree/bindings/sound/fsl,easrc.yaml | 101 ++ > 1 file changed, 101

Re: [PATCH v5 1/7] ASoC: dt-bindings: fsl_asrc: Add new property fsl,asrc-format

2020-03-20 Thread Rob Herring
On Mon, Mar 09, 2020 at 02:19:44PM -0700, Nicolin Chen wrote: > On Mon, Mar 09, 2020 at 11:58:28AM +0800, Shengjiu Wang wrote: > > In order to support new EASRC and simplify the code structure, > > We decide to share the common structure between them. This bring > > a problem that EASRC accept

Re: [PATCH v12 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-20 Thread Andy Shevchenko
On Fri, Mar 20, 2020 at 05:42:04PM +0100, Michal Suchánek wrote: > On Fri, Mar 20, 2020 at 06:31:57PM +0200, Andy Shevchenko wrote: > > On Fri, Mar 20, 2020 at 07:42:03AM -0700, Joe Perches wrote: > > > On Fri, 2020-03-20 at 14:42 +0200, Andy Shevchenko wrote: > > > > On Fri, Mar 20, 2020 at

Re: [PATCH v12 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-20 Thread Michal Suchánek
On Fri, Mar 20, 2020 at 06:31:57PM +0200, Andy Shevchenko wrote: > On Fri, Mar 20, 2020 at 07:42:03AM -0700, Joe Perches wrote: > > On Fri, 2020-03-20 at 14:42 +0200, Andy Shevchenko wrote: > > > On Fri, Mar 20, 2020 at 12:23:38PM +0100, Michal Suchánek wrote: > > > > On Fri, Mar 20, 2020 at

Re: [PATCH v12 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-20 Thread Andy Shevchenko
On Fri, Mar 20, 2020 at 07:42:03AM -0700, Joe Perches wrote: > On Fri, 2020-03-20 at 14:42 +0200, Andy Shevchenko wrote: > > On Fri, Mar 20, 2020 at 12:23:38PM +0100, Michal Suchánek wrote: > > > On Fri, Mar 20, 2020 at 12:33:50PM +0200, Andy Shevchenko wrote: > > > > On Fri, Mar 20, 2020 at

Re: [PATCH v12 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-20 Thread Michal Suchánek
On Fri, Mar 20, 2020 at 07:42:03AM -0700, Joe Perches wrote: > On Fri, 2020-03-20 at 14:42 +0200, Andy Shevchenko wrote: > > On Fri, Mar 20, 2020 at 12:23:38PM +0100, Michal Suchánek wrote: > > > On Fri, Mar 20, 2020 at 12:33:50PM +0200, Andy Shevchenko wrote: > > > > On Fri, Mar 20, 2020 at

Re: [patch V2 08/15] Documentation: Add lock ordering and nesting documentation

2020-03-20 Thread Paul E. McKenney
On Thu, Mar 19, 2020 at 07:02:17PM +0100, Thomas Gleixner wrote: > Paul, > > "Paul E. McKenney" writes: > > > On Wed, Mar 18, 2020 at 09:43:10PM +0100, Thomas Gleixner wrote: > > > > Mostly native-English-speaker services below, so please feel free to > > ignore. The one place I made a

Re: [PATCH] powerpc/pseries: avoid harmless preempt warning

2020-03-20 Thread Christophe Leroy
Le 20/03/2020 à 16:24, Nicholas Piggin a écrit : Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/pseries/lpar.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index

[PATCH] powerpc/64: allow rtas to be called in real-mode, use this in machine check

2020-03-20 Thread Nicholas Piggin
rtas_call allocates and uses memory in failure paths, which is not safe for RMA. It also calls local_irq_save() which may not be safe in all real mode contexts. Particularly machine check may run with interrupts not "reconciled", and it may have hit while it was in tracing code that should not be

[PATCH] powerpc/64: ftrace don't trace real mode

2020-03-20 Thread Nicholas Piggin
This warns and prevents tracing attempted in a real-mode context. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/trace/ftrace.c| 3 +++ .../powerpc/kernel/trace/ftrace_64_mprofile.S | 19 +++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git

Re: [PATCH] arch/powerpc/64: Avoid isync in flush_dcache_range

2020-03-20 Thread Segher Boessenkool
On Fri, Mar 20, 2020 at 08:38:42PM +0530, Aneesh Kumar K.V wrote: > On 3/20/20 8:35 PM, Segher Boessenkool wrote: > >On Fri, Mar 20, 2020 at 04:02:42PM +0530, Aneesh Kumar K.V wrote: > >>As per ISA and isync is only needed on instruction cache > >>block invalidate. Remove the same from dcache

[PATCH] powerpc/pseries: avoid harmless preempt warning

2020-03-20 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/pseries/lpar.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 3c3da25b445c..e4ed5317f117 100644 ---

[PATCH v2 1/2] docs: prevent warnings due to autosectionlabel

2020-03-20 Thread Mauro Carvalho Chehab
Changeset 58ad30cf91f0 ("docs: fix reference to core-api/namespaces.rst") enabled a new feature at Sphinx: it will now generate index for each document title, plus to each chapter inside it. There's a drawback, though: one document cannot have two sections with the same name anymore. A followup

[PATCH v2 0/2] Don't generate thousands of new warnings when building docs

2020-03-20 Thread Mauro Carvalho Chehab
This small series address a regression caused by a new patch at docs-next (and at linux-next). Before this patch, when a cross-reference to a chapter within the documentation is needed, we had to add a markup like: .. _foo: foo === This behavor is now different after

Re: [PATCH] arch/powerpc/64: Avoid isync in flush_dcache_range

2020-03-20 Thread Aneesh Kumar K.V
On 3/20/20 8:35 PM, Segher Boessenkool wrote: On Fri, Mar 20, 2020 at 04:02:42PM +0530, Aneesh Kumar K.V wrote: As per ISA and isync is only needed on instruction cache block invalidate. Remove the same from dcache invalidate. Is that true on older CPUs? That is what I found by checking

Re: [PATCH] arch/powerpc/64: Avoid isync in flush_dcache_range

2020-03-20 Thread Segher Boessenkool
On Fri, Mar 20, 2020 at 04:02:42PM +0530, Aneesh Kumar K.V wrote: > As per ISA and isync is only needed on instruction cache > block invalidate. Remove the same from dcache invalidate. Is that true on older CPUs? Segher

Re: [PATCH 1/2] dma-mapping: add a dma_ops_bypass flag to struct device

2020-03-20 Thread Greg Kroah-Hartman
On Fri, Mar 20, 2020 at 03:16:39PM +0100, Christoph Hellwig wrote: > Several IOMMU drivers have a bypass mode where they can use a direct > mapping if the devices DMA mask is large enough. Add generic support > to the core dma-mapping code to do that to switch those drivers to > a common

Re: [PATCH 1/2] KVM: PPC: Book3S HV: check caller of H_SVM_* Hcalls

2020-03-20 Thread Laurent Dufour
Le 20/03/2020 à 13:22, Greg Kurz a écrit : On Fri, 20 Mar 2020 11:26:42 +0100 Laurent Dufour wrote: The Hcall named H_SVM_* are reserved to the Ultravisor. However, nothing prevent a malicious VM or SVM to call them. This could lead to weird result and should be filtered out. Checking the

Re: [PATCH v12 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-20 Thread Joe Perches
On Fri, 2020-03-20 at 14:42 +0200, Andy Shevchenko wrote: > On Fri, Mar 20, 2020 at 12:23:38PM +0100, Michal Suchánek wrote: > > On Fri, Mar 20, 2020 at 12:33:50PM +0200, Andy Shevchenko wrote: > > > On Fri, Mar 20, 2020 at 11:20:19AM +0100, Michal Suchanek wrote: > > > > While at it also simplify

Re: [PATCH 2/2] KVM: PPC: Book3S HV: H_SVM_INIT_START must call UV_RETURN

2020-03-20 Thread Laurent Dufour
Le 20/03/2020 à 12:24, Bharata B Rao a écrit : On Fri, Mar 20, 2020 at 11:26:43AM +0100, Laurent Dufour wrote: When the call to UV_REGISTER_MEM_SLOT is failing, for instance because there is not enough free secured memory, the Hypervisor (HV) has to call UV_RETURN to report the error to the

[PATCH 2/2] powerpc: use the generic dma_ops_bypass mode

2020-03-20 Thread Christoph Hellwig
Use the DMA API bypass mechanism for direct window mappings. This uses common code and speed up the direct mapping case by avoiding indirect calls just when not using dma ops at all. It also fixes a problem where the sync_* methods were using the bypass check for DMA allocations, but those are

[PATCH 1/2] dma-mapping: add a dma_ops_bypass flag to struct device

2020-03-20 Thread Christoph Hellwig
Several IOMMU drivers have a bypass mode where they can use a direct mapping if the devices DMA mask is large enough. Add generic support to the core dma-mapping code to do that to switch those drivers to a common solution. Signed-off-by: Christoph Hellwig --- include/linux/device.h | 6

generic DMA bypass flag v2

2020-03-20 Thread Christoph Hellwig
Hi all, I've recently beeing chatting with Lu about using dma-iommu and per-device DMA ops in the intel IOMMU driver, and one missing feature in dma-iommu is a bypass mode where the direct mapping is used even when an iommu is attached to improve performance. The powerpc code already has a

[PATCH] powerpc/64s/hash: add torture_segments kernel boot option to increase SLB faults

2020-03-20 Thread Nicholas Piggin
This option increases the number of SLB misses by limiting the number of kernel SLB entries, and increased flushing of cached lookaside information. This helps stress test difficult to hit paths in the kernel. Signed-off-by: Nicholas Piggin --- .../admin-guide/kernel-parameters.txt |

Re: [PATCH 1/2] mm, slub: prevent kmalloc_node crashes and memory leaks

2020-03-20 Thread Srikar Dronamraju
* Vlastimil Babka [2020-03-20 12:55:32]: > Sachin reports [1] a crash in SLUB __slab_alloc(): > > BUG: Kernel NULL pointer dereference on read at 0x73b0 > Faulting instruction address: 0xc03d55f4 > Oops: Kernel access of bad area, sig: 11 [#1] > LE PAGE_SIZE=64K MMU=Hash SMP

Re: [PATCH 1/2] KVM: PPC: Book3S HV: check caller of H_SVM_* Hcalls

2020-03-20 Thread Greg Kurz
On Fri, 20 Mar 2020 11:26:42 +0100 Laurent Dufour wrote: > The Hcall named H_SVM_* are reserved to the Ultravisor. However, nothing > prevent a malicious VM or SVM to call them. This could lead to weird result > and should be filtered out. > > Checking the Secure bit of the calling MSR ensure

[PATCH v6 09/11] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-20 Thread Kajol Jain
Patch enhances current metric infrastructure to handle "?" in the metric expression. The "?" can be use for parameters whose value not known while creating metric events and which can be replace later at runtime to the proper value. It also add flexibility to create multiple events out of single

[PATCH v6 11/11] perf/tools/pmu-events/powerpc: Add hv_24x7 socket/chip level metric events

2020-03-20 Thread Kajol Jain
The hv_24×7 feature in IBM® POWER9™ processor-based servers provide the facility to continuously collect large numbers of hardware performance metrics efficiently and accurately. This patch adds hv_24x7 metric file for different Socket/chip resources. Result: power9 platform: command:# ./perf

[PATCH v6 08/11] perf/tools: Refactoring metricgroup__add_metric function

2020-03-20 Thread Kajol Jain
This patch refactor metricgroup__add_metric function where some part of it move to function metricgroup__add_metric_param. No logic change. Signed-off-by: Kajol Jain --- tools/perf/util/metricgroup.c | 64 +-- 1 file changed, 39 insertions(+), 25 deletions(-)

[PATCH v6 10/11] tools/perf: Enable Hz/hz prinitg for --metric-only option

2020-03-20 Thread Kajol Jain
Commit 54b5091606c18 ("perf stat: Implement --metric-only mode") added function 'valid_only_metric()' which drops "Hz" or "hz", if it is part of "ScaleUnit". This patch enable it since hv_24x7 supports couple of frequency events. Signed-off-by: Kajol Jain --- tools/perf/util/stat-display.c | 2

Re: [PATCH 18/15] kvm: Replace vcpu->swait with rcuwait

2020-03-20 Thread Peter Zijlstra
On Fri, Mar 20, 2020 at 01:55:26AM -0700, Davidlohr Bueso wrote: > - swait_event_interruptible_exclusive(*wq, ((!vcpu->arch.power_off) && > -(!vcpu->arch.pause))); > + rcuwait_wait_event(*wait, > +(!vcpu->arch.power_off) &&

[PATCH v6 07/11] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration

2020-03-20 Thread Kajol Jain
Function 'read_sys_info_pseries()' is added to get system parameter values like number of sockets and chips per socket. and it gets these details via rtas_call with token "PROCESSOR_MODULE_INFO". Incase lpar migrate from one system to another, system parameter details like chips per sockets or

[PATCH v6 06/11] Documentation/ABI: Add ABI documentation for chips and sockets

2020-03-20 Thread Kajol Jain
Add documentation for the following sysfs files: /sys/devices/hv_24x7/interface/chips, /sys/devices/hv_24x7/interface/sockets Signed-off-by: Kajol Jain --- .../testing/sysfs-bus-event_source-devices-hv_24x7 | 14 ++ 1 file changed, 14 insertions(+) diff --git

[PATCH v6 05/11] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show processor details

2020-03-20 Thread Kajol Jain
To expose the system dependent parameter like total number of sockets and numbers of chips per socket, patch adds two sysfs files. "sockets" and "chips" are added to /sys/devices/hv_24x7/interface/ of the "hv_24x7" pmu. Signed-off-by: Kajol Jain --- arch/powerpc/perf/hv-24x7.c | 22

[PATCH v6 04/11] powerpc/hv-24x7: Add rtas call in hv-24x7 driver to get processor details

2020-03-20 Thread Kajol Jain
For hv_24x7 socket/chip level events, specific chip-id to which the data requested should be added as part of pmu events. But number of chips/socket in the system details are not exposed. Patch implements read_sys_info_pseries() to get system parameter values like number of sockets and chips per

[PATCH v6 03/11] powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run

2020-03-20 Thread Kajol Jain
Commit 2b206ee6b0df ("powerpc/perf/hv-24x7: Display change in counter values")' added to print _change_ in the counter value rather then raw value for 24x7 counters. Incase of transactions, the event count is set to 0 at the beginning of the transaction. It also sets the event's prev_count to the

[PATCH v6 02/11] perf expr: Add expr_scanner_ctx object

2020-03-20 Thread Kajol Jain
From: Jiri Olsa Adding expr_scanner_ctx object to hold user data for the expr scanner. Currently it holds only start_token, Kajol Jain will use it to hold 24x7 runtime param. Signed-off-by: Jiri Olsa --- tools/perf/util/expr.c | 6 -- tools/perf/util/expr.h | 4

[PATCH v6 01/11] perf expr: Add expr_ prefix for parse_ctx and parse_id

2020-03-20 Thread Kajol Jain
From: Jiri Olsa Adding expr_ prefix for parse_ctx and parse_id, to straighten out the expr* namespace. There's no functional change. Signed-off-by: Jiri Olsa --- tools/perf/tests/expr.c | 4 ++-- tools/perf/util/expr.c| 10 +- tools/perf/util/expr.h| 12

[PATCH v6 00/11] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events

2020-03-20 Thread Kajol Jain
Patchset fixes the inconsistent results we are getting when we run multiple 24x7 events. Patchset adds json file metric support for the hv_24x7 socket/chip level events. "hv_24x7" pmu interface events needs system dependent parameter like socket/chip/core. For example, hv_24x7 chip level events

Re: [PATCH v12 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-20 Thread Andy Shevchenko
On Fri, Mar 20, 2020 at 12:23:38PM +0100, Michal Suchánek wrote: > On Fri, Mar 20, 2020 at 12:33:50PM +0200, Andy Shevchenko wrote: > > On Fri, Mar 20, 2020 at 11:20:19AM +0100, Michal Suchanek wrote: > > > While at it also simplify the existing perf patterns. > > And still missed fixes from

Re: [PATCH v3 9/9] Documentation/powerpc: VAS API

2020-03-20 Thread Daniel Axtens
Hi Haren, This is good documentation. > Power9 introduced Virtual Accelerator Switchboard (VAS) which allows > userspace to communicate with Nest Accelerator (NX) directly. But > kernel has to establish channel to NX for userspace. This document > describes user space API that application can

Re: [PATCH v3 3/9] powerpc/vas: Add VAS user space API

2020-03-20 Thread Daniel Axtens
Haren Myneni writes: > On power9, userspace can send GZIP compression requests directly to NX > once kernel establishes NX channel / window with VAS. This patch provides > user space API which allows user space to establish channel using open > VAS_TX_WIN_OPEN ioctl, mmap and close operations. >

[PATCH 1/2] mm, slub: prevent kmalloc_node crashes and memory leaks

2020-03-20 Thread Vlastimil Babka
Sachin reports [1] a crash in SLUB __slab_alloc(): BUG: Kernel NULL pointer dereference on read at 0x73b0 Faulting instruction address: 0xc03d55f4 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries Modules linked in: CPU: 19 PID: 1

Re: [PATCH 2/2] KVM: PPC: Book3S HV: H_SVM_INIT_START must call UV_RETURN

2020-03-20 Thread Bharata B Rao
On Fri, Mar 20, 2020 at 11:26:43AM +0100, Laurent Dufour wrote: > When the call to UV_REGISTER_MEM_SLOT is failing, for instance because > there is not enough free secured memory, the Hypervisor (HV) has to call > UV_RETURN to report the error to the Ultravisor (UV). Then the UV will call >

Re: [PATCH v12 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-20 Thread Michal Suchánek
On Fri, Mar 20, 2020 at 12:33:50PM +0200, Andy Shevchenko wrote: > On Fri, Mar 20, 2020 at 11:20:19AM +0100, Michal Suchanek wrote: > > While at it also simplify the existing perf patterns. > > > > And still missed fixes from parse-maintainers.pl. Oh, that script UX is truly ingenious. It

Re: [PATCH 18/15] kvm: Replace vcpu->swait with rcuwait

2020-03-20 Thread Paolo Bonzini
On 20/03/20 09:55, Davidlohr Bueso wrote: > Only compiled and tested on x86. It shows :) as the __KVM_HAVE_ARCH_WQP case is broken. But no problem, Paul and I can pick this up and fix it. This is missing: diff --git a/arch/powerpc/include/asm/kvm_book3s.h

[ltcras] powerpc/pseries: Handle UE event for memcpy_mcsafe

2020-03-20 Thread Ganesh Goudar
If we hit UE at an instruction with a fixup entry, flag to ignore the event and set nip to continue execution at the fixup entry. For powernv these changes are already made by commit 895e3dceeb97 ("powerpc/mce: Handle UE event for memcpy_mcsafe") Reviewed-by: Mahesh Salgaonkar Reviewed-by:

[PATCH v2] powerpc/pseries: Fix MCE handling on pseries

2020-03-20 Thread Ganesh Goudar
MCE handling on pSeries platform fails as recent rework to use common code for pSeries and PowerNV in machine check error handling tries to access per-cpu variables in realmode. The per-cpu variables may be outside the RMO region on pSeries platform and needs translation to be enabled for access.

Re: [PATCH 17/15] rcuwait: Inform rcuwait_wake_up() users if a wakeup was attempted

2020-03-20 Thread Peter Zijlstra
On Fri, Mar 20, 2020 at 01:55:25AM -0700, Davidlohr Bueso wrote: > diff --git a/kernel/exit.c b/kernel/exit.c > index 6cc6cc485d07..b0bb0a8ec4b1 100644 > --- a/kernel/exit.c > +++ b/kernel/exit.c > @@ -234,9 +234,10 @@ void release_task(struct task_struct *p) > goto repeat; > } >

Re: [PATCH] cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_work_fn

2020-03-20 Thread Gautham R Shenoy
On Mon, Mar 16, 2020 at 07:27:43PM +0530, Pratik Rajesh Sampat wrote: > The patch avoids allocating cpufreq_policy on stack hence fixing frame > size overflow in 'powernv_cpufreq_work_fn' > Thanks for fixing this. > Fixes: 227942809b52 ("cpufreq: powernv: Restore cpu frequency to policy->cur >

Re: [PATCH v12 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-20 Thread Andy Shevchenko
On Fri, Mar 20, 2020 at 11:20:19AM +0100, Michal Suchanek wrote: > While at it also simplify the existing perf patterns. > And still missed fixes from parse-maintainers.pl. I see it like below in the linux-next (after the script) PERFORMANCE EVENTS SUBSYSTEM M: Peter Zijlstra M:

[PATCH] arch/powerpc/mm: Enable compound page check for both THP and HugeTLB

2020-03-20 Thread Aneesh Kumar K.V
THP config can result in compound pages. Make sure kernel enables the PageCompound() check when only THP is enabled. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index

[PATCH] arch/powerpc/64: Avoid isync in flush_dcache_range

2020-03-20 Thread Aneesh Kumar K.V
As per ISA and isync is only needed on instruction cache block invalidate. Remove the same from dcache invalidate. Signed-off-by: Aneesh Kumar K.V --- Note: IIUC we can also void the sync fore dcbf. arch/powerpc/include/asm/cacheflush.h | 6 +- 1 file changed, 1 insertion(+), 5

[PATCH 0/2] Fix SVM hang at startup

2020-03-20 Thread Laurent Dufour
This series is fixing a SVM hang occurring when starting a SVM requiring more secure memory than available. The hang happens in the SVM when calling UV_ESM. The following is happening: 1. SVM calls UV_ESM 2. Ultravisor (UV) calls H_SVM_INIT_START 3. Hypervisor (HV) calls UV_REGISTER_MEM_SLOT 4.

[PATCH 2/2] KVM: PPC: Book3S HV: H_SVM_INIT_START must call UV_RETURN

2020-03-20 Thread Laurent Dufour
When the call to UV_REGISTER_MEM_SLOT is failing, for instance because there is not enough free secured memory, the Hypervisor (HV) has to call UV_RETURN to report the error to the Ultravisor (UV). Then the UV will call H_SVM_INIT_ABORT to abort the securing phase and go back to the calling VM.

[PATCH 1/2] KVM: PPC: Book3S HV: check caller of H_SVM_* Hcalls

2020-03-20 Thread Laurent Dufour
The Hcall named H_SVM_* are reserved to the Ultravisor. However, nothing prevent a malicious VM or SVM to call them. This could lead to weird result and should be filtered out. Checking the Secure bit of the calling MSR ensure that the call is coming from either the Ultravisor or a SVM. But any

[PATCH v12 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-20 Thread Michal Suchanek
While at it also simplify the existing perf patterns. Signed-off-by: Michal Suchanek --- v10: new patch V12: remove redundant entries --- MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index e1a99197fb34..578429d0 100644 ---

[PATCH v12 7/8] powerpc/perf: split callchain.c by bitness

2020-03-20 Thread Michal Suchanek
Building callchain.c with !COMPAT proved quite ugly with all the defines. Splitting out the 32bit and 64bit parts looks better. No code change intended. Signed-off-by: Michal Suchanek --- v6: - move current_is_64bit consolidetaion to earlier patch - move defines to the top of callchain_32.c

[PATCH v12 6/8] powerpc/64: Make COMPAT user-selectable disabled on littleendian by default.

2020-03-20 Thread Michal Suchanek
On bigendian ppc64 it is common to have 32bit legacy binaries but much less so on littleendian. Signed-off-by: Michal Suchanek Reviewed-by: Christophe Leroy --- v3: make configurable --- arch/powerpc/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH v12 5/8] powerpc/64: make buildable without CONFIG_COMPAT

2020-03-20 Thread Michal Suchanek
There are numerous references to 32bit functions in generic and 64bit code so ifdef them out. Signed-off-by: Michal Suchanek --- v2: - fix 32bit ifdef condition in signal.c - simplify the compat ifdef condition in vdso.c - 64bit is redundant - simplify the compat ifdef condition in callchain.c -

[PATCH v12 4/8] powerpc/perf: consolidate valid_user_sp -> invalid_user_sp

2020-03-20 Thread Michal Suchanek
Merge the 32bit and 64bit version. Halve the check constants on 32bit. Use STACK_TOP since it is defined. Passing is_64 is now redundant since is_32bit_task() is used to determine which callchain variant should be used. Use STACK_TOP and is_32bit_task() directly. This removes a page from the

[PATCH v12 3/8] powerpc/perf: consolidate read_user_stack_32

2020-03-20 Thread Michal Suchanek
There are two almost identical copies for 32bit and 64bit. The function is used only in 32bit code which will be split out in next patch so consolidate to one function. Signed-off-by: Michal Suchanek Reviewed-by: Christophe Leroy --- v6: new patch v8: move the consolidated function out of

[PATCH v12 2/8] powerpc: move common register copy functions from signal_32.c to signal.c

2020-03-20 Thread Michal Suchanek
These functions are required for 64bit as well. Signed-off-by: Michal Suchanek Reviewed-by: Christophe Leroy --- arch/powerpc/kernel/signal.c| 141 arch/powerpc/kernel/signal_32.c | 140 --- 2 files changed, 141 insertions(+),

[PATCH v12 0/8] Disable compat cruft on ppc64le v12

2020-03-20 Thread Michal Suchanek
Less code means less bugs so add a knob to skip the compat stuff. Changes in v2: saner CONFIG_COMPAT ifdefs Changes in v3: - change llseek to 32bit instead of builing it unconditionally in fs - clanup the makefile conditionals - remove some ifdefs or convert to IS_DEFINED where possible

[PATCH v12 1/8] powerpc: Add back __ARCH_WANT_SYS_LLSEEK macro

2020-03-20 Thread Michal Suchanek
This partially reverts commit caf6f9c8a326 ("asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro") When CONFIG_COMPAT is disabled on ppc64 the kernel does not build. There is resistance to both removing the llseek syscall from the 64bit syscall tables and building the llseek interface

Re: [RFC 1/2] mm, slub: prevent kmalloc_node crashes and memory leaks

2020-03-20 Thread Srikar Dronamraju
* Vlastimil Babka [2020-03-20 09:43:11]: > On 3/20/20 8:46 AM, Srikar Dronamraju wrote: > > * Vlastimil Babka [2020-03-19 15:10:19]: > > > >> On 3/19/20 3:05 PM, Srikar Dronamraju wrote: > >> > * Vlastimil Babka [2020-03-19 14:47:58]: > >> > > >> > >> No, but AFAICS, such node values are

Re: [PATCH v3 0/8] mm/memory_hotplug: allow to specify a default online_type

2020-03-20 Thread Baoquan He
On 03/19/20 at 02:12pm, David Hildenbrand wrote: > Distributions nowadays use udev rules ([1] [2]) to specify if and > how to online hotplugged memory. The rules seem to get more complex with > many special cases. Due to the various special cases, > CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE cannot be

Re: [linux-next/mainline][bisected 3acac06][ppc] Oops when unloading mpt3sas driver

2020-03-20 Thread Abdul Haleem
On Tue, 2020-02-25 at 12:23 +0530, Sreekanth Reddy wrote: > On Tue, Feb 25, 2020 at 11:51 AM Abdul Haleem > wrote: > > > > On Fri, 2020-01-17 at 18:21 +0530, Abdul Haleem wrote: > > > On Thu, 2020-01-16 at 09:44 -0800, Christoph Hellwig wrote: > > > > Hi Abdul, > > > > > > > > I think the problem

Re: [PATCH v3 3/8] drivers/base/memory: store mapping between MMOP_* and string in an array

2020-03-20 Thread Baoquan He
On 03/20/20 at 10:50am, David Hildenbrand wrote: > On 20.03.20 08:36, Baoquan He wrote: > > On 03/19/20 at 02:12pm, David Hildenbrand wrote: > >> Let's use a simple array which we can reuse soon. While at it, move the > >> string->mmop conversion out of the device hotplug lock. > >> > >>

Re: [PATCH] powerpc/pseries: Fix MCE handling on pseries

2020-03-20 Thread Ganesh
On 3/20/20 8:11 AM, Nicholas Piggin wrote: Ganesh's on March 18, 2020 12:35 am: On 3/17/20 3:31 PM, Nicholas Piggin wrote: Ganesh's on March 16, 2020 9:47 pm: On 3/14/20 9:18 AM, Nicholas Piggin wrote: Ganesh Goudar's on March 14, 2020 12:04 am: MCE handling on pSeries platform fails as

Re: [PATCH v3 3/8] drivers/base/memory: store mapping between MMOP_* and string in an array

2020-03-20 Thread David Hildenbrand
On 20.03.20 08:36, Baoquan He wrote: > On 03/19/20 at 02:12pm, David Hildenbrand wrote: >> Let's use a simple array which we can reuse soon. While at it, move the >> string->mmop conversion out of the device hotplug lock. >> >> Reviewed-by: Wei Yang >> Acked-by: Michal Hocko >> Cc: Greg

[PATCH 4/5] ia64: Remove mm.h from asm/uaccess.h

2020-03-20 Thread Sebastian Andrzej Siewior
The defconfig compiles without linux/mm.h. With mm.h included the include chain leands to: | CC kernel/locking/percpu-rwsem.o | In file included from include/linux/huge_mm.h:8, | from include/linux/mm.h:567, | from arch/ia64/include/asm/uaccess.h:, |

[PATCH 1/5] nds32: Remove mm.h from asm/uaccess.h

2020-03-20 Thread Sebastian Andrzej Siewior
The defconfig compiles without linux/mm.h. With mm.h included the include chain leands to: | CC kernel/locking/percpu-rwsem.o | In file included from include/linux/huge_mm.h:8, | from include/linux/mm.h:567, | from arch/nds32/include/asm/uaccess.h:, |

[PATCH 2/5] csky: Remove mm.h from asm/uaccess.h

2020-03-20 Thread Sebastian Andrzej Siewior
The defconfig compiles without linux/mm.h. With mm.h included the include chain leands to: | CC kernel/locking/percpu-rwsem.o | In file included from include/linux/huge_mm.h:8, | from include/linux/mm.h:567, | from arch/csky/include/asm/uaccess.h:, |

[PATCH 3/5] hexagon: Remove mm.h from asm/uaccess.h

2020-03-20 Thread Sebastian Andrzej Siewior
The defconfig compiles without linux/mm.h. With mm.h included the include chain leands to: | CC kernel/locking/percpu-rwsem.o | In file included from include/linux/huge_mm.h:8, | from include/linux/mm.h:567, | from arch/hexagon/include/asm/uaccess.h:, |

[PATCH 0/5] Remove mm.h from arch/*/include/asm/uaccess.h

2020-03-20 Thread Sebastian Andrzej Siewior
The following mini-series removes linux/mm.h from the asm/uaccess.h of the individual architecture. The series has been compile tested with the defconfig and additionally for ia64 with the "special" allmodconfig supplied by the bot. The regular allmod for the architectures does not compile (even

[PATCH 5/5] microblaze: Remove mm.h from asm/uaccess.h

2020-03-20 Thread Sebastian Andrzej Siewior
The defconfig compiles without linux/mm.h. With mm.h included the include chain leands to: | CC kernel/locking/percpu-rwsem.o | In file included from include/linux/huge_mm.h:8, | from include/linux/mm.h:567, | from arch/microblaze/include/asm/uaccess.h:, |

Re: [PATCH v2] libnvdimm: Update persistence domain value for of_pmem and papr_scm device

2020-03-20 Thread Aneesh Kumar K.V
Hi Dan, Dan Williams writes: ... > >> >> Or are you suggesting that application should not infer any of those >> details looking at persistence_domain value? If so what is the purpose >> of exporting that attribute? > > The way the patch was worded I thought it was referring to an explicit

Re: [PATCH 19/15] sched/swait: Reword some of the main description

2020-03-20 Thread Sebastian Andrzej Siewior
On 2020-03-20 01:55:27 [-0700], Davidlohr Bueso wrote: > diff --git a/include/linux/swait.h b/include/linux/swait.h > index 73e06e9986d4..6e5b5d0e64fd 100644 > --- a/include/linux/swait.h > +++ b/include/linux/swait.h > @@ -39,7 +26,7 @@ > *sleeper state. > * > * - the !exclusive mode;

Re: [PATCH 17/15] rcuwait: Inform rcuwait_wake_up() users if a wakeup was attempted

2020-03-20 Thread Sebastian Andrzej Siewior
On 2020-03-20 01:55:25 [-0700], Davidlohr Bueso wrote: > Let the caller know if wake_up_process() was actually called or not; > some users can use this information for ad-hoc. Of course returning > true does not guarantee that wake_up_process() actually woke anything > up. Wouldn't it make sense

Re: [patch V2 11/15] completion: Use simple wait queues

2020-03-20 Thread Davidlohr Bueso
On Wed, 18 Mar 2020, Thomas Gleixner wrote: From: Thomas Gleixner completion uses a wait_queue_head_t to enqueue waiters. wait_queue_head_t contains a spinlock_t to protect the list of waiters which excludes it from being used in truly atomic context on a PREEMPT_RT enabled kernel. The

Re: [PATCH] KVM: PPC: Book3S HV: Skip kvmppc_uvmem_free if Ultravisor is not supported

2020-03-20 Thread Greg Kurz
On Thu, 19 Mar 2020 19:55:10 -0300 Fabiano Rosas wrote: > kvmppc_uvmem_init checks for Ultravisor support and returns early if > it is not present. Calling kvmppc_uvmem_free at module exit will cause > an Oops: > > $ modprobe -r kvm-hv > > Oops: Kernel access of bad area, sig: 11 [#1] > >

Re: [patch V2 06/15] rcuwait: Add @state argument to rcuwait_wait_event()

2020-03-20 Thread Davidlohr Bueso
On Fri, 20 Mar 2020, Sebastian Andrzej Siewior wrote: I though that v2 has it fixed with the previous commit (acpi: Remove header dependency). The kbot just reported that everything is fine. Let me look??? Nah my bad, that build did not have the full series applied :) Sorry for the noise.

[PATCH 19/15] sched/swait: Reword some of the main description

2020-03-20 Thread Davidlohr Bueso
With both the increased use of swait and kvm no longer using it, we can reword some of the comments. While removing Linus' valid rant, I've also cared to explicitly mention that swait is very different than regular wait. In addition it is mentioned against using swait in favor of the regular

[PATCH 18/15] kvm: Replace vcpu->swait with rcuwait

2020-03-20 Thread Davidlohr Bueso
The use of any sort of waitqueue (simple or regular) for wait/waking vcpus has always been an overkill and semantically wrong. Because this is per-vcpu (which is blocked) there is only ever a single waiting vcpu, thus no need for any sort of queue. As such, make use of the rcuwait primitive, with

[PATCH 17/15] rcuwait: Inform rcuwait_wake_up() users if a wakeup was attempted

2020-03-20 Thread Davidlohr Bueso
Let the caller know if wake_up_process() was actually called or not; some users can use this information for ad-hoc. Of course returning true does not guarantee that wake_up_process() actually woke anything up. Signed-off-by: Davidlohr Bueso --- include/linux/rcuwait.h | 2 +- kernel/exit.c

[PATCH 16/15] rcuwait: Get rid of stale name comment

2020-03-20 Thread Davidlohr Bueso
The 'trywake' name was renamed to simply 'wake', update the comment. Signed-off-by: Davidlohr Bueso --- kernel/exit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/exit.c b/kernel/exit.c index 0b81b26a872a..6cc6cc485d07 100644 --- a/kernel/exit.c +++ b/kernel/exit.c

Re: [patch V2 00/15] Lock ordering documentation and annotation for lockdep

2020-03-20 Thread Davidlohr Bueso
On Wed, 18 Mar 2020, Thomas Gleixner wrote: The PS3 one got converted by Peter Zijlstra to rcu_wait(). While at it, I think it makes sense to finally convert the kvm vcpu swait to rcuwait (patch 6/15 starts the necessary api changes). I'm sending some patches on top of this patchset.

Re: [patch V2 06/15] rcuwait: Add @state argument to rcuwait_wait_event()

2020-03-20 Thread Sebastian Andrzej Siewior
On 2020-03-19 22:36:57 [-0700], Davidlohr Bueso wrote: > On Wed, 18 Mar 2020, Thomas Gleixner wrote: > > Right now I'm not sure what the proper fix should be. I though that v2 has it fixed with the previous commit (acpi: Remove header dependency). The kbot just reported that everything is fine.

  1   2   >