[no subject]

2016-02-06 Thread Anton Blanchard via Linuxppc-dev
--- Begin Message --- > Since binutils 2.26 BFD is doing suffix merging on STRTAB sections. > But dedotify modifies the symbol names in place, which can also modify > unrelated symbols with a name that matches a suffix of a dotted > name. To remove the leading dot of a symbol name we can just >

[PATCH v3 04/18] cxl: Introduce implementation-specific API

2016-02-06 Thread Frederic Barrat
The backend API (in cxl.h) lists some low-level functions whose implementation is different on bare-metal and in a guest. Each environment implements its own functions, and the common code uses them through function pointers, defined in cxl_backend_ops Co-authored-by: Christophe Lombard

[PATCH v3 06/18] cxl: Isolate a few bare-metal-specific calls

2016-02-06 Thread Frederic Barrat
A few functions are mostly common between bare-metal and guest and just need minor tuning. To avoid crowding the backend API, introduce a few 'if' based on the CPU being in HV mode. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat

[PATCH v3 07/18] cxl: Update cxl_irq() prototype

2016-02-06 Thread Frederic Barrat
The context parameter when calling cxl_irq() should be strongly typed. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/cxl.h | 2 +-

[PATCH v3 09/18] cxl: New possible return value from hcall

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard The hcalls introduced for CAPI use a possible new value: H_STATE (invalid state). Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard

[PATCH v3 16/18] cxl: Support the cxl kernel API from a guest

2016-02-06 Thread Frederic Barrat
Like on bare-metal, the cxl driver creates a virtual PHB and a pci device for the AFU. The configuration space of the device is mapped to the configuration record of the AFU. Reuse the code defined in afu_cr_read8|16|32() when reading the configuration space of the AFU device. Even though the

[PATCH v3 18/18] cxl: Add tracepoints around the CAPI hcall

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard To ease debugging, add a few tracepoints around the CAPI hcalls. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard

[PATCH v3 12/18] cxl: Add guest-specific code

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard The new of.c file contains code to parse the device tree to find out about CAPI adapters and AFUs. guest.c implements the guest-specific callbacks for the backend API. The process element ID is not known until the context is attached, so we

[PATCH v3 00/18] cxl: Add support for powerVM guest​

2016-02-06 Thread Frederic Barrat
This series adds support for a CAPI card in a powerVM guest. It requires firmware FW840 and an activation code for CAPI. Note that pHyp only claims support for cxlflash, and not generic support for FPGA CAPI accelerators. cxlflash uses the (slightly modified) Nallatech card, so the memcopy AFU

[PATCH v3 14/18] cxl: Support to flash a new image on the adapter from a guest

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard The new flash.c file contains the logic to flash a new image on the adapter, through a hcall. It is an iterative process, with chunks of data of 1M at a time. There are also 2 phases: write and verify. The flash operation itself is driven

Re: [PATCH v7 04/10] ppc64 ftrace_with_regs configuration variables

2016-02-06 Thread Torsten Duwe
On Fri, Feb 05, 2016 at 05:18:34PM +0100, Petr Mladek wrote: [...] > more complicated. Whem I think about it, the change below does similar > job and looks more strightforwad: Had I only looked closer. That's exactly how I thought it would work in the first place. I'd call that a fix. Full ACK

[PATCH v3 11/18] cxl: Separate bare-metal fields in adapter and AFU data structures

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard Introduce sub-structures containing the bare-metal specific fields in the structures describing the adapter (struct cxl) and AFU (struct cxl_afu). Update all their references. Co-authored-by: Frederic Barrat

[PATCH v3 13/18] cxl: sysfs support for guests

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard Filter out a few adapter parameters which don't make sense in a guest. Document the changes. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe

[PATCH v3 03/18] cxl: Define process problem state area at attach time only

2016-02-06 Thread Frederic Barrat
Cxl kernel API was defining the process problem state area during context initialization, making it possible to map the problem state area before attaching the context. This won't work on a powerVM guest. So do the logical thing, like in userspace: attach first, then map the problem state area.

[PATCH v3 01/18] cxl: Move common code away from bare-metal-specific files

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard Move around some functions which will be accessed from the bare-metal and guest environments. Code in native.c and pci.c is meant to be bare-metal specific. Other files contain code which may be shared with guests. Co-authored-by: Frederic

[PATCH v3 02/18] cxl: Move bare-metal specific code to specialized files

2016-02-06 Thread Frederic Barrat
Move a few functions around to better separate code specific to bare-metal environment from code which will be commonly used between guest and bare-metal. Code specific to bare-metal is meant to be in native.c or pci.c only. It's basically anything which touches the capi p1 registers, some p2

[PATCH v3 17/18] cxl: Adapter failure handling

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard Check the AFU state whenever an API is called. The hypervisor may issue a reset of the adapter when it detects a fault. When it happens, it launches an error recovery which will either move the AFU to a permanent failure state, or in the

[PATCH v3 15/18] cxl: Parse device tree and create CAPI device(s) at boot

2016-02-06 Thread Frederic Barrat
Add new entry point to scan the device tree at boot in a guest, looking for CAPI devices. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard ---

[PATCH v3 10/18] cxl: New hcalls to support CAPI adapters

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard The hypervisor calls provide an interface with a coherent plaform facility and function. It matches version 0.16 of the 'PAPR changes' document. The following hcalls are supported: H_ATTACH_CA_PROCESSAttach a process element to a

[PATCH v3 05/18] cxl: Rename some bare-metal specific functions

2016-02-06 Thread Frederic Barrat
Rename a few functions, mostly prefixed by 'cxl_', to make clear that the implementation is 'bare-metal' specific. Those functions will have an equivalent implementation for a guest in a later patch. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat

[PATCH v3 08/18] cxl: IRQ allocation for guests

2016-02-06 Thread Frederic Barrat
The PSL interrupt is not going to be multiplexed in a guest, so an interrupt will be allocated for it for each context. It will still be the first interrupt found in the first interrupt range, but is treated almost like any other AFU interrupt when creating/deleting the context. Only the handler