Re: [PATCH 2/2] powerpc/fadump: avoid holes in boot memory area when fadump is registered

2017-05-04 Thread Mahesh Jagannath Salgaonkar
On 05/04/2017 11:24 PM, Hari Bathini wrote: > To register fadump, boot memory area - the size of low memory chunk that > is required for a kernel to boot successfully when booted with restricted > memory, is assumed to have no holes. But this memory area is currently > not protected from hot-remove

Re: [PATCH 1/2] powerpc/fadump: avoid duplicates in crash memory ranges

2017-05-04 Thread Mahesh Jagannath Salgaonkar
On 05/04/2017 11:23 PM, Hari Bathini wrote: > fadump sets up crash memory ranges to be used for creating PT_LOAD > program headers in elfcore header. Memory chunk RMA_START through > boot memory area size is added as the first memory range because > firmware, at the time of crash, moves this memory

Re: [linux-next][bisected 1945bc45] build brakes for PowerPC BE configuration on LPAR

2017-05-04 Thread Nicholas Piggin
On Fri, 05 May 2017 09:40:10 +0530 Abdul Haleem wrote: > On Thu, 2017-05-04 at 20:41 +1000, Nicholas Piggin wrote: > > On Thu, 04 May 2017 14:54:19 +0530 > > Abdul Haleem wrote: > > > > > Hi, > > > > > > linux-next build fails on BE config with next-20170424 onwards > > > > > > the patch ht

Re: [PATCH v2] drivers:soc:fsl:qbman:qman.c: Sleep instead of stuck hacking jiffies.

2017-05-04 Thread Scott Wood
On Fri, 2017-05-05 at 08:01 +0200, Karim Eshapa wrote: > > On 5/4/2017 5:07 PM, Scott Wood wrote: > > > On Thu, 2017-05-04 at 06:58 +0200, Karim Eshapa wrote: > > > > +stop = jiffies + 1; > > > > +/* > > > > + * if MR was full and h/w had other FQRNI entries to produce, we > > > > +

[linux-next][bock] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500

2017-05-04 Thread Abdul Haleem
Hi, 4.11.0 Linus mainline booted with Warnings on PowerPC. We did not see this on next-20170407 but on next-20170410 and later. Machine type: Power 7 PowerVM LPAR Kernel : 4.11.0 Config : file attched. IPv6: ADDRCONF(NETDEV_UP): net0: link is not ready Starting WPA Supplicant daemon...

RE: [PATCH v2] drivers:soc:fsl:qbman:qman.c: Sleep instead of stuck hacking jiffies.

2017-05-04 Thread Karim Eshapa
>On 5/4/2017 5:07 PM, Scott Wood wrote: >> On Thu, 2017-05-04 at 06:58 +0200, Karim Eshapa wrote: >>> +stop = jiffies + 1; >>> +/* >>> + * if MR was full and h/w had other FQRNI entries to produce, we >>> + * need to allow it time to produce those entries once the >>> + * ex

RE: [PATCH v3] drivers:soc:fsl:qbman:qman.c: Sleep instead of stuck hacking jiffies.

2017-05-04 Thread Karim Eshapa
Use msleep() instead of stucking with long delay will be more efficient. Signed-off-by: Karim Eshapa --- drivers/soc/fsl/qbman/qman.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c index 3d891db..18d391e 100644

[PATCH] cxl: Unlock on error in probe

2017-05-04 Thread Dan Carpenter
We should unlock if get_cxl_adapter() fails. Fixes: 594ff7d067ca ("cxl: Support to flash a new image on the adapter from a guest") Signed-off-by: Dan Carpenter diff --git a/drivers/misc/cxl/flash.c b/drivers/misc/cxl/flash.c index 7c61c70ba3f6..37475abea3e6 100644 --- a/drivers/misc/cxl/flash.c

Re: [RFC 0/2] powerpc/mm: Mark memory contexts requiring global TLBIs

2017-05-04 Thread Alistair Popple
Hi Frederic, On Wed, 3 May 2017 04:29:04 PM Frederic Barrat wrote: > capi2 and opencapi require the TLB invalidations being sent for > addresses used on the cxl adapter or opencapi device to be global, as > there's a translation cache in the PSL (for capi2) or NPU (for > opencapi). The CAPP (for P

Re: [linux-next][bisected 1945bc45] build brakes for PowerPC BE configuration on LPAR

2017-05-04 Thread Abdul Haleem
On Thu, 2017-05-04 at 20:41 +1000, Nicholas Piggin wrote: > On Thu, 04 May 2017 14:54:19 +0530 > Abdul Haleem wrote: > > > Hi, > > > > linux-next build fails on BE config with next-20170424 onwards > > > > the patch https://lkml.org/lkml/2017/4/20/994 fixes a similar issue > > with kvm guest b

Re: [PATCH v2] drivers:soc:fsl:qbman:qman.c: Sleep instead of stuck hacking jiffies.

2017-05-04 Thread Roy Pledge
On 5/4/2017 5:07 PM, Scott Wood wrote: > On Thu, 2017-05-04 at 06:58 +0200, Karim Eshapa wrote: >> +stop = jiffies + 1; >> +/* >> + * if MR was full and h/w had other FQRNI entries to produce, we >> + * need to allow it time to produce those entries once the >> + * existing

Re: [PATCH v2] drivers:soc:fsl:qbman:qman.c: Sleep instead of stuck hacking jiffies.

2017-05-04 Thread Scott Wood
On Thu, 2017-05-04 at 06:58 +0200, Karim Eshapa wrote: > + stop = jiffies + 1; > + /* > +  * if MR was full and h/w had other FQRNI entries to produce, we > +  * need to allow it time to produce those entries once the > +  * existing entries are consumed. A worst-case situat

Re: Freescale mpc8315 IRQ0 setup

2017-05-04 Thread Scott Wood
On Thu, 2017-05-04 at 17:06 +0200, Juergen Schindele wrote: > Am Dienstag, 2. Mai 2017, 22:29:34 schrieb Scott Wood: > > On Tue, 2017-05-02 at 14:43 +0200, Juergen Schindele wrote: > > > Dear Scott, > > > sorry for the delay but i am not very familiar with the formating. > > > I passed the patch tr

[PATCH 2/2] powerpc/fadump: avoid holes in boot memory area when fadump is registered

2017-05-04 Thread Hari Bathini
To register fadump, boot memory area - the size of low memory chunk that is required for a kernel to boot successfully when booted with restricted memory, is assumed to have no holes. But this memory area is currently not protected from hot-remove operations. So, fadump could fail to re-register af

[PATCH 1/2] powerpc/fadump: avoid duplicates in crash memory ranges

2017-05-04 Thread Hari Bathini
fadump sets up crash memory ranges to be used for creating PT_LOAD program headers in elfcore header. Memory chunk RMA_START through boot memory area size is added as the first memory range because firmware, at the time of crash, moves this memory chunk to different location specified during fadump

Re: [RFC 1/2] powerpc/mm: Add marker for contexts requiring global TLB invalidations

2017-05-04 Thread Frederic Barrat
Le 04/05/2017 à 08:41, Aneesh Kumar K.V a écrit : Frederic Barrat writes: Introduce a new 'flags' attribute per context and define its first bit to be a marker requiring all TLBIs for that context to be broadcasted globally. Once that marker is set on a context, it cannot be removed. Such a

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

2017-05-04 Thread 'Naveen N. Rao'
On 2017/05/04 12:45PM, David Laight wrote: > From: Naveen N. Rao [mailto:naveen.n@linux.vnet.ibm.com] > > Sent: 04 May 2017 11:25 > > Use safer string manipulation functions when dealing with a > > user-provided string in kprobe_lookup_name(). > > > > Reported-by: David Laight > > Signed-off-

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

2017-05-04 Thread David Laight
From: Paul Clarke > Sent: 04 May 2017 16:07 ... > > + if ((c = strnchr(name, MODULE_NAME_LEN, ':')) != NULL) { > > Shouldn't this be MODULE_NAME_LEN + 1, since the ':' can come after a module > name of length > MODULE_NAME_LEN? No, because MODULE_NAME_LEN includes the terminating '\0'.

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

2017-05-04 Thread Paul Clarke
On 05/04/2017 05:24 AM, Naveen N. Rao wrote: > Use safer string manipulation functions when dealing with a > user-provided string in kprobe_lookup_name(). > > Reported-by: David Laight > Signed-off-by: Naveen N. Rao > --- > Changed to ignore return value of 0 from strscpy(), as suggested by > Ma

Re: Freescale mpc8315 IRQ0 setup

2017-05-04 Thread Juergen Schindele
Am Dienstag, 2. Mai 2017, 22:29:34 schrieb Scott Wood: > On Tue, 2017-05-02 at 14:43 +0200, Juergen Schindele wrote: > > Dear Scott, > > sorry for the delay but i am not very familiar with the formating. > > I passed the patch trough checkpatch.pl and there was no more error. > > pease find patch i

[PATCH v8 09/10] powerpc/perf: Thread IMC PMU functions

2017-05-04 Thread Anju T Sudhakar
This patch adds the PMU functions required for event initialization, read, update, add, del etc. for thread IMC PMU. Thread IMC PMUs are used for per-task monitoring. For each CPU, a page of memory is allocated and is kept static i.e., these pages will exist till the machine shuts down. The base

[PATCH v8 07/10] powerpc/perf: PMU functions for Core IMC and hotplugging

2017-05-04 Thread Anju T Sudhakar
From: Hemant Kumar This patch adds the PMU function to initialize a core IMC event. It also adds cpumask initialization function for core IMC PMU. For initialization, a 8KB of memory is allocated per core where the data for core IMC counters will be accumulated. The base address for this page is

[PATCH v8 10/10] powerpc/perf: Thread imc cpuhotplug support

2017-05-04 Thread Anju T Sudhakar
This patch adds support for thread IMC on cpuhotplug. When a cpu goes offline, the LDBAR for that cpu is disabled, and when it comes back online the previous ldbar value is written back to the LDBAR for that cpu. To register the hotplug functions for thread_imc, a new state CPUHP_AP_PERF_POWERPC_

[PATCH v8 06/10] powerpc/powernv: Core IMC events detection

2017-05-04 Thread Anju T Sudhakar
From: Hemant Kumar This patch adds support for detection of core IMC events along with the Nest IMC events. It adds a new domain IMC_DOMAIN_CORE and its determined with the help of the compatibility string "ibm,imc-counters-core" based on the IMC device tree. Signed-off-by: Anju T Sudhakar Sign

[PATCH v8 08/10] powerpc/powernv: Thread IMC events detection

2017-05-04 Thread Anju T Sudhakar
Patch adds support for detection of thread IMC events. It adds a new domain IMC_DOMAIN_THREAD and it is determined with the help of the compatibility string "ibm,imc-counters-thread" based on the IMC device tree. Signed-off-by: Anju T Sudhakar Signed-off-by: Hemant Kumar Signed-off-by: Madhavan

[PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support

2017-05-04 Thread Anju T Sudhakar
Adds cpumask attribute to be used by each IMC pmu. Only one cpu (any online CPU) from each chip for nest PMUs is designated to read counters. On CPU hotplug, dying CPU is checked to see whether it is one of the designated cpus, if yes, next online cpu from the same chip (for nest units) is designa

[PATCH v8 04/10] powerpc/perf: Add generic IMC pmu groupand event functions

2017-05-04 Thread Anju T Sudhakar
From: Hemant Kumar Device tree IMC driver code parses the IMC units and their events. It passes the information to IMC pmu code which is placed in powerpc/perf as "imc-pmu.c". Patch adds a set of generic imc pmu related event functions to be used by each imc pmu unit. Add code to setup format a

[PATCH v8 03/10] powerpc/powernv: Detect supported IMC units and its events

2017-05-04 Thread Anju T Sudhakar
Parse device tree to detect IMC units. Traverse through each IMC unit node to find supported events and corresponding unit/scale files (if any). Here is the DTS file for reference: https://github.com/open-power/ima-catalog/blob/master/81E00612.4E0100.dts The device tree for IMC counters

[PATCH v8 01/10] powerpc/powernv: Data structure and macros definitions for IMC

2017-05-04 Thread Anju T Sudhakar
From: Hemant Kumar Create a new header file to add the data structures and macros needed for In-Memory Collection (IMC) counter support. Signed-off-by: Anju T Sudhakar Signed-off-by: Hemant Kumar Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/imc-pmu.h | 95 +

[PATCH v8 02/10] powerpc/powernv: Autoload IMC device driver module

2017-05-04 Thread Anju T Sudhakar
This patch does three things : - Enables "opal.c" to create a platform device for the IMC interface according to the appropriate compatibility string. - Find the reserved-memory region details from the system device tree and get the base address of HOMER (Reserved memory) region address for

[PATCH v8 00/10] IMC Instrumentation Support

2017-05-04 Thread Anju T Sudhakar
Power9 has In-Memory-Collection (IMC) infrastructure which contains various Performance Monitoring Units (PMUs) at Nest level (these are on-chip but off-core), Core level and Thread level. The Nest PMU counters are handled by a Nest IMC microcode which runs in the OCC (On-Chip Controller) complex.

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

2017-05-04 Thread David Laight
From: Naveen N. Rao [mailto:naveen.n@linux.vnet.ibm.com] > Sent: 04 May 2017 11:25 > Use safer string manipulation functions when dealing with a > user-provided string in kprobe_lookup_name(). > > Reported-by: David Laight > Signed-off-by: Naveen N. Rao > --- > Changed to ignore return value

Re: [linux-next][bisected 1945bc45] build brakes for PowerPC BE configuration on LPAR

2017-05-04 Thread Abdul Haleem
On Thu, 2017-05-04 at 20:29 +1000, Michael Ellerman wrote: > Abdul Haleem writes: > > > Hi, > > > > linux-next build fails on BE config with next-20170424 onwards > > > > the patch https://lkml.org/lkml/2017/4/20/994 fixes a similar issue > > with kvm guest build failure. > > > > arch/powerpc/ke

Re: [linux-next][bisected 1945bc45] build brakes for PowerPC BE configuration on LPAR

2017-05-04 Thread Nicholas Piggin
On Thu, 04 May 2017 14:54:19 +0530 Abdul Haleem wrote: > Hi, > > linux-next build fails on BE config with next-20170424 onwards > > the patch https://lkml.org/lkml/2017/4/20/994 fixes a similar issue > with kvm guest build failure. > > arch/powerpc/kernel/exceptions-64s.S: Assembler messages:

Re: [linux-next][bisected 1945bc45] build brakes for PowerPC BE configuration on LPAR

2017-05-04 Thread Michael Ellerman
Abdul Haleem writes: > Hi, > > linux-next build fails on BE config with next-20170424 onwards > > the patch https://lkml.org/lkml/2017/4/20/994 fixes a similar issue > with kvm guest build failure. > > arch/powerpc/kernel/exceptions-64s.S: Assembler messages: > arch/powerpc/kernel/exceptions-64s

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

2017-05-04 Thread Naveen N. Rao
Use safer string manipulation functions when dealing with a user-provided string in kprobe_lookup_name(). Reported-by: David Laight Signed-off-by: Naveen N. Rao --- Changed to ignore return value of 0 from strscpy(), as suggested by Masami. - Naveen arch/powerpc/kernel/kprobes.c | 47

Re: WARNING: CPU: 0 PID: 1 at /build/linux-dp17Ba/linux-4.9.18/arch/powerpc/lib/feature-fixups.c:208 check_features+0x38/0x7c

2017-05-04 Thread Michael Ellerman
Mathieu Malaterre writes: > Hi all, > > Does this dmesg output speaks to anyone here (smp kernel): > > > [4.767389] [ cut here ] > [4.774668] WARNING: CPU: 0 PID: 1 at > /build/linux-dp17Ba/linux-4.9.18/arch/powerpc/lib/feature-fixups.c:208 > check_features+0x38/0x

[PATCH] powerpc/64s: ibm,powerpc-cpu-features dt implementation

2017-05-04 Thread Nicholas Piggin
The ibm,powerpc-cpu-features dt binding describes CPU features with ascii names and extensible compatibility, privilege, and enablement metadata that allows improved flexibility and compatibility with new hardware. Design overview and specification of features is available in the OPAL source. Sig

Re: [PATCH v2 2/3] powerpc/kprobes: un-blacklist system_call() from kprobes

2017-05-04 Thread Michael Ellerman
"Naveen N. Rao" writes: > On 2017/05/04 04:03PM, Michael Ellerman wrote: >> Would this work? >> >> diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S >> index 767ef6d68c9e..8d0fa4a2262a 100644 >> --- a/arch/powerpc/kernel/entry_64.S >> +++ b/arch/powerpc/kernel/entry_64.

WARNING: CPU: 0 PID: 1 at /build/linux-dp17Ba/linux-4.9.18/arch/powerpc/lib/feature-fixups.c:208 check_features+0x38/0x7c

2017-05-04 Thread Mathieu Malaterre
Hi all, Does this dmesg output speaks to anyone here (smp kernel): [4.767389] [ cut here ] [4.774668] WARNING: CPU: 0 PID: 1 at /build/linux-dp17Ba/linux-4.9.18/arch/powerpc/lib/feature-fixups.c:208 check_features+0x38/0x7c [4.782256] Modules linked in: [4

Re: [RFC 1/2] powerpc/mm: Add marker for contexts requiring global TLB invalidations

2017-05-04 Thread Michael Ellerman
Frederic Barrat writes: > Introduce a new 'flags' attribute per context and define its first bit > to be a marker requiring all TLBIs for that context to be broadcasted > globally. Once that marker is set on a context, it cannot be removed. > > Such a marker is useful for memory contexts used by

[linux-next][bisected 1945bc45] build brakes for PowerPC BE configuration on LPAR

2017-05-04 Thread Abdul Haleem
Hi, linux-next build fails on BE config with next-20170424 onwards the patch https://lkml.org/lkml/2017/4/20/994 fixes a similar issue with kvm guest build failure. arch/powerpc/kernel/exceptions-64s.S: Assembler messages: arch/powerpc/kernel/exceptions-64s.S:395: Error: operand out of range (0

Re: [RFC 1/2] powerpc/mm: Add marker for contexts requiring global TLB invalidations

2017-05-04 Thread Michael Ellerman
Balbir Singh writes: > On Wed, 2017-05-03 at 16:29 +0200, Frederic Barrat wrote: >> Introduce a new 'flags' attribute per context and define its first bit >> to be a marker requiring all TLBIs for that context to be broadcasted >> globally. Once that marker is set on a context, it cannot be remov

[PATCH v3 2/3] powerpc/kprobes: un-blacklist system_call() from kprobes

2017-05-04 Thread Naveen N. Rao
It is actually safe to probe system_call() in entry_64.S, but only till we unset MSR_RI. To allow this, add a new label system_call_exit after the mtmsrd and blacklist that. Though the mtmsrd instruction itself is now whitelisted, we won't be allowed to probe on it as we don't allow probing on rfi

Re: [RFC 2/2] cxl: Mark context requiring global TLBIs

2017-05-04 Thread Balbir Singh
On Wed, 2017-05-03 at 16:29 +0200, Frederic Barrat wrote: > The PSL needs to see all TLBI pertinent to the memory contexts used on > the cxl adapter. For the hash memory model, it was done by making all > TLBIs global as soon as the cxl driver is in us. For radix, we need > something similar, but w

Re: [PATCH v2 2/3] powerpc/kprobes: un-blacklist system_call() from kprobes

2017-05-04 Thread Naveen N. Rao
On 2017/05/04 04:03PM, Michael Ellerman wrote: > "Naveen N. Rao" writes: > > > On 2017/04/27 08:19PM, Michael Ellerman wrote: > >> "Naveen N. Rao" writes: > >> > >> > It is actually safe to probe system_call() in entry_64.S, but only till > >> > .Lsyscall_exit. To allow this, convert .Lsyscall_

Re: [RFC 1/2] powerpc/mm: Add marker for contexts requiring global TLB invalidations

2017-05-04 Thread Balbir Singh
On Wed, 2017-05-03 at 16:29 +0200, Frederic Barrat wrote: > Introduce a new 'flags' attribute per context and define its first bit > to be a marker requiring all TLBIs for that context to be broadcasted > globally. Once that marker is set on a context, it cannot be removed. > > Such a marker is us