[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

[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,

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: [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 split

Re: using general IRQs

2015-08-11 Thread Ran Shalit
On Tue, Aug 11, 2015 at 6:47 AM, Scott Wood scottw...@freescale.com wrote: On Tue, 2015-08-11 at 06:45 +0300, Ran Shalit wrote: On Tue, Aug 11, 2015 at 5:29 AM, Scott Wood scottw...@freescale.com wrote: On Mon, 2015-08-10 at 13:40 +0300, Ran Shalit wrote: On Mon, Aug 10, 2015 at 10:48 AM,

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 d...@axtens.net 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

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

2015-08-11 Thread Nikunj A Dadhania
Hi Michael, Nikunj A Dadhania nik...@linux.vnet.ibm.com 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

Re: [PATCH v2 04/10] cxl: Clean up adapter MMIO unmap path.

2015-08-11 Thread Daniel Axtens
Hi Cyril, - PCI regions are allocated in cxl_map_adapter_regs. Therefore they should be released in unmap, not elsewhere. You've changed the order in which cxl_remove_adapter() does its work, which, I'm sure you've considered and it's fine, best to check. Yeah, I have considered

[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.

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 d...@axtens.net 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

[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 andriy.shevche...@linux.intel.com --- arch/powerpc/platforms/pseries/Makefile | 1 + arch/powerpc/platforms/pseries/of_helpers.c | 38 +

[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 seg...@kernel.crashing.org Signed-off-by: Andy Shevchenko andriy.shevche...@linux.intel.com ---

[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 andriy.shevche...@linux.intel.com --- arch/powerpc/platforms/pseries/dlpar.c | 31

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

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 madalin.bu...@freescale.com Date: Wed, 5 Aug 2015 18:41:28 +0300 Export per CPU counters through debugfs. Signed-off-by: Madalin Bucur madalin.bu...@freescale.com This is absolutely

[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 andriy.shevche...@linux.intel.com --- arch/powerpc/platforms/pseries/of_helpers.c | 6 ++ 1 file changed, 2

[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 andriy.shevche...@linux.intel.com --- 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

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:

[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 christophe.le...@c-s.fr --- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 3 ++-

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

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

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

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 mailing list

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

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 role

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

2015-08-11 Thread David Miller
From: Christophe Leroy christophe.le...@c-s.fr 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

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

2015-08-11 Thread David Miller
From: Christophe Leroy christophe.le...@c-s.fr 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.

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 at to

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

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

2015-08-11 Thread Cyril Bur
On Tue, 28 Jul 2015 15:28:38 +1000 Daniel Axtens d...@axtens.net 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

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 the

[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

[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.

[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 d...@axtens.net --- drivers/misc/cxl/cxl.h | 1 + drivers/misc/cxl/pci.c | 252

[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 cyril...@gmail.com Signed-off-by: Daniel Axtens d...@axtens.net ---

[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

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); | |

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

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 2014.11)

[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 d...@axtens.net --- drivers/misc/cxl/cxl.h | 51 ++ 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/drivers/misc/cxl/cxl.h

[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

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:

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

[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

[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 cyril...@gmail.com Signed-off-by: Daniel Axtens d...@axtens.net --- drivers/misc/cxl/irq.c | 9 + 1 file changed, 9 insertions(+) diff

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 entries