[PATCH] powerpc/xmon: Allow limiting the size of the paca display

2015-08-11 Thread Michael Ellerman
The paca display is already more than 24 lines, which can be problematic if you have an old school 80x24 terminal, or more likely you are on a virtual terminal which does not scroll for whatever reason. We'd like to expand the paca display even more, so add a way to limit the number of lines that

Re: [PATCH v3 10/11] cxl: EEH support

2015-08-11 Thread Cyril Bur
On Wed, 12 Aug 2015 10:48:19 +1000 Daniel Axtens wrote: > EEH (Enhanced Error Handling) allows a driver to recover from the > temporary failure of an attached PCI card. Enable basic CXL support > for EEH. > Looks like the only change since was the removal of the #ifdef, if that is correct. Rev

Re: [PATCH v3 09/11] cxl: Allow the kernel to trust that an image won't change on PERST.

2015-08-11 Thread Cyril Bur
On Wed, 12 Aug 2015 10:48:18 +1000 Daniel Axtens wrote: > Provide a kernel API and a sysfs entry which allow a user to specify > that when a card is PERSTed, it's image will stay the same, allowing > it to participate in EEH. > > cxl_reset is used to reflash the card. In that case, we cannot saf

Re: [4/8] powerpc/slb: Add some helper functions to improve modularization

2015-08-11 Thread Anshuman Khandual
On 08/12/2015 09:41 AM, Michael Ellerman wrote: > On Wed, 2015-29-07 at 07:10:01 UTC, Anshuman Khandual wrote: >> > This patch adds the following six helper functions to help improve >> > modularization and readability of the code. >> > >> > (1) slb_invalidate_all:Invalidates the entir

Re: [PATCH v3 06/11] cxl: Refactor adaptor init/teardown

2015-08-11 Thread Cyril Bur
On Wed, 12 Aug 2015 10:48:15 +1000 Daniel Axtens wrote: > Some aspects of initialisation are done only once in the lifetime of > an adapter: for example, allocating memory for the adapter, > allocating the adapter number, or setting up sysfs/debugfs files. > > However, we may want to be able to

Re: [PATCH v3 02/11] cxl: Drop commands if the PCI channel is not in normal state

2015-08-11 Thread Cyril Bur
On Wed, 12 Aug 2015 10:48:11 +1000 Daniel Axtens wrote: > If the PCI channel has gone down, don't attempt to poke the hardware. > > We need to guard every time cxl_whatever_(read|write) is called. This > is because a call to those functions will dereference an offset into an > mmio register, and

Re: [PATCH v3 01/11] cxl: Convert MMIO read/write macros to inline functions

2015-08-11 Thread Cyril Bur
On Wed, 12 Aug 2015 10:48:10 +1000 Daniel Axtens wrote: > We're about to make these more complex, so make them functions > first. > Reviewed-by: Cyril Bur > Signed-off-by: Daniel Axtens > --- > drivers/misc/cxl/cxl.h | 51 > ++ > 1 file chang

Re: [PATCH 8/8] powerpc/xmon: Add some more elements to the existing PACA dump list

2015-08-11 Thread Anshuman Khandual
On 08/12/2015 11:35 AM, Michael Ellerman wrote: > On Wed, 2015-07-29 at 12:40 +0530, Anshuman Khandual wrote: >> This patch adds a set of new elements to the existing PACA dump list >> inside an xmon session which can be listed below improving the overall >> xmon debug support. >> >> (1) hmi_event_

Re: [PATCH] powerpc/prom: Use DRCONF flags while processing detected LMBs

2015-08-11 Thread Anshuman Khandual
On 08/11/2015 03:18 AM, Michael Ellerman wrote: > On Fri, 2015-08-07 at 07:49 +0530, Madhavan Srinivasan wrote: >> > >> > On Thursday 06 August 2015 06:35 PM, Anshuman Khandual wrote: >>> > > This patch just replaces hard coded values with existing >> > >> > Please drop "This patch just" and st

Re: [PATCH 8/8] powerpc/xmon: Add some more elements to the existing PACA dump list

2015-08-11 Thread Michael Ellerman
On Wed, 2015-07-29 at 12:40 +0530, Anshuman Khandual wrote: > This patch adds a set of new elements to the existing PACA dump list > inside an xmon session which can be listed below improving the overall > xmon debug support. > > (1) hmi_event_available > (2) dscr_default > (3) vmalloc_sllp > (4)

Re: [5/8] powerpc/slb: Add documentation to runtime patching of SLB encoding

2015-08-11 Thread Michael Ellerman
On Wed, 2015-29-07 at 07:10:02 UTC, Anshuman Khandual wrote: > This patch adds some documentation to 'patch_slb_encoding' function > explaining about how it clears the existing immediate value in the > given instruction and inserts a new one there. > > Signed-off-by: Anshuman Khandual > --- > ar

Re: [PATCH 09/10] Define PERF_PMU_TXN_READ interface

2015-08-11 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | On Sun, Jul 26, 2015 at 10:40:37PM -0700, Sukadev Bhattiprolu wrote: | > @@ -3743,7 +3762,13 @@ static u64 perf_event_aggregate(struct perf_event *event, u64 *enabled, | > lockdep_assert_held(&event->child_mutex); | > | > list_for_each_entry

Re: [4/8] powerpc/slb: Add some helper functions to improve modularization

2015-08-11 Thread Michael Ellerman
On Wed, 2015-29-07 at 07:10:01 UTC, Anshuman Khandual wrote: > This patch adds the following six helper functions to help improve > modularization and readability of the code. > > (1) slb_invalidate_all: Invalidates the entire SLB > (2) slb_invalidate: Invalidates SLB entri

Re: gdb with powerpc

2015-08-11 Thread Bob Cochran
On 08/11/2015 12:50 PM, Ran Shalit wrote: Hello, I would like to ask if anyone tried remote debugging with gdb/gdbserver on powerpc. [snip] ^ As an alternative, Is anyone familiar with binary package with gdb/gdbserver for powerpc used with x86 host ? I use

Re: [3/4] cxl: sparse: Flag iomem pointers properly

2015-08-11 Thread Michael Ellerman
On Fri, 2015-07-08 at 03:18:19 UTC, Daniel Axtens wrote: > Sparse identifies the following address space issues: > /scratch/dja/linux-capi/drivers/misc/cxl/vphb.c:125:17: warning: incorrect > type in assignment (different address spaces) > /scratch/dja/linux-capi/drivers/misc/cxl/vphb.c:125:17:

[PATCH v3 11/11] cxl: Add CONFIG_CXL_EEH symbol

2015-08-11 Thread Daniel Axtens
CONFIG_CXL_EEH is for CXL's EEH related code. Other drivers can depend on or #ifdef on this symbol to access the API for configuring PERST behaviour, allowing CXL to participate in the EEH process. Reviewed-by: Cyril Bur Signed-off-by: Daniel Axtens --- drivers/misc/cxl/Kconfig | 6 ++ 1 f

[PATCH v3 10/11] cxl: EEH support

2015-08-11 Thread Daniel Axtens
EEH (Enhanced Error Handling) allows a driver to recover from the temporary failure of an attached PCI card. Enable basic CXL support for EEH. Signed-off-by: Daniel Axtens --- drivers/misc/cxl/cxl.h | 1 + drivers/misc/cxl/pci.c | 252 drivers

[PATCH v3 09/11] cxl: Allow the kernel to trust that an image won't change on PERST.

2015-08-11 Thread Daniel Axtens
Provide a kernel API and a sysfs entry which allow a user to specify that when a card is PERSTed, it's image will stay the same, allowing it to participate in EEH. cxl_reset is used to reflash the card. In that case, we cannot safely assert that the image will not change. Therefore, disallow cxl_r

[PATCH v3 08/11] cxl: Don't remove AFUs/vPHBs in cxl_reset

2015-08-11 Thread Daniel Axtens
If the driver doesn't participate in EEH, the AFUs will be removed by cxl_remove, which will be invoked by EEH. If the driver does particpate in EEH, the vPHB needs to stick around so that the it can particpate. In both cases, we shouldn't remove the AFU/vPHB. Reviewed-by: Cyril Bur Signed-off-

[PATCH v3 07/11] cxl: Refactor AFU init/teardown

2015-08-11 Thread Daniel Axtens
As with an adapter, some aspects of initialisation are done only once in the lifetime of an AFU: for example, allocating memory, or setting up sysfs/debugfs files. However, we may want to be able to do some parts of the initialisation multiple times: for example, in error recovery we want to be ab

[PATCH v3 06/11] cxl: Refactor adaptor init/teardown

2015-08-11 Thread Daniel Axtens
Some aspects of initialisation are done only once in the lifetime of an adapter: for example, allocating memory for the adapter, allocating the adapter number, or setting up sysfs/debugfs files. However, we may want to be able to do some parts of the initialisation multiple times: for example, in

[PATCH v3 05/11] cxl: Clean up adapter MMIO unmap path.

2015-08-11 Thread Daniel Axtens
- MMIO pointer unmapping is guarded by a null pointer check. However, iounmap doesn't null the pointer, just invalidate it. Therefore, explicitly null the pointer after unmapping. - afu_desc_mmio also needs to be unmapped. - PCI regions are allocated in cxl_map_adapter_regs. Therefore

[PATCH v3 04/11] cxl: Make IRQ release idempotent

2015-08-11 Thread Daniel Axtens
Check if an IRQ is mapped before releasing it. This will simplify future EEH code by allowing unconditional unmapping of IRQs. Acked-by: Cyril Bur Signed-off-by: Daniel Axtens --- drivers/misc/cxl/irq.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/misc/cxl/irq.c b/drive

[PATCH v3 03/11] cxl: Allocate and release the SPA with the AFU

2015-08-11 Thread Daniel Axtens
Previously the SPA was allocated and freed upon entering and leaving AFU-directed mode. This causes some issues for error recovery - contexts hold a pointer inside the SPA, and they may persist after the AFU has been detached. We would ideally like to allocate the SPA when the AFU is allocated, an

[PATCH v3 02/11] cxl: Drop commands if the PCI channel is not in normal state

2015-08-11 Thread Daniel Axtens
If the PCI channel has gone down, don't attempt to poke the hardware. We need to guard every time cxl_whatever_(read|write) is called. This is because a call to those functions will dereference an offset into an mmio register, and the mmio mappings get invalidated in the EEH teardown. Check in th

[PATCH v3 01/11] cxl: Convert MMIO read/write macros to inline functions

2015-08-11 Thread Daniel Axtens
We're about to make these more complex, so make them functions first. Signed-off-by: Daniel Axtens --- drivers/misc/cxl/cxl.h | 51 ++ 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/drivers/misc/cxl/cxl.h b/drivers/misc/cxl/cxl.h i

[PATCH v3 00/11] CXL EEH Handling

2015-08-11 Thread Daniel Axtens
CXL accelerators are unfortunately not immune from failure. This patch set enables them to particpate in the Extended Error Handling process. This series starts with a number of preparatory patches: - Patch 1 is cleanup: converting macros to static inlines. - Patch 2 makes sure we don't touch

Re: gdb with powerpc

2015-08-11 Thread Pedro Alves
On 08/11/2015 05:50 PM, Ran Shalit wrote: > Hello, > > I would like to ask if anyone tried remote debugging with > gdb/gdbserver on powerpc. > I've tried to cross-compile gdb for powerpc, but I get into troubles. > I am using the following compiler: > powerpc-buildroot-linux-gnu-gcc (Buildroot 201

Re: [PATCH v2 08/10] cxl: Allow the kernel to trust that an image won't change on PERST.

2015-08-11 Thread Daniel Axtens
So after further offline conversations, Yes, Cyril, you are right, I don't need the ifdef in my code. I just need the symbol. I will amend my patches appropriately. On Tue, 2015-08-11 at 21:22 +1000, Daniel Axtens wrote: > > So I'm not super all over the putting all sorts of code inside > > CONF

Re: [PATCH v2 05/10] cxl: Refactor adaptor init/teardown

2015-08-11 Thread Daniel Axtens
> Looks like the majority of uses in this file the conditional block is only > one line then it makes sense (or at least in terms of numbers of lines... fair > enough), however, if you have a conditional block spanning multiple lines, I > don't like. > Much as this is a massive nit pick, I have sp

Re: RFC: Reducing the number of non volatile GPRs in the ppc64 kernel

2015-08-11 Thread Segher Boessenkool
On Tue, Aug 11, 2015 at 03:08:29PM -0500, Segher Boessenkool wrote: > [snip code] > > After the prologue there are 46 insns executed before the epilogue. > Many of those are conditional branches (that are not executed); it is > all fall-through until it jumps to the "tail" (the few insns before >

Re: [PATCH V15 00/19] perf, tools: Add support for PMU events in JSON format

2015-08-11 Thread Sukadev Bhattiprolu
Sukadev Bhattiprolu [suka...@linux.vnet.ibm.com] wrote: | CPUs support a large number of performance monitoring events (PMU events) | and often these events are very specific to an architecture/model of the | CPU. To use most of these PMU events with perf, we currently have to identify | them by th

Re: RFC: Reducing the number of non volatile GPRs in the ppc64 kernel

2015-08-11 Thread Segher Boessenkool
On Mon, Aug 10, 2015 at 02:52:28PM +1000, Anton Blanchard wrote: > Hi Bill, Segher, > > > I agree with Segher. We already know we have opportunities to do a > > better job with shrink-wrapping (pushing this kind of useless > > activity down past early exits), so having examples of code to look >

Re: [PATCH] net: fs_enet: mask interrupts for TX partial frames.

2015-08-11 Thread David Miller
From: Christophe Leroy Date: Tue, 11 Aug 2015 12:11:03 +0200 (CEST) > We are not interested in interrupts for partially transmitted frames. > Unlike SCC and FCC, the FEC doesn't handle the I bit in buffer > descriptors, instead it defines two interrupt bits, TXB and TXF. > > We have to mask TXB

Re: [PATCH] net: fs_enet: explicitly remove I flag on TX partial frames

2015-08-11 Thread David Miller
From: Christophe Leroy Date: Tue, 11 Aug 2015 12:11:00 +0200 (CEST) > We are not interested in interrupts for partially transmitted frames, > we have to clear BD_ENET_TX_INTR explicitly otherwise it may remain > from a previously used descriptor. > > Signed-off-by: Christophe Leroy Applied. __

Re: [RFC PATCH 0/8] clk: qoriq: Move chip-specific knowledge into driver

2015-08-11 Thread Michael Turquette
Hi Scott, Quoting Scott Wood (2015-06-18 19:49:10) > The existing device tree bindings are error-prone and inflexible. > Correct the mistake by moving the knowledge into the driver, which > has more flexibility in describing the quirks of each chip. This leaves > the device tree to its proper ro

Re: [Xen-devel] [PATCH v3 0/9] Use correctly the Xen memory terminologies

2015-08-11 Thread David Vrabel
On 07/08/15 17:34, Julien Grall wrote: > Hi all, > > This patch series aims to use the memory terminologies described in > include/xen/mm.h [1] for Linux xen code. Applied to for-linus-4.3, thanks. David ___ Linuxppc-dev mailing list Linuxppc-dev@lists

Re: [PATCH] powerpc/corenet32: enable DMA in defconfig

2015-08-11 Thread Scott Wood
On Tue, 2015-08-11 at 05:35 -0500, Yuan Yao-B46683 wrote: > Hi Scott, > > Could you please take some times help to review this patch? > > Thanks. > > Best Regards, > Yuan Yao I've already pushed it to my next branch. -Scott ___ Linuxppc-dev mailin

gdb with powerpc

2015-08-11 Thread Ran Shalit
Hello, I would like to ask if anyone tried remote debugging with gdb/gdbserver on powerpc. I've tried to cross-compile gdb for powerpc, but I get into troubles. I am using the following compiler: powerpc-buildroot-linux-gnu-gcc (Buildroot 2014.11) 4.8.3 I've downloaded several version, gdb versio

SDK/ethernet git repository branches

2015-08-11 Thread Madalin-Cristian Bucur
Here is a short description of the SDK/ethernet repository branches used for the DPAA drivers and Gianfar Ethernet driver. :: DPAA Upstreaming branches: :. ldup - development branch for the DPAA upstreamable drivers (QBMan, FMan, dpaa_eth) - changes are staged here for submission to the upstre

Re: [PATCH v6 23/42] powerpc/powernv: Release PEs dynamically

2015-08-11 Thread Alexey Kardashevskiy
On 08/06/2015 02:11 PM, Gavin Shan wrote: This adds the refcount to PE, which represents number of PCI devices contained in the PE. When last device leaves from the PE, the PE together with its consumed resources (IO, DMA, PELTM, PELTV) are released, to support PCI hotplug. Signed-off-by: Gavin

Re: [PATCH v2 08/10] cxl: Allow the kernel to trust that an image won't change on PERST.

2015-08-11 Thread Daniel Axtens
> So I'm not super all over the putting all sorts of code inside CONFIG_CXL_EEH, > I understand that there is another driver being merged and they'll use > CONFIG_CXL_EEH so that both this driver and the other driver can go in the > same > merge window but does this mean you need to put it around

[PATCH v2 4/5] powerpc/pseries: handle nodes without '/'

2015-08-11 Thread Andy Shevchenko
In case we have node without '/' strrchr() returns NULL which might lead to crash. Replace strrchr() by kbasename() and modify condition to avoid such behaviour. Suggested-by: Segher Boessenkool Signed-off-by: Andy Shevchenko --- arch/powerpc/platforms/pseries/of_helpers.c | 6 +++--- 1 file ch

[PATCH v2 3/5] powerpc/pseries: replace kmalloc + strlcpy

2015-08-11 Thread Andy Shevchenko
The helper kstrndup() will do the same in one line. Signed-off-by: Andy Shevchenko --- arch/powerpc/platforms/pseries/of_helpers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/pseries/of_helpers.c b/arch/powerpc/platforms/pseries/of_helpers.c inde

[PATCH v2 2/5] powerpc/pseries: fix a potential memory leak

2015-08-11 Thread Andy Shevchenko
In case we have a full node name like /foo/bar and /foo is not found the parent_path left unfreed. So, free a memory before return to a caller. Signed-off-by: Andy Shevchenko --- arch/powerpc/platforms/pseries/of_helpers.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a

[PATCH v2 1/5] powerpc/pseries: extract of_helpers module

2015-08-11 Thread Andy Shevchenko
Extract a new module to share the code between other modules. There is no functional change. Signed-off-by: Andy Shevchenko --- arch/powerpc/platforms/pseries/Makefile | 1 + arch/powerpc/platforms/pseries/of_helpers.c | 38 + arch/powerpc/platforms/pseries/of_h

[PATCH v2 5/5] powerpc/pseries: re-use code from of_helpers module

2015-08-11 Thread Andy Shevchenko
The derive_parent() has similar semantics to what we have in newly introduced of_helpers module. The replacement reduces code base and propagates the actual error code to the caller. Signed-off-by: Andy Shevchenko --- arch/powerpc/platforms/pseries/dlpar.c | 31 +-- 1

RE: [PATCH] powerpc/corenet32: enable DMA in defconfig

2015-08-11 Thread Yao Yuan
Hi Scott, Could you please take some times help to review this patch? Thanks. Best Regards, Yuan Yao > -Original Message- > From: Linuxppc-dev [mailto:linuxppc-dev- > bounces+yao.yuan=freescale@lists.ozlabs.org] On Behalf Of Yuan Yao > Sent: Thursday, July 23, 2015 11:01 AM > To: l

RE: [v2 8/9] dpaa_eth: add debugfs entries

2015-08-11 Thread Madalin-Cristian Bucur
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > > From: Madalin Bucur > Date: Wed, 5 Aug 2015 18:41:28 +0300 > > > Export per CPU counters through debugfs. > > > > Signed-off-by: Madalin Bucur > > This is absolutely inappropriate. > > You can export these just

[PATCH] net: fs_enet: explicitly remove I flag on TX partial frames

2015-08-11 Thread Christophe Leroy
We are not interested in interrupts for partially transmitted frames, we have to clear BD_ENET_TX_INTR explicitly otherwise it may remain from a previously used descriptor. Signed-off-by: Christophe Leroy --- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 3 ++- 1 file changed, 2 insert

[PATCH] net: fs_enet: mask interrupts for TX partial frames.

2015-08-11 Thread Christophe Leroy
We are not interested in interrupts for partially transmitted frames. Unlike SCC and FCC, the FEC doesn't handle the I bit in buffer descriptors, instead it defines two interrupt bits, TXB and TXF. We have to mask TXB in order to only get interrupts once the frame is fully transmitted. Signed-off

Re: [PATCH RESEND] powerpc/numa: initialize distance lookup table from drconf path

2015-08-11 Thread Nikunj A Dadhania
Hi Michael, Nikunj A Dadhania writes: > In some situations, a NUMA guest that supports > ibm,dynamic-memory-reconfiguration node will end up having flat NUMA > distances between nodes. This is because of two problems in the > current code. > > 1) Different representations of associativity lists.

Re: [PATCH v2 09/10] cxl: EEH support

2015-08-11 Thread Cyril Bur
On Tue, 28 Jul 2015 15:28:42 +1000 Daniel Axtens wrote: > EEH (Enhanced Error Handling) allows a driver to recover from the > temporary failure of an attached PCI card. Enable basic CXL support > for EEH. > Same thoughts about the config option as in 8/10. As I've mentioned to you my knowledge

Re: [PATCH v2 08/10] cxl: Allow the kernel to trust that an image won't change on PERST.

2015-08-11 Thread Cyril Bur
On Tue, 28 Jul 2015 15:28:41 +1000 Daniel Axtens wrote: > Provide a kernel API and a sysfs entry which allow a user to specify > that when a card is PERSTed, it's image will stay the same, allowing > it to participate in EEH. > > cxl_reset is used to reflash the card. In that case, we cannot saf