[PATCH v2 10/18] powerpc/vas, nx-842: Define and use chip_to_vas_id()

2017-10-06 Thread Sukadev Bhattiprolu
will be useful if a thread running on one chip wants to open a window on another chip (like the NX-842 driver does during start up). Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/vas.h | 9 + arch/powerpc/platforms/powernv/vas.

[PATCH v2 09/18] powerpc/vas: Create cpu to vas id mapping

2017-10-06 Thread Sukadev Bhattiprolu
Create a cpu to vasid mapping so callers can specify -1 instead of trying to find a VAS id. Changelog[v2] [Michael Ellerman] Use per-cpu variables to simplify code. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/vas.

[PATCH v2 08/18] powerpc/vas: poll for return of window credits

2017-10-06 Thread Sukadev Bhattiprolu
Normally, the NX driver waits for the CRBs to be processed before closing the window. But it is better to ensure that the credits are returned before the window gets reassigned later. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/vas-wi

[PATCH v2 07/18] powerpc/vas: Save configured window credits

2017-10-06 Thread Sukadev Bhattiprolu
Save the configured max window credits for a window in the vas_window structure. We will need this when polling for return of window credits. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/vas-window.c | 6 -- arch/powerpc/platforms/p

[PATCH v2 06/18] powerpc/vas: Reduce polling interval for busy state

2017-10-06 Thread Sukadev Bhattiprolu
A VAS window is normally in "busy" state for only a short duration. Reduce the time we wait for the window to go to "not-busy" state to speed-up vas_win_close() a bit. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms

[PATCH v2 05/18] powerpc/vas: Use helper to unpin/close window

2017-10-06 Thread Sukadev Bhattiprolu
Use a helper to have the hardware unpin and mark a window closed. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/vas-window.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/pla

[PATCH v2 04/18] powerpc/vas: Drop poll_window_cast_out().

2017-10-06 Thread Sukadev Bhattiprolu
Polling for window cast out is listed in the spec, but turns out that it is not strictly necessary and slows down window close. Making it a stub for now. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/vas-window.

[PATCH v2 03/18] powerpc/vas: Cleanup some debug code

2017-10-06 Thread Sukadev Bhattiprolu
Clean up vas.h and the debug code around ifdef vas_debug. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/vas-window.c | 8 +++-- arch/powerpc/platforms/powernv/vas.h| 56 +++-- 2 files changed, 18 inse

[PATCH v2 02/18] powerpc/vas: Validate window credits

2017-10-06 Thread Sukadev Bhattiprolu
NX-842, the only user of VAS, sets the window credits to default values but VAS should check the credits against the possible max values. The VAS_WCREDS_MIN is not needed and can be dropped. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/power

[PATCH v2 01/18] powerpc/vas: init missing fields from [rt]xattr

2017-10-06 Thread Sukadev Bhattiprolu
Initialize a few missing window context fields from the window attributes specified by the caller. These fields are currently set to their default values by the caller (NX-842), but would be good to apply them anyway. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> ---

[PATCH v2 00/18] powerpc/vas: Add support for FTW

2017-10-06 Thread Sukadev Bhattiprolu
for the VAS window contexts. Patches 11-18 add support for user space aka Fast thread-wakeup windows in VAS. These include a patch from Michael Neuling to support emulating the paste instruction. Michael Neuling (1): powerpc: Emulate paste instruction Sukadev Bhattiprolu (17): powerpc/vas: init

[PATCH 10/10] powerpc/vas, nx-842: Define and use chip_to_vas_id()

2017-09-16 Thread Sukadev Bhattiprolu
will be useful if a thread running on one chip wants to open a window on another chip (like the NX-842 driver does during start up). Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/vas.h | 9 + arch/powerpc/platforms/powernv/vas.

[PATCH 08/10] powerpc/vas: poll for return of window credits

2017-09-16 Thread Sukadev Bhattiprolu
Normally, the NX driver waits for the CRBs to be processed before closing the window. But it is better to ensure that the credits are returned before the window gets reassigned later. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/vas-wi

[PATCH 09/10] powerpc/vas: Create cpu to vas id mapping

2017-09-16 Thread Sukadev Bhattiprolu
Create a cpu to vasid mapping so callers can specify -1 instead of trying to find a VAS id. Changelog[v2] [Michael Ellerman] Use per-cpu variables to simplify code. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/vas.

[PATCH 07/10] powerpc/vas: Save configured window credits

2017-09-16 Thread Sukadev Bhattiprolu
Save the configured max window credits for a window in the vas_window structure. We will need this when polling for return of window credits. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/vas-window.c | 6 -- arch/powerpc/platforms/p

[PATCH 06/10] powerpc/vas: Reduce polling interval for busy state

2017-09-16 Thread Sukadev Bhattiprolu
A VAS window is normally in "busy" state for only a short duration. Reduce the time we wait for the window to go to "not-busy" state to speed-up vas_win_close() a bit. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms

[PATCH 05/10] powerpc/vas: Use helper to unpin/close window

2017-09-16 Thread Sukadev Bhattiprolu
Use a helper to have the hardware unpin and mark a window closed. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/vas-window.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/pla

[PATCH 03/10] powerpc/vas: Cleanup some debug code

2017-09-16 Thread Sukadev Bhattiprolu
Cleanuup vas.h and the debug code around ifdef vas_debug. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/vas-window.c | 8 +++-- arch/powerpc/platforms/powernv/vas.h| 56 +++-- 2 files changed, 18 inse

[PATCH 04/10] powerpc/vas: Drop poll_window_cast_out().

2017-09-16 Thread Sukadev Bhattiprolu
Polling for window cast out is listed in the spec, but turns out that it is not strictly necessary and slows down window close. Making it a stub for now. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/vas-window.

[PATCH 02/10] powerpc/vas: Validate window credits

2017-09-16 Thread Sukadev Bhattiprolu
NX-842, the only user of VAS, sets the window credits to default values but VAS should check the credits against the possible max values. The VAS_WCREDS_MIN is not needed and can be dropped. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/power

[PATCH 00/10] powerpc/vas: cleanup and optimizations

2017-09-16 Thread Sukadev Bhattiprolu
Sanitize cpu/chip id to VAS id mapping, improve vas_win_close() performance and add a check for return of credits. Also, fix up couple of initializations/error checks and cleanup some comments and debug code. Sukadev Bhattiprolu (10): powerpc/vas: init missing fields from [rt]xattr powerpc

[PATCH 01/10] powerpc/vas: init missing fields from [rt]xattr

2017-09-16 Thread Sukadev Bhattiprolu
Initialize a few missing window context fields from the window attributes specified by the caller. These fields are currently set to their default values by the caller (NX-842), but would be good to apply them anyway. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> ---

[RFC PATCH v3 1/1] powerpc: Add support for setting SPRN_TIDR

2017-09-06 Thread Sukadev Bhattiprolu
-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> Signed-off-by: Philippe Bergheaud <fe...@linux.vnet.ibm.com> Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com> --- Changelog[v3] - Merge changes with and address comments to Christophe's patch. (i.e d

Re: [PATCH RFC] Interface to set SPRN_TIDR

2017-08-31 Thread Sukadev Bhattiprolu
felix [fe...@linux.vnet.ibm.com] wrote: > On 31/08/2017 01:32, Sukadev Bhattiprolu wrote: > > Michael Neuling [mi...@neuling.org] wrote: > > > Suka, > > > > > > Please CC Christophe who as an alternative way of doing this. We ned to > > > get >

Re: [PATCH RFC] Interface to set SPRN_TIDR

2017-08-30 Thread Sukadev Bhattiprolu
sts.ozlabs.org/pipermail/linuxppc-dev/2017-August/161582.html > > Mikey > > On Tue, 2017-08-29 at 19:38 -0700, Sukadev Bhattiprolu wrote: > > We need the SPRN_TIDR to be set for use with fast thread-wakeup > > (core-to-core wakeup) in VAS. Each user thread that has a receive

[GIT PULL] Please pull JSON files for POWER9 PMU events

2017-08-30 Thread Sukadev Bhattiprolu
://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-08-29 23:13:56 +0200) are available in the git repository at: https://github.com/sukadev/linux/ p9-json-v3 Sukadev Bhattiprolu (1): perf vendor events powerpc: remove duplicate events .../pmu-events/arch/powerpc

[PATCH RFC] Interface to set SPRN_TIDR

2017-08-29 Thread Sukadev Bhattiprolu
the process but for now we use a globally unique thread id as described below. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v2] - Michael Ellerman: Use an interface to assign TIDR so it is assigned to only threads that need it; move assi

Re: [PATCH V3 6/6] crypto/nx: Add P9 NX support for 842 compression engine

2017-08-29 Thread Sukadev Bhattiprolu
Haren Myneni [ha...@linux.vnet.ibm.com] wrote: > > This patch adds P9 NX support for 842 compression engine. Virtual > Accelerator Switchboard (VAS) is used to access 842 engine on P9. > > For each NX engine per chip, setup receive window using > vas_rx_win_open() which configures RxFIFo with

[PATCH v8 08/10] powerpc/vas: Define vas_win_close() interface

2017-08-29 Thread Sukadev Bhattiprolu
-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v8] - [Michael Ellerman] Set task_state() and pass correct values to schedule_timeout(). Changelog[v4]: - Drop the poll for credits return (we can set the required credit, but cannot reall

[PATCH v8 10/10] powerpc/vas: Define copy/paste interfaces

2017-08-29 Thread Sukadev Bhattiprolu
Define interfaces (wrappers) to the 'copy' and 'paste' instructions (which are new in PowerISA 3.0). These are intended to be used to by NX driver(s) to submit Coprocessor Request Blocks (CRBs) to the NX hardware engines. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.

[PATCH v8 09/10] powerpc/vas: Define vas_tx_win_open()

2017-08-29 Thread Sukadev Bhattiprolu
be open in VAS (i.e connected to an NX engine). Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v8]: - [Michael Ellerman] Drop vas_initialized() check; defer code that sets pswid; Changelog[v7]: - Initialize txwin->user_win fiel

[PATCH v8 07/10] powerpc/vas: Define vas_rx_win_open() interface

2017-08-29 Thread Sukadev Bhattiprolu
the window and to open a send window that kernel subsystems can use to access the NX engines. The interface to open a receive window is expected to be invoked for each instance of VAS in the system. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v8]: - [M

[PATCH v8 06/10] powerpc/vas: Define helpers to alloc/free windows

2017-08-29 Thread Sukadev Bhattiprolu
Define helpers to allocate/free VAS window objects. These will be used in follow-on patches when opening/closing windows. Changelog[v8]: - [Michael Ellerman] Make some functions static; retry if ida_get_new() fails with EAGAIN; fix a couple of leak in ids Signed-off-by: Sukadev

[PATCH v8 05/10] powerpc/vas: Define helpers to init window context

2017-08-29 Thread Sukadev Bhattiprolu
Define helpers to initialize window context registers of the VAS hardware. These will be used in follow-on patches when opening/closing VAS windows. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v8]: - Update comments (ISA references and some c

[PATCH v8 04/10] powerpc/vas: Define helpers to access MMIO regions

2017-08-29 Thread Sukadev Bhattiprolu
Define some helper functions to access the MMIO regions. We use these in follow-on patches to read/write VAS hardware registers. They are also used to later issue 'paste' instructions to submit requests to the NX hardware engines. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.

[PATCH v8 02/10] Move GET_FIELD/SET_FIELD to vas.h

2017-08-29 Thread Sukadev Bhattiprolu
-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> Reviewed-by: Dan Streetman <ddstr...@ieee.org> --- Changelog[v7] [Michael Ellerman] Move the macros to rather than to Changelog[v3] - Fix order of parameters in nx-842 driver. --- arch/powerpc

[PATCH v8 03/10] powerpc/vas: Define vas_init() and vas_exit()

2017-08-29 Thread Sukadev Bhattiprolu
. VAS is currently only supported with 64K page size. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v8]: - [Michael Ellerman] VAS should be built-in and not a module; drop the vas_exit() and free_vinst() code sin

[PATCH v8 01/10] powerpc/vas: Define macros, register fields and structures

2017-08-29 Thread Sukadev Bhattiprolu
Define macros for the VAS hardware registers and bit-fields as well as couple of data structures needed by the VAS driver. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v8] - Use u64/u32 instead of the uintXX versions. Changelog[v7]

[PATCH v8 00/10] Enable VAS

2017-08-29 Thread Sukadev Bhattiprolu
tweaks to register field settings to make it easier to add support for user space windows. - Skip writing to read-only registers - Start window indexing from 0 rather than 1 Changelog[v2] - Use vas-id, HVWC, UWC and paste address, entries from device tree rat

Re: [PATCH v7 12/12] powerpc/vas: Define copy/paste interfaces

2017-08-27 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Hi Suka, > > A few more things ... > > Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> writes: > > > diff --git a/arch/powerpc/platforms/powernv/copy-paste.h > > b/arch/powerpc/platforms/powernv/copy-paste.

Re: [PATCH v7 10/12] powerpc/vas: Define vas_win_close() interface

2017-08-27 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Hi Suka, > > More comments :) Thanks! > > Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> writes: > > > diff --git a/arch/powerpc/platforms/powernv/vas-window.c > > b/arch/powerpc/platforms/powernv/vas

Re: [PATCH v7 08/12] powerpc/vas: Define vas_win_id()

2017-08-27 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> writes: > > > Define an interface to return a system-wide unique id for a given VAS > > window. > > > > The vas_win_id() will be used in a follow-on patch to gene

Re: [PATCH v7 06/12] powerpc/vas: Define helpers to alloc/free windows

2017-08-27 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> writes: > > diff --git a/arch/powerpc/platforms/powernv/vas-window.c > > b/arch/powerpc/platforms/powernv/vas-window.c > > + rc = ida_pre_get(ida, G

Re: [PATCH v7 05/12] powerpc/vas: Define helpers to init window context

2017-08-27 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> writes: > > diff --git a/arch/powerpc/platforms/powernv/vas-window.c > > b/arch/powerpc/platforms/powernv/vas-window.c > > index a3a705a..3a50d6a 100644 > > --- a/a

Re: [PATCH v7 04/12] powerpc/vas: Define helpers to access MMIO regions

2017-08-27 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Hi Suka, > > Comments inline. > > Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> writes: > > diff --git a/arch/powerpc/platforms/powernv/vas-window.c > > b/arch/powerpc/platforms/powernv/vas-window.c

Re: [PATCH v7 03/12] powerpc/vas: Define vas_init() and vas_exit()

2017-08-24 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Hi Suka, > > Comments inline ... > > Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> writes: > > diff --git a/Documentation/devicetree/bindings/powerpc/ibm,vas.txt > > b/Documentation/devicetree/bindings/powe

[PATCH v7 12/12] powerpc/vas: Define copy/paste interfaces

2017-08-24 Thread Sukadev Bhattiprolu
Define interfaces (wrappers) to the 'copy' and 'paste' instructions (which are new in PowerISA 3.0). These are intended to be used to by NX driver(s) to submit Coprocessor Request Blocks (CRBs) to the NX hardware engines. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.

[PATCH v7 11/12] powerpc/vas: Define vas_tx_win_open()

2017-08-24 Thread Sukadev Bhattiprolu
be open in VAS (i.e connected to an NX engine). Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v7]: - Initialize txwin->user_win field for FTW windows. Changelog[v6]: - Add support for FTW windows Changelog[v4]: - [Ben Herrenschm

[PATCH v7 10/12] powerpc/vas: Define vas_win_close() interface

2017-08-24 Thread Sukadev Bhattiprolu
-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v4]: - Drop the poll for credits return (we can set the required credit, but cannot really find the available credit at a point in time) - Export the symbol Changelog[v3]: - Fix order of para

[PATCH v7 09/12] powerpc/vas: Define vas_rx_win_open() interface

2017-08-24 Thread Sukadev Bhattiprolu
the window and to open a send window that kernel subsystems can use to access the NX engines. The interface to open a receive window is expected to be invoked for each instance of VAS in the system. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Change

[PATCH v7 08/12] powerpc/vas: Define vas_win_id()

2017-08-24 Thread Sukadev Bhattiprolu
refers to this system-wide unique id as a Partition Send Window ID which is expected to be used during fault handling. Hence the "pswid" in the function names. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/vas.h | 5 +++

[PATCH v7 07/12] powerpc/vas: Define vas_win_paste_addr()

2017-08-24 Thread Sukadev Bhattiprolu
into their address space and then use copy and paste instructions to submit the CRBs to the NX engine. Note that kernel drivers will use vas_paste_crb() directly and don't need this interface. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/include/asm

[PATCH v7 06/12] powerpc/vas: Define helpers to alloc/free windows

2017-08-24 Thread Sukadev Bhattiprolu
Define helpers to allocate/free VAS window objects. These will be used in follow-on patches when opening/closing windows. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/vas-window.c | 70 + 1 file chang

[PATCH v7 05/12] powerpc/vas: Define helpers to init window context

2017-08-24 Thread Sukadev Bhattiprolu
Define helpers to initialize window context registers of the VAS hardware. These will be used in follow-on patches when opening/closing VAS windows. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v6] - Add support for FTW windows and drop the fault win

[PATCH v7 04/12] powerpc/vas: Define helpers to access MMIO regions

2017-08-24 Thread Sukadev Bhattiprolu
Define some helper functions to access the MMIO regions. We use these in follow-on patches to read/write VAS hardware registers. They are also used to later issue 'paste' instructions to submit requests to the NX hardware engines. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.

[PATCH v7 03/12] powerpc/vas: Define vas_init() and vas_exit()

2017-08-24 Thread Sukadev Bhattiprolu
. VAS is currently only supported with 64K page size. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v5]: - [Ben Herrenschmidt]: Create and use platform device tree nodes, fix up the "reg" properties for the VAS DT node and use the

[PATCH v7 02/12] Move GET_FIELD/SET_FIELD to vas.h

2017-08-24 Thread Sukadev Bhattiprolu
-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> Reviewed-by: Dan Streetman <ddstr...@ieee.org> --- Changelog[v7] [Michael Ellerman] Move the macros to rather than to Changelog[v3] - Fix order of parameters in nx-842 driver. --- arch/powerpc

[PATCH v7 01/12] powerpc/vas: Define macros, register fields and structures

2017-08-24 Thread Sukadev Bhattiprolu
Define macros for the VAS hardware registers and bit-fields as well as couple of data structures needed by the VAS driver. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v7] - Move the threshold control macros from uapi/asm/vas.h to asm

[PATCH v7 00/12] Enable VAS

2017-08-24 Thread Sukadev Bhattiprolu
d settings to make it easier to add support for user space windows. - Skip writing to read-only registers - Start window indexing from 0 rather than 1 Changelog[v2] - Use vas-id, HVWC, UWC and paste address, entries from device tree rather than defini

Re: [PATCH v6 01/17] powerpc/vas: Define macros, register fields and structures

2017-08-16 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> writes: > > > Nicholas Piggin [npig...@gmail.com] wrote: > >> On Mon, 14 Aug 2017 15:21:48 +1000 > >> Michael Ellerman <m...@ellerman.id.au> wro

Re: [PATCH v6 14/17] powerpc: Add support for setting SPRN_TIDR

2017-08-14 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> writes: > > > We need the SPRN_TIDR to bet set for use with fast thread-wakeup > > (core-to-core wakeup). Each thread in a process needs to have a > > unique id withi

Re: [PATCH v6 14/17] powerpc: Add support for setting SPRN_TIDR

2017-08-14 Thread Sukadev Bhattiprolu
Benjamin Herrenschmidt [b...@au1.ibm.com] wrote: > On Mon, 2017-08-14 at 17:02 +1000, Michael Neuling wrote: > > > +/* > > > + * We need to assign an unique thread id to each thread in a process. > > > This > > > + * thread id is intended to be used with the Fast Thread-wakeup (aka > > > Core- >

Re: [PATCH v6 01/17] powerpc/vas: Define macros, register fields and structures

2017-08-14 Thread Sukadev Bhattiprolu
Nicholas Piggin [npig...@gmail.com] wrote: > On Mon, 14 Aug 2017 15:21:48 +1000 > Michael Ellerman <m...@ellerman.id.au> wrote: > > > Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> writes: > > > > arch/powerpc/include/asm/vas.h | 35 >

Re: [PATCH] powerpc: xive: ensure active irqd when setting affinity

2017-08-08 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> writes: > > > From fd0abf5c61b6041fdb75296e8580b86dc91d08d6 Mon Sep 17 00:00:00 2001 > > From: Benjamin Herrenschmidt <b...@kernel.crashing.org> > > Date: Tue, 1

[PATCH v6 17/17] powerpc/vas: Document FTW API/usage

2017-08-08 Thread Sukadev Bhattiprolu
; Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Documentation/powerpc/ftw-api.txt | 373 ++ 1 file changed, 373 insertions(+) create mode 100644 Documentation/powerpc/ftw-api.txt diff --git a/Documentation/powerpc/ftw-api.txt b/Documen

[PATCH v6 16/17] powerpc/vas: Implement a simple FTW driver

2017-08-08 Thread Sukadev Bhattiprolu
provides detailed description of the API for the driver. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- MAINTAINERS | 1 + arch/powerpc/platforms/powernv/Kconfig | 16 ++ arch/powerpc/platforms/powernv/Makefile | 1 + arch/powerpc/pla

[PATCH v6 15/17] powerpc/vas: Define window open ioctls API

2017-08-08 Thread Sukadev Bhattiprolu
Define the VAS_TX_WIN_OPEN and VAS_RX_WIN_OPEN ioctl interface. Each user of VAS, like the NX-FTW driver in a follow-on patch, should implement these ioctls. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/include/uapi/asm/vas.

[PATCH v6 14/17] powerpc: Add support for setting SPRN_TIDR

2017-08-08 Thread Sukadev Bhattiprolu
We need the SPRN_TIDR to bet set for use with fast thread-wakeup (core-to-core wakeup). Each thread in a process needs to have a unique id within the process but as explained below, for now, we assign globally unique thread ids to all threads in the system. Signed-off-by: Sukadev Bhattiprolu

[PATCH v6 13/17] powerpc/vas: Define copy/paste interfaces

2017-08-08 Thread Sukadev Bhattiprolu
Define interfaces (wrappers) to the 'copy' and 'paste' instructions (which are new in PowerISA 3.0). These are intended to be used to by NX driver(s) to submit Coprocessor Request Blocks (CRBs) to the NX hardware engines. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.

[PATCH v6 12/17] powerpc/vas: Define vas_tx_win_open()

2017-08-08 Thread Sukadev Bhattiprolu
be open in VAS (i.e connected to an NX engine). Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v6]: - Add support for FTW windows Changelog[v4]: - [Ben Herrenschmidt] MMIO regions must be mapped non-cached and paste regions must be

[PATCH v6 11/17] powerpc/vas: Define vas_win_close() interface

2017-08-08 Thread Sukadev Bhattiprolu
-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v4]: - Drop the poll for credits return (we can set the required credit, but cannot really find the available credit at a point in time) - Export the symbol Changelog[v3]: - Fix order of para

[PATCH v6 10/17] powerpc/vas: Define vas_rx_win_open() interface

2017-08-08 Thread Sukadev Bhattiprolu
the window and to open a send window that kenrel subsystems can use to access the NX engines. The interface to open a receive window is expected to be invoked for each instance of VAS in the system. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v6]: - Add s

[PATCH v6 09/17] powerpc/vas: Define vas_rx_win_open() interface

2017-08-08 Thread Sukadev Bhattiprolu
the window and to open a send window that kenrel subsystems can use to access the NX engines. The interface to open a receive window is expected to be invoked for each instance of VAS in the system. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v6]: - Add s

[PATCH v6 08/17] powerpc/vas: Define vas_win_id()

2017-08-08 Thread Sukadev Bhattiprolu
refers to this system-wide unique id as a Partition Send Window ID which is expected to be used during fault handling. Hence the "pswid" in the function names. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/vas.h | 5 +++

[PATCH v6 07/17] powerpc/vas: Define vas_win_paste_addr()

2017-08-08 Thread Sukadev Bhattiprolu
into their address space and then use copy and paste instructions to submit the CRBs to the NX engine. Note that kernel drivers will use vas_paste_crb() directly and don't need this interface. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/include/asm

[PATCH v6 06/17] powerpc/vas: Define helpers to alloc/free windows

2017-08-08 Thread Sukadev Bhattiprolu
Define helpers to allocate/free VAS window objects. These will be used in follow-on patches when opening/closing windows. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/vas-window.c | 70 + 1 file chang

[PATCH v6 05/17] powerpc/vas: Define helpers to init window context

2017-08-08 Thread Sukadev Bhattiprolu
Define helpers to initialize window context registers of the VAS hardware. These will be used in follow-on patches when opening/closing VAS windows. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v6] - Add support for FTW windows and drop the fault win

[PATCH v6 04/17] powerpc/vas: Define helpers to access MMIO regions

2017-08-08 Thread Sukadev Bhattiprolu
Define some helper functions to access the MMIO regions. We use these in follow-on patches to read/write VAS hardware registers. They are also used to later issue 'paste' instructions to submit requests to the NX hardware engines. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.

[PATCH v6 03/17] powerpc/vas: Define vas_init() and vas_exit()

2017-08-08 Thread Sukadev Bhattiprolu
. VAS is currently only supported with 64K page size. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v5]: - [Ben Herrenschmidt]: Create and use platform device tree nodes, fix up the "reg" properties for the VAS DT node and use the

[PATCH v6 02/17] powerpc/vas: Move GET_FIELD/SET_FIELD to vas.h

2017-08-08 Thread Sukadev Bhattiprolu
-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> Reviewed-by: Dan Streetman <ddstr...@ieee.org> --- Changelog[v3] - Fix order of parameters in nx-842 driver. --- arch/powerpc/include/uapi/asm/vas.h | 8 drivers/crypto/nx/nx-842-powernv.c | 7 --- drivers/

[PATCH v6 01/17] powerpc/vas: Define macros, register fields and structures

2017-08-08 Thread Sukadev Bhattiprolu
Define macros for the VAS hardware registers and bit-fields as well as couple of data structures needed by the VAS driver. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v6] - Add some fields for FTW windows Changelog[v4] - [Michael Neuling

[PATCH v6 00/17] powerpc/vas: Enable VAS

2017-08-08 Thread Sukadev Bhattiprolu
iting to read-only registers - Start window indexing from 0 rather than 1 Changelog[v2] - Use vas-id, HVWC, UWC and paste address, entries from device tree rather than defining/computing them in kernel and reorg code. Sukadev Bhattiprolu (17): powerpc/vas: De

[PATCH] powerpc: xive: ensure active irqd when setting affinity

2017-08-02 Thread Sukadev Bhattiprolu
RQ17: set affinity failed(-6). The underlying problem with taking cpus offline was fixed in 4.13-rc1 by: commit 91f26cb4cd3c ("genirq/cpuhotplug: Do not migrated shutdown irqs") Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt

[GIT PULL] Please pull JSON files for Power9 PMU events

2017-08-02 Thread Sukadev Bhattiprolu
://github.com/sukadev/linux/ p9-json-v2 Sukadev Bhattiprolu (2): perf vendor events powerpc: remove suffix in mapfile perf vendor events powerpc: Update POWER9 events tools/perf/pmu-events/arch/powerpc/mapfile.csv | 20 +- .../perf/pmu-events/arch/powerpc/power9/cache.json | 191

Re: [PATCH V2 0/6] Enable NX 842 compression engine on Power9

2017-07-18 Thread Sukadev Bhattiprolu
Nicholas Piggin [nicholas.pig...@gmail.com] wrote: > On Mon, 17 Jul 2017 16:43:19 -0700 > Haren Myneni wrote: > > > [PATCH V2 0/6] Enable NX 842 compression engine on Power9 > > This patchset depends on VAS kernel changes: > >

Re: [GIT PULL] Please pull JSON files for Power9 PMU events

2017-07-12 Thread Sukadev Bhattiprolu
Arnaldo Carvalho de Melo [a...@kernel.org] wrote: > Em Wed, Jul 12, 2017 at 10:09:12PM +1000, Michael Ellerman escreveu: > > Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> writes: > > > Please pull the JSON files for POWER9 PMU events. > > > > perf

[GIT PULL] Please pull JSON files for Power9 PMU events

2017-07-11 Thread Sukadev Bhattiprolu
/ p9-json for you to fetch changes up to f94a86dbb13e18bd7ad566cabe42df63d3bd1039: perf vendor events: Add POWER9 PVRs to mapfile (2017-07-11 19:30:40 -0500) Sukadev Bhattiprolu (2): perf vendor events: Add POWER9 PMU events

Re: [PATCH 0/8] Support for 24x7 hcall interface version 2

2017-06-13 Thread Sukadev Bhattiprolu
55 > + > arch/powerpc/perf/hv-24x7.h| 70 +++-- > arch/powerpc/platforms/pseries/Kconfig | 2 +- > 3 files changed, 255 insertions(+), 72 deletions(-) Reviewed-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> > > -- > 2.7.4

Re: [PATCH 7/8] powerpc/perf/hv-24x7: Support v2 of the hypervisor API

2017-06-13 Thread Sukadev Bhattiprolu
Thiago Jung Bauermann [bauer...@linux.vnet.ibm.com] wrote: > POWER9 introduces a new version of the hypervisor API to access the 24x7 > perf counters. The new version changed some of the structures used for > requests and results. > > Signed-off-by: Thiago Jung Bauermann

Re: [PATCH v5 09/10] VAS: Define vas_tx_win_open()

2017-06-06 Thread Sukadev Bhattiprolu
Sukadev Bhattiprolu [suka...@linux.vnet.ibm.com] wrote: > +static void *map_paste_region(char *name, uint64_t start, int len) > +{ > + void *map; > + > + if (!request_mem_region(start, len, name)) { > + pr_devel("%s(): request_mem_regi

[PATCH v5 10/10] VAS: Define copy/paste interfaces

2017-05-24 Thread Sukadev Bhattiprolu
Define interfaces (wrappers) to the 'copy' and 'paste' instructions (which are new in PowerISA 3.0). These are intended to be used to by NX driver(s) to submit Coprocessor Request Blocks (CRBs) to the NX hardware engines. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.

[PATCH v5 09/10] VAS: Define vas_tx_win_open()

2017-05-24 Thread Sukadev Bhattiprolu
be open in VAS (i.e connected to an NX engine). Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v5]: - [Ben Herrenschmidt] MMIO regions must be mapped non-cached and paste regions must be mapped cached. Define/use map_paste_region(). Changel

[PATCH v5 08/10] VAS: Define vas_win_close() interface

2017-05-24 Thread Sukadev Bhattiprolu
-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v4]: - Drop the poll for credits return (we can set the required credit, but cannot really find the available credit at a point in time) - Export the symbol Changelog[v3]: - Fix order of para

[PATCH v5 07/10] VAS: Define vas_rx_win_open() interface

2017-05-24 Thread Sukadev Bhattiprolu
the window and to open a send window that kenrel subsystems can use to access the NX engines. The interface to open a receive window is expected to be invoked for each instance of VAS in the system. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v4]: -

[PATCH v5 06/10] VAS: Define helpers to alloc/free windows

2017-05-24 Thread Sukadev Bhattiprolu
Define helpers to allocate/free VAS window objects. These will be used in follow-on patches when opening/closing windows. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/vas-window.c | 61 + 1 file chang

[PATCH v5 05/10] VAS: Define helpers to init window context

2017-05-24 Thread Sukadev Bhattiprolu
Define helpers to initialize window context registers of the VAS hardware. These will be used in follow-on patches when opening/closing VAS windows. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v5] - Fix: Copy the FIFO address into LFIFO_BAR re

[PATCH v5 01/10] VAS: Define macros, register fields and structures

2017-05-24 Thread Sukadev Bhattiprolu
Define macros for the VAS hardware registers and bit-fields as well as couple of data structures needed by the VAS driver. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v4] - [Michael Neuling] Move VAS code to arch/powerpc; Reorg vas.h and

[PATCH v5 03/10] VAS: Define vas_init() and vas_exit()

2017-05-24 Thread Sukadev Bhattiprolu
. VAS is currently only supported with 64K page size. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- Changelog[v5]: - [Ben Herrenschmidt]: Create and use platform device tree nodes, fix up the "reg" properties for the VAS DT node and use the

[PATCH v5 04/10] VAS: Define helpers for access MMIO regions

2017-05-24 Thread Sukadev Bhattiprolu
Define some helper functions to access the MMIO regions. We use these in a follow-on patches to read/write VAS hardware registers. These helpers are also used to later issue 'paste' instructions to submit requests to the NX hardware engines. Signed-off-by: Sukadev Bhattiprolu <s

[PATCH v5 02/10] Move GET_FIELD/SET_FIELD to vas.h

2017-05-24 Thread Sukadev Bhattiprolu
-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> Reviewed-by: Dan Streetman <ddstr...@ieee.org> --- Changelog[v3] - Fix order of parameters in nx-842 driver. --- arch/powerpc/include/uapi/asm/vas.h | 8 drivers/crypto/nx/nx-842-powernv.c | 7 --- drivers/

<    1   2   3   4   5   6   7   8   9   >