[PATCH-RESEND] cxl: Route eeh events to all drivers in cxl_pci_error_detected()

2017-04-26 Thread Vaibhav Jain
Fix a boundary condition where in some cases an eeh event that results in card reset isn't passed on to a driver attached to the virtual PCI device associated with a slice. This will happen in case when a slice attached device driver returns a value other than PCI_ERS_RESULT_NEED_RESET from the

[PATCH-RESEND v4] cxl: Force context lock during EEH flow

2017-04-26 Thread Vaibhav Jain
During an eeh event when the cxl card is fenced and card sysfs attr perst_reloads_same_image is set following warning message is seen in the kernel logs: [ 60.622727] Adapter context unlocked with 0 active contexts [ 60.622762] [ cut here ] [ 60.622771] WARNING:

Re: [PATCH v2] cxl: Prevent IRQ storm

2017-04-26 Thread Alastair D'Silva
On Thu, 2017-04-27 at 14:41 +1000, Andrew Donnellan wrote: On 27/04/17 11:37, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > In some situations, a faulty AFU slice may create an interrupt > > storm, > > rendering the machine unusable. Since these interrupts are

Re: [PATCH v2] cxl: Prevent IRQ storm

2017-04-26 Thread Andrew Donnellan
On 27/04/17 11:37, Alastair D'Silva wrote: From: Alastair D'Silva In some situations, a faulty AFU slice may create an interrupt storm, rendering the machine unusable. Since these interrupts are informational only, present the interrupt once, then mask it off to prevent

Re: [PATCH] powerpc/mm/hugetlb: Add support for 1G huge pages

2017-04-26 Thread Aneesh Kumar K.V
Anshuman Khandual writes: > On 04/17/2017 10:44 PM, Aneesh Kumar K.V wrote: >> POWER9 supports hugepages of size 2M and 1G in radix MMU mode. This patch >> enables the usage of 1G page size for hugetlbfs. This also update the helper >> such we can do 1G page

Re: [PATCH 0/4] powerpc: build out kprobes blacklist

2017-04-26 Thread Masami Hiramatsu
Hello Naveen, On Tue, 25 Apr 2017 22:04:05 +0530 "Naveen N. Rao" wrote: > This is the second in the series of patches to build out an appropriate > kprobes blacklist. This series blacklists system_call() and functions > involved when handling the trap itself.

Re: [PATCH] kallsyms: optimize kallsyms_lookup_name() for a few cases

2017-04-26 Thread Masami Hiramatsu
On Thu, 27 Apr 2017 01:38:10 +0530 "Naveen N. Rao" wrote: > Michael Ellerman wrote: > > "Naveen N. Rao" writes: > >> diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c > >> index 6a3b249a2ae1..d134b060564f 100644 > >> ---

[PATCH v2] cxl: Prevent IRQ storm

2017-04-26 Thread Alastair D'Silva
From: Alastair D'Silva In some situations, a faulty AFU slice may create an interrupt storm, rendering the machine unusable. Since these interrupts are informational only, present the interrupt once, then mask it off to prevent it from being retriggered until the card is

[PATCH] powerpc/powernv: Fix missing attr initialisation in opal_export_attrs()

2017-04-26 Thread Michael Ellerman
In opal_export_attrs() we dynamically allocate some bin_attributes. They're allocated with kmalloc() and although we initialise most of the fields, we don't initialise write() or mmap(), and in particular we don't initialise the lockdep related fields in the embedded struct attribute. This leads

Re: [PATCH] cxl: Prevent IRQ storm

2017-04-26 Thread Andrew Donnellan
On 27/04/17 11:09, Alastair D'Silva wrote: Patch looks good, thanks! It doesn't apply cleanly on the 'next' tree due to the capi2 patchset though, so you should probably rebase on that tree. The bits have changed a bit on PSL9, but the approach still works (error type reported in the first byte,

Re: [PATCH] cxl: Prevent IRQ storm

2017-04-26 Thread Alastair D'Silva
On Wed, 2017-04-26 at 11:23 +0200, Frederic Barrat wrote: > > Le 26/04/2017 à 08:40, Alastair D'Silva a écrit : > > From: Alastair D'Silva > > > > In some situations, a faulty AFU slice may create an interrupt > > storm, > > rendering the machine unusable. Since these

Re: [PATCH] kallsyms: optimize kallsyms_lookup_name() for a few cases

2017-04-26 Thread Naveen N. Rao
Michael Ellerman wrote: > "Naveen N. Rao" writes: >> diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c >> index 6a3b249a2ae1..d134b060564f 100644 >> --- a/kernel/kallsyms.c >> +++ b/kernel/kallsyms.c >> @@ -205,6 +205,12 @@ unsigned long

Re: [PATCH] powerpc/kprobes: refactor kprobe_lookup_name for safer string operations

2017-04-26 Thread Naveen N. Rao
Excerpts from Masami Hiramatsu's message of April 26, 2017 10:11: On Tue, 25 Apr 2017 21:37:11 +0530 "Naveen N. Rao" wrote: Use safer string manipulation functions when dealing with a user-provided string in kprobe_lookup_name(). Reported-by: David Laight

Re: [PATCH v3 1/2] powerpc/fadump: reduce memory consumption for capture kernel

2017-04-26 Thread Michal Suchánek
Hello, On Wed, 26 Apr 2017 13:05:20 +0530 Hari Bathini wrote: > With fadump (dump capture) kernel booting like a regular kernel, it > almost needs the same amount of memory to boot as the production > kernel, which is unwarranted for a dump capture kernel. But with

Re: [PATCH] powerpc/mm/hugetlb: Add support for 1G huge pages

2017-04-26 Thread Anshuman Khandual
On 04/17/2017 10:44 PM, Aneesh Kumar K.V wrote: > POWER9 supports hugepages of size 2M and 1G in radix MMU mode. This patch > enables the usage of 1G page size for hugetlbfs. This also update the helper > such we can do 1G page allocation at runtime. > > Since we can do this only when radix

[PATCH v2 2/2] powerpc/mm/radix: Optimise tlbiel flush all case

2017-04-26 Thread Michael Ellerman
_tlbiel_pid() is called with a ric (Radix Invalidation Control) argument of either RIC_FLUSH_TLB or RIC_FLUSH_ALL. RIC_FLUSH_ALL says to invalidate the entire TLB and the Page Walk Cache (PWC). To flush the whole TLB, we have to iterate over each set (congruence class) of the TLB. Currently we

[PATCH v2 1/2] powerpc/mm/radix: Optimise Page Walk Cache flush

2017-04-26 Thread Michael Ellerman
Currently we implement flushing of the page walk cache (PWC) by calling _tlbiel_pid() with a RIC (Radix Invalidation Control) value of 1 which says to only flush the PWC. But _tlbiel_pid() loops over each set (congruence class) of the TLB, which is not necessary when we're just flushing the PWC.

Re: [PATCH v3 1/2] powerpc/fadump: reduce memory consumption for capture kernel

2017-04-26 Thread Michael Ellerman
Hari Bathini writes: > On Wednesday 26 April 2017 04:02 PM, Michael Ellerman wrote: >> Hari Bathini writes: >> >>> diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c >>> index 8ff0dd4..87edc7b 100644 >>> ---

Re: [PATCH v3 1/2] powerpc/fadump: reduce memory consumption for capture kernel

2017-04-26 Thread Hari Bathini
On Wednesday 26 April 2017 04:02 PM, Michael Ellerman wrote: Hari Bathini writes: diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index 8ff0dd4..87edc7b 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c @@

Re: [PATCH v3] KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller

2017-04-26 Thread Paul Mackerras
On Wed, Apr 26, 2017 at 12:07:30PM +1000, Michael Ellerman wrote: > From: Benjamin Herrenschmidt > > This patch makes KVM capable of using the XIVE interrupt controller > to provide the standard PAPR "XICS" style hypercalls. It is necessary > for proper operations when

[PATCH] powerpc/powernv: Fix oops on P9 DD1 in cause_ipi()

2017-04-26 Thread Michael Ellerman
Recently we merged the native xive support for Power9, and then separately some reworks for doorbell IPI support. In isolation both series were OK, but the merged result had a bug in one case. On P9 DD1 we use pnv_p9_dd1_cause_ipi() which tries to use doorbells, and then falls back to the

Re: [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean

2017-04-26 Thread Michael Ellerman
Shuah Khan writes: > On 04/21/2017 11:38 PM, Michael Ellerman wrote: >> Shuah Khan writes: >> This patch is a good solution to fix the warnings. >> >> Acked-by: Michael Ellerman > > Thanks. I plan to apply the patch with

Re: [PATCH] kallsyms: optimize kallsyms_lookup_name() for a few cases

2017-04-26 Thread Michael Ellerman
"Naveen N. Rao" writes: > diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c > index 6a3b249a2ae1..d134b060564f 100644 > --- a/kernel/kallsyms.c > +++ b/kernel/kallsyms.c > @@ -205,6 +205,12 @@ unsigned long kallsyms_lookup_name(const char *name) > unsigned

Re: [PATCH v3 1/2] powerpc/fadump: reduce memory consumption for capture kernel

2017-04-26 Thread Michael Ellerman
Hari Bathini writes: > diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c > index 8ff0dd4..87edc7b 100644 > --- a/arch/powerpc/kernel/fadump.c > +++ b/arch/powerpc/kernel/fadump.c > @@ -338,6 +343,36 @@ unsigned long __init

Re: [PATCH] cxl: Prevent IRQ storm

2017-04-26 Thread Frederic Barrat
Le 26/04/2017 à 08:40, Alastair D'Silva a écrit : From: Alastair D'Silva In some situations, a faulty AFU slice may create an interrupt storm, rendering the machine unusable. Since these interrupts are informational only, present the interrupt once, then mask it off to

Re: [PATCH] powerpc/64s: use ibm,tlbiel-congruence-classes-(hash|radix) dt property

2017-04-26 Thread Nicholas Piggin
On Mon, 24 Apr 2017 13:53:12 +0530 "Aneesh Kumar K.V" wrote: > Nicholas Piggin writes: > > > tlbiel instruction with IS!=0 on POWER7 and later Book3s CPUs invalidate > > TLBs belonging to a specified congruence class. In order to operate on >

Re: stable-rc build: 0 warnings 2 failures (stable-rc/v4.4.63-29-ge636782)

2017-04-26 Thread gregkh
On Wed, Apr 26, 2017 at 03:00:19PM +1000, Michael Ellerman wrote: > Arnd Bergmann writes: > > > On Tue, Apr 25, 2017 at 7:08 PM, Olof's autobuilder wrote: > >> > >> Failed defconfigs: > >> powerpc.pasemi_defconfig > >> powerpc.ppc64_defconfig > >>

[PATCH v3 2/2] powerpc/fadump: update documentation about 'fadump_append=' parameter

2017-04-26 Thread Hari Bathini
With the introduction of 'fadump_append=' parameter to pass additional parameters to fadump (capture) kernel, update documentation about it. Signed-off-by: Hari Bathini --- Documentation/powerpc/firmware-assisted-dump.txt |6 +- 1 file changed, 5

[PATCH v3 1/2] powerpc/fadump: reduce memory consumption for capture kernel

2017-04-26 Thread Hari Bathini
With fadump (dump capture) kernel booting like a regular kernel, it almost needs the same amount of memory to boot as the production kernel, which is unwarranted for a dump capture kernel. But with no option to disable some of the unnecessary subsystems in fadump kernel, that much memory is wasted

Re: [PATCH v4 2/3] powerpc/fadump: Use the correct VMCOREINFO_NOTE_SIZE for phdr

2017-04-26 Thread Dave Young
Ccing ppc list On 04/20/17 at 07:39pm, Xunlei Pang wrote: > vmcoreinfo_max_size stands for the vmcoreinfo_data, the > correct one we should use is vmcoreinfo_note whose total > size is VMCOREINFO_NOTE_SIZE. > > Like explained in commit 77019967f06b ("kdump: fix exported > size of vmcoreinfo

Re: [PATCH] cxl: Prevent IRQ storm

2017-04-26 Thread Andrew Donnellan
On 26/04/17 16:40, Alastair D'Silva wrote: From: Alastair D'Silva In some situations, a faulty AFU slice may create an interrupt storm, rendering the machine unusable. Since these interrupts are informational only, present the interrupt once, then mask it off to prevent

[PATCH] cxl: Prevent IRQ storm

2017-04-26 Thread Alastair D'Silva
From: Alastair D'Silva In some situations, a faulty AFU slice may create an interrupt storm, rendering the machine unusable. Since these interrupts are informational only, present the interrupt once, then mask it off to prevent it from being retriggered until the card is