Re: [PATCH] ibmvnic: remove excessive irqsave

2021-03-04 Thread Sukadev Bhattiprolu
5413:1-18: > ERROR: nested lock+irqsave that reuses flags from line 5404. > Thanks. Please add Fixes: 4a41c421f367 ("ibmvnic: serialize access to work queue on remove") > Signed-off-by: Junlin Yang Reviewed-by: Sukadev Bhattiprolu

Re: [PATCH] ibmvnic: Fix possibly uninitialized old_num_tx_queues variable warning.

2021-03-02 Thread Sukadev Bhattiprolu
a false positive. However, there is no reason to > not initialize the variables unconditionally avoiding the warning. Yeah, its a false positive, but initializing doesn't hurt. > > Fixes: 635e442f4a48 ("ibmvnic: merge ibmvnic_reset_init and ibmvnic_init") > Signed-off-by: Michal Suchanek Reviewed-by: Sukadev Bhattiprolu

Re: linux-next: manual merge of the net-next tree with the net tree

2021-02-18 Thread Sukadev Bhattiprolu
Stephen Rothwell [s...@canb.auug.org.au] wrote: > Hi all, > > Today's linux-next merge of the net-next tree got conflicts in: > > drivers/net/ethernet/ibm/ibmvnic.c > drivers/net/ethernet/ibm/ibmvnic.h > > between commit: > > 4a41c421f367 ("ibmvnic: serialize access to work queue on remov

Re: [PATCH v2 3/7] powerpc: use task_pid_nr() for TID allocation

2018-04-24 Thread Sukadev Bhattiprolu
Andrew Donnellan [andrew.donnel...@au1.ibm.com] wrote: > [+ Sukadev, Christophe] > > On 18/04/18 11:08, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > The current implementation of TID allocation, using a global IDR, may > > result in an errant process starving the system of availabl

[tip:perf/core] perf vendor events: Update POWER9 events

2018-03-19 Thread tip-bot for Sukadev Bhattiprolu
Commit-ID: 9749adc3b2a23c91b2eda8758ff0c650d731aa2f Gitweb: https://git.kernel.org/tip/9749adc3b2a23c91b2eda8758ff0c650d731aa2f Author: Sukadev Bhattiprolu AuthorDate: Tue, 13 Mar 2018 12:33:29 -0500 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 16 Mar 2018 13:57:08 -0300 perf

Re: [PATCH] perf vendor events: fix processing for xfs

2018-03-14 Thread Sukadev Bhattiprolu
esult > in a broken pmu_events.c being generated. I run into the problem on a 4.15-based kernel/xfs but not on a 3.10-based kernel! Have not investigated, but this fix is good. > > Fix this by adding the appropriate check in is_leaf_dir(). > > Cc: Sukadev Bhattiprolu > Signed-

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

2018-03-13 Thread Sukadev Bhattiprolu
://github.com/sukadev/linux/ p9-json-v5 for you to fetch changes up to 99c9dff949f2502964005f9afa8d60c89b446f2c: perf vendor events: Update POWER9 events (2018-03-13 16:48:12 -0500) Sukadev Bhattiprolu (1): perf vendor events

Re: perf-core build fails on powerpc

2018-03-13 Thread Sukadev Bhattiprolu
John Garry [john.ga...@huawei.com] wrote: > On 13/03/2018 20:10, Sukadev Bhattiprolu wrote: > > > Hi John, > > > > I have an xfs file system which seems to have d_type == DT_UNKNOWN for all > > entries in 'tools/perf/pmu-events/arch/power8'! readdir(3) s

Re: perf-core build fails on powerpc

2018-03-13 Thread Sukadev Bhattiprolu
John Garry [john.ga...@huawei.com] wrote: > On 13/03/2018 19:17, Sukadev Bhattiprolu wrote: > > > > > > Building perf on Powerpc seems broken when using Arnaldo's perf/core branch > > with HEAD as: > > > > 1b442ed ("perf test: Fix exit code

perf-core build fails on powerpc

2018-03-13 Thread Sukadev Bhattiprolu
Building perf on Powerpc seems broken when using Arnaldo's perf/core branch with HEAD as: 1b442ed ("perf test: Fix exit code for record+probe_libc_inet_pton.sh") It maybe related to this commit: commit d596299 Author: John Garry Date: Thu Mar 8 18:58:29 2018 +080

[PATCH] Fix cleanup when VAS is not configured

2018-02-13 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu Date: Fri, 9 Feb 2018 11:49:06 -0600 Subject: [PATCH 1/1] powerpc/vas: Fix cleanup when VAS is not configured When VAS is not configured, unregister the platform driver. Also simplify cleanup by delaying vas debugfs init until we know VAS is configured. Signed-off-by

Re: [PATCH 2/4] powerpc/vas: Fix cleanup when VAS is not configured

2018-02-12 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Sukadev Bhattiprolu writes: > > > When VAS is not configured in the system, make sure to remove > > the VAS debugfs directory and unregister the platform driver. > > > > Signed-off-by: Sukadev Bhattiprolu >

[PATCH 2/4] powerpc/vas: Fix cleanup when VAS is not configured

2018-02-09 Thread Sukadev Bhattiprolu
When VAS is not configured in the system, make sure to remove the VAS debugfs directory and unregister the platform driver. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas-debug.c | 5 + arch/powerpc/platforms/powernv/vas.c | 5 - arch/powerpc/platforms

[PATCH 4/4] powerpc/vas: Add a couple of trace points

2018-02-09 Thread Sukadev Bhattiprolu
Add a couple of trace points in the VAS driver Signed-off-by: Sukadev Bhattiprolu --- Changelog [v2] - Make TRACE_INCLUDE_PATH relative to --- arch/powerpc/platforms/powernv/vas-trace.h | 112 arch/powerpc/platforms/powernv/vas-window.c | 9 +++ 2 files

[PATCH RESEND 3/4] powerpc/vas: Remove a stray line in Makefile

2018-02-09 Thread Sukadev Bhattiprolu
Remove a bogus line from arch/powerpc/platforms/powernv/Makefile that was added by commit ece4e51 ("powerpc/vas: Export HVWC to debugfs"). Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc

[PATCH RESEND 1/4] powerpc/vas: Fix order of cleanup in debugfs dir

2018-02-09 Thread Sukadev Bhattiprolu
Fix the order of cleanup to ensure we free the name buffer in case of an error creating 'hvwc' or 'info' files. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas-debug.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ar

Re: [PATCH 5/5] powerpc/ftw: Document FTW API/usage

2018-01-24 Thread Sukadev Bhattiprolu
Randy Dunlap [rdun...@infradead.org] wrote: > > +struct ftw_setup_attr ftwattr; > > + > > +fd = open("/dev/ftw", O_RDWR); > > + > > +memset(&rxattr, 0, sizeof(rxattr)); > > Is that supposed to be ftwattr (2x above)? Yes. I agree with your other comments as well and will s

Re: [PATCH 3/5] powerpc/ftw: Implement a simple FTW driver

2018-01-18 Thread Sukadev Bhattiprolu
; + break; > > + } > > return -EINVAL; > > +} > > Do you expect to implement more ioctls? If not, just change the switch to > an if (). Maybe a couple more but changed it to an 'if' for now (and fixed an error handling issue in ftw_file_init()

Re: [PATCH 2/5] powerpc/ftw: Define FTW_SETUP ioctl API

2018-01-18 Thread Sukadev Bhattiprolu
file. Ok. Here is the updated patch. Thanks for the review. Sukadev --- >From 1f347c199a0b1bbc528705c8e9ddd11c825a80fc Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu Date: Thu, 2 Feb 2017 06:20:07 -0500 Subject: [PATCH 2/5] powerpc/ftw: Define FTW_SETUP ioctl API Define the FTW_SETUP ioc

Re: [PATCH 1/2] powerpc: export thread-tidr interfaces

2018-01-17 Thread Sukadev Bhattiprolu
reference counter. Yes the FTW driver avoids calling clear_thread_tidr() for the same reasons. I don't have a strong case for exporting clear_thread_tidr(). Here is the updated patch, exporting just the set_thread_tidr(). Thanks, Sukadev --- >From 204ee3c918f8dad46c1e40d2d3730b07c10a87a3 Mon

[PATCH 1/5] powerpc/vas: Remove a stray line in Makefile

2018-01-16 Thread Sukadev Bhattiprolu
Remove a bogus line from arch/powerpc/platforms/powernv/Makefile that was added by commit ece4e51 ("powerpc/vas: Export HVWC to debugfs"). Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc

[PATCH 3/5] powerpc/ftw: Implement a simple FTW driver

2018-01-16 Thread Sukadev Bhattiprolu
/wake up. PATCH 5/5 documents the API and includes an example of the usage. Signed-off-by: Sukadev Bhattiprolu --- Changelog[v2] - [Michael Neuling] Rename from drop "nx" from name "nx-ftw". - [Michael Neuling] Use a single VAS_FTW_SETUP ioctl to simplify in

[PATCH 4/5] powerpc/ftw: Add a couple of trace points

2018-01-16 Thread Sukadev Bhattiprolu
Add a couple of trace points in the FTW driver Signed-off-by: Sukadev Bhattiprolu --- drivers/misc/ftw/ftw-trace.h | 75 drivers/misc/ftw/ftw.c | 6 2 files changed, 81 insertions(+) create mode 100644 drivers/misc/ftw/ftw-trace.h diff

[PATCH 5/5] powerpc/ftw: Document FTW API/usage

2018-01-16 Thread Sukadev Bhattiprolu
Document the usage of the VAS Fast thread-wakeup API and add an entry in MAINTAINERS file. Thanks for input/comments from Benjamin Herrenschmidt, Michael Neuling, Michael Ellerman, Robert Blackmore, Ian Munsie, Haren Myneni and Paul Mackerras. Signed-off-by: Sukadev Bhattiprolu --- Changelog

[PATCH 2/5] powerpc/ftw: Define FTW_SETUP ioctl API

2018-01-16 Thread Sukadev Bhattiprolu
Define the FTW_SETUP ioctl interface for fast thread wakeup (FTW). A follow-on patch will implement the FTW driver and ioctl. Thanks to input from Ben Herrenschmidt, Michael Neuling, Michael Ellerman. Signed-off-by: Sukadev Bhattiprolu --- Changelog[v2] - [Michael Neuling] Use a single

[PATCH 0/5] Implement FTW driver

2018-01-16 Thread Sukadev Bhattiprolu
https://github.com/sukadev/linux/tree/ftw-next Thanks to input from Ben Herrenschmidt, Michael Ellerman, Michael Neuling and Robert Blackmore. Sukadev Bhattiprolu (5): powerpc/vas: Remove a stray line in Makefile powerpc/ftw: Define FTW_SETUP ioctl API powerpc/ftw: Implement a si

[PATCH 1/1] powerpc/vas: Add a couple of trace points

2018-01-16 Thread Sukadev Bhattiprolu
Add a couple of trace points in the VAS driver. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas-trace.h | 112 arch/powerpc/platforms/powernv/vas-window.c | 9 +++ 2 files changed, 121 insertions(+) create mode 100644 arch/powerpc

[PATCH 2/2] powerpc: export set_thread_uses_vas()

2018-01-16 Thread Sukadev Bhattiprolu
Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/kernel/process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index f20c1ad..d22055b 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -1475,6

[PATCH 1/2] powerpc: export thread-tidr interfaces

2018-01-16 Thread Sukadev Bhattiprolu
Export set_thread_tidr() and clear_thread_tidr() interfaces so they can be used by external modules. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/kernel/process.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index

[PATCH 1/1] powerpc: Emulate paste instruction

2017-12-19 Thread Sukadev Bhattiprolu
occur. Signed-off-by: Michael Neuling Signed-off-by: Sukadev Bhattiprolu --- Changelog[v4]: - We need to disable pagefaults after all when modifying the thread reconfig registers. Use a mutex, rather than a spinlock around the thread reconfig registers. Acquire the

[PATCH 1/1] vas: vas_window_init_dbgdir: fix order of cleanup.

2017-12-19 Thread Sukadev Bhattiprolu
Fix the order of cleanup to ensure we free the name buffer in case of an error creating 'hvwc' or 'info' files. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas-debug.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ar

[PATCH 1/1]: powerpc: block interrupts when updating TIDR

2017-12-01 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu Date: Tue, 28 Nov 2017 13:39:43 -0600 Subject: [PATCH 1/1]: powerpc: block interrupts when updating TIDR clear_thread_tidr() is called in interrupt context as a part of delayed put of the task structure (i.e as a part of timer interrupt). To prevent a deadlock, block

[PATCH] powerpc/vas, export chip_to_vas_id()

2017-11-20 Thread Sukadev Bhattiprolu
>From 958f8db089f4b89407fc4b89bccd3eaef585aa96 Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu Date: Mon, 20 Nov 2017 12:53:15 -0600 Subject: [PATCH 1/1] powerpc/vas, export chip_to_vas_id() Export the symbol chip_to_vas_id() to fix a build failure when CONFIG_CRYPTO_DEV_NX_COMPRESS_POWERN

[tip:perf/core] perf vendor events powerpc: Update POWER9 events

2017-11-18 Thread tip-bot for Sukadev Bhattiprolu
Commit-ID: e795dd42b716ff36ebaa5384fd1be8458d6c9c34 Gitweb: https://git.kernel.org/tip/e795dd42b716ff36ebaa5384fd1be8458d6c9c34 Author: Sukadev Bhattiprolu AuthorDate: Wed, 8 Nov 2017 18:42:03 -0500 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 16 Nov 2017 14:49:54 -0300 perf

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

2017-11-08 Thread Sukadev Bhattiprolu
://github.com/sukadev/linux p9-json-v4 for you to fetch changes up to 4afb062d7d306bf56dbae9b5291e3515ccfede4c: perf vendor events powerpc: Update POWER9 events (2017-11-08 18:42:03 -0500) Sukadev Bhattiprolu (1): perf vendor

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

2017-11-07 Thread Sukadev Bhattiprolu
Clean up vas.h and the debug code around ifdef vas_debug. Signed-off-by: Sukadev Bhattiprolu --- Changelog[v3] - Minor tweak to a debug message --- arch/powerpc/platforms/powernv/vas-window.c | 8 +++-- arch/powerpc/platforms/powernv/vas.h| 54 ++--- 2

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

2017-11-07 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 --- arch/powerpc/platforms/powernv/vas-window.c | 45

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

2017-11-07 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 --- arch/powerpc/platforms/powernv/vas-window.c | 34 ++--- 1 file changed, 17

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

2017-11-07 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 --- arch/powerpc/platforms/powernv/vas-window.c | 6 -- arch/powerpc/platforms/powernv/vas.h| 1 + 2 files

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

2017-11-07 Thread Sukadev Bhattiprolu
Use a helper to have the hardware unpin and mark a window closed. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas-window.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/platforms/powernv/vas-window.c b/arch

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

2017-11-07 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 --- arch/powerpc/platforms/powernv/vas.c | 14 +- 1 file changed, 13

[PATCH v3 12/18] powerpc: have copy depend on CONFIG_BOOK3S_64

2017-11-07 Thread Sukadev Bhattiprolu
Have the COPY/PASTE instructions depend on CONFIG_BOOK3S_64 rather than CONFIG_PPC_STD_MMU_64. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/kernel/process.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel

[PATCH v3 11/18] powerpc/vas: Export HVWC to debugfs

2017-11-07 Thread Sukadev Bhattiprolu
nly relevant to a receive window so we were not setting it for a send window (which is is paired to a receive window anyway). But to simplify reporting in debugfs, set the 'cop' field for the send window also. Signed-off-by: Sukadev Bhattiprolu --- Changelog[v3]: - [Michael Ellerman]

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

2017-11-07 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 --- arch/powerpc/platforms/powernv/vas-window.c | 10 ++---

[PATCH v3 14/18] powerpc: Define set_thread_uses_vas()

2017-11-07 Thread Sukadev Bhattiprolu
as(), that VAS can use to indicate that the current process opened a send window. During context switch, issue CP_ABORT only for processes that have the flag set. Thanks for input from Nick Piggin, Michael Ellerman. Cc: Nicholas Piggin Signed-off-by: Sukadev Bhattiprolu --- Changelog[v3]:

[PATCH v3 17/18] powerpc/vas: Define vas_win_id()

2017-11-07 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 --- arch/powerpc/include/asm/vas.h | 5 + arch/powerpc/platforms/powernv/va

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

2017-11-07 Thread Sukadev Bhattiprolu
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 --- arch/powerpc/include/asm/vas.h | 9 + arch/powerpc/platforms/powernv/vas.c | 11 +++ drivers/crypto/nx/nx-842

[PATCH v3 15/18] powerpc: Emulate paste instruction

2017-11-07 Thread Sukadev Bhattiprolu
occur. Cc: Aneesh Kumar K.V Signed-off-by: Michael Neuling Signed-off-by: Sukadev Bhattiprolu --- Changlog[v3]: - [Michael Ellerman] We don't need to disable/enable pagefaults when emulating paste; - [Michael Ellerman, Aneesh Kumar] Fix retval from emulate_paste(

[PATCH v3 13/18] powerpc: Add support for setting SPRN_TIDR

2017-11-07 Thread Sukadev Bhattiprolu
: Sukadev Bhattiprolu Signed-off-by: Philippe Bergheaud Signed-off-by: Christophe Lombard --- Changelog[v3] - Merge changes with and address comments to Christophe's patch. (i.e drop CONFIG_PPC_VAS; use CONFIG_PPC64; check CPU_ARCH_300 before setting TIDR). Defer foll

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

2017-11-07 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 --- arch/powerpc/platforms/powernv/vas-window.c | 6 ++ arch

[PATCH v3 16/18] powerpc/vas: Define vas_win_paste_addr()

2017-11-07 Thread Sukadev Bhattiprolu
te address 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 --- arch/powerpc/include/asm/vas.h | 7 +

[PATCH v3 18/18] powerpc/vas: Add support for user receive window

2017-11-07 Thread Sukadev Bhattiprolu
Add support for user space receive window (for the Fast thread-wakeup coprocessor type) Signed-off-by: Sukadev Bhattiprolu --- Changelog[v3] - [Nick Piggin] Drop CP_ABORT since set_thread_uses_vas() does that now (in earlier patch) and add a check for return value. --- arch

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

2017-11-07 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 --- arch/powerpc/platforms/powernv/vas

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

2017-11-07 Thread Sukadev Bhattiprolu
ng (1): powerpc: Emulate paste instruction Sukadev Bhattiprolu (17): powerpc/vas: init missing fields from [rt]xattr powerpc/vas: Validate window credits powerpc/vas: Cleanup some debug code powerpc/vas: Drop poll_window_cast_out(). powerpc/vas: Use helper to unpin/close window powerpc/vas: R

[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 --- arch/powerpc/platforms/powernv/vas-window.c | 6 ++ arch

[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 --- arch/powerpc/platforms/powernv/vas

[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 --- arch/powerpc/platforms/powernv/vas-window.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/platforms/powernv/vas-window.c b/arch

[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 --- arch/powerpc/platforms/powernv/vas-window.c | 10 ++---

[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 --- arch/powerpc/platforms/powernv/vas-window.c | 6 -- arch/powerpc/platforms/powernv/vas.h| 1 + 2 files

[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 --- arch/powerpc/platforms/powernv/vas.c | 14 +- 1 file changed, 13

[PATCH v2 11/18] powerpc/vas: Export HVWC to debugfs

2017-10-06 Thread Sukadev Bhattiprolu
nly relevant to a receive window so we were not setting it for a send window (which is is paired to a receive window anyway). But to simplify reporting in debugfs, set the 'cop' field for the send window also. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/Makef

[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 --- arch/powerpc/platforms/powernv/vas-window.c | 45

[PATCH v2 12/18] powerpc: have copy depend on CONFIG_BOOK3S_64

2017-10-06 Thread Sukadev Bhattiprolu
Have the COPY/PASTE instructions depend on CONFIG_BOOK3S_64 rather than CONFIG_PPC_STD_MMU_64. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/kernel/process.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel

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

2017-10-06 Thread Sukadev Bhattiprolu
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 --- arch/powerpc/include/asm/vas.h | 9 + arch/powerpc/platforms/powernv/vas.c | 11 +++ drivers/crypto/nx/nx-842

[PATCH v2 13/18] powerpc: Add support for setting SPRN_TIDR

2017-10-06 Thread Sukadev Bhattiprolu
: Sukadev Bhattiprolu Signed-off-by: Philippe Bergheaud Signed-off-by: Christophe Lombard --- Changelog[v3] - Merge changes with and address comments to Christophe's patch. (i.e drop CONFIG_PPC_VAS; use CONFIG_PPC64; check CPU_ARCH_300 before setting TIDR). Defer foll

[PATCH v2 17/18] powerpc/vas: Define vas_win_id()

2017-10-06 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 --- arch/powerpc/include/asm/vas.h | 5 + arch/powerpc/platforms/powernv/va

[PATCH v2 18/18] powerpc/vas: Add support for user receive window

2017-10-06 Thread Sukadev Bhattiprolu
Add support for user space receive window (for the Fast thread-wakeup coprocessor type) Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas-window.c | 59 + 1 file changed, 52 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/platforms

[PATCH v2 14/18] powerpc: Define set_thread_used_vas()

2017-10-06 Thread Sukadev Bhattiprolu
as(), that VAS can use to indicate that the current process opened a send window. During context switch, issue CP_ABORT only for processes that have the flag set. Thanks for input from Nick Piggin, Michael Ellerman. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/include/asm/processor.h |

[PATCH v2 16/18] powerpc/vas: Define vas_win_paste_addr()

2017-10-06 Thread Sukadev Bhattiprolu
te address 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 --- arch/powerpc/include/asm/vas.h | 7 +

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

2017-10-06 Thread Sukadev Bhattiprolu
r 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:

[PATCH v2 15/18] powerpc: Emulate paste instruction

2017-10-06 Thread Sukadev Bhattiprolu
occur. Signed-off-by: Michael Neuling Signed-off-by: Sukadev Bhattiprolu --- Edit by Sukadev: Use PPC_PASTE() rather than the paste instruction since in older versions the instruction required a third parameter. --- arch/powerpc/include/asm/emulated_ops.h | 1 + arch/powerpc/include/as

[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 --- arch/powerpc/platforms/powernv/vas-window.c | 34 ++--- 1 file changed, 17

[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 --- arch/powerpc/platforms/powernv/vas-window.c | 8 +++-- arch/powerpc/platforms/powernv/vas.h| 56 +++-- 2 files changed, 18 insertions(+), 46 deletions(-) diff --git

[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 --- arch/powerpc/platforms/powernv/vas-window.c | 10 ++---

[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 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 --- arch/powerpc/platforms/powernv/vas-window.c | 6 ++ arch

[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 --- arch/powerpc/platforms/powernv/vas-window.c | 6 -- arch/powerpc/platforms/powernv/vas.h| 1 + 2 files

[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 --- arch/powerpc/platforms/powernv/vas-window.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/platforms/powernv/vas-window.c b/arch

[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 --- arch/powerpc/platforms/powernv/vas-window.c | 8 +++-- arch/powerpc/platforms/powernv/vas.h| 56 +++-- 2 files changed, 18 insertions(+), 46 deletions(-) diff --git

[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 --- arch/powerpc/platforms/powernv/vas.c | 14 +- 1 file changed, 13

[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 --- arch/powerpc/platforms/powernv/vas-window.c | 45

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

2017-09-16 Thread Sukadev Bhattiprolu
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 --- arch/powerpc/include/asm/vas.h | 9 + arch/powerpc/platforms/powernv/vas.c | 11 +++ drivers/crypto/nx/nx

[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 --- arch/powerpc/platforms/powernv/vas-window.c | 34 ++--- 1 file changed, 17

[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 --- arch/powerpc/platforms/powernv/vas

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

2017-09-06 Thread Sukadev Bhattiprolu
: Sukadev Bhattiprolu Signed-off-by: Philippe Bergheaud Signed-off-by: Christophe Lombard --- Changelog[v3] - Merge changes with and address comments to Christophe's patch. (i.e drop CONFIG_PPC_VAS; use CONFIG_PPC64; check CPU_ARCH_300 before setting TIDR). Defer foll

[tip:perf/urgent] perf vendor events powerpc: Remove duplicate events

2017-09-04 Thread tip-bot for Sukadev Bhattiprolu
Commit-ID: 2a118e1bd22cad57318520d37e3a184b8846c6a2 Gitweb: http://git.kernel.org/tip/2a118e1bd22cad57318520d37e3a184b8846c6a2 Author: Sukadev Bhattiprolu AuthorDate: Wed, 30 Aug 2017 21:42:23 -0400 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 1 Sep 2017 14:46:00 -0300 perf

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

2017-08-30 Thread Sukadev Bhattiprolu
7; of git://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/ar

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

2017-08-28 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 --- Changelog[v8] - Use u64/u32 instead of the uintXX versions. Changelog[v7] - Move the threshold control macros from

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

2017-08-28 Thread Sukadev Bhattiprolu
. VAS is currently only supported with 64K page size. Signed-off-by: Sukadev Bhattiprolu --- Changelog[v8]: - [Michael Ellerman] VAS should be built-in and not a module; drop the vas_exit() and free_vinst() code since its not a module and might need some

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

2017-08-28 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 --- Changelog[v8]

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

2017-08-28 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 --- Changelog[v8]: - Update comments (ISA references and some cleanup) - Use 0 or 1 when setting

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

2017-08-28 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 --- Cha

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

2017-08-28 Thread Sukadev Bhattiprolu
-off-by: Sukadev Bhattiprolu Reviewed-by: Dan Streetman --- Changelog[v7] [Michael Ellerman] Move the macros to rather than to Changelog[v3] - Fix order of parameters in nx-842 driver. --- arch/powerpc/include/asm/vas.h | 8 drivers/crypto/nx/nx-842

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

2017-08-28 Thread Sukadev Bhattiprolu
-by: Sukadev Bhattiprolu --- 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 really find the available credit at a

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

2017-08-28 Thread Sukadev Bhattiprolu
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 --- Changelog[v8]: - [Michael Ellerman] Drop vas_initialized

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

2017-08-28 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 00/10] Enable VAS

2017-08-28 Thread Sukadev Bhattiprolu
- Minor reorgs and 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 devic

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

2017-08-28 Thread Sukadev Bhattiprolu
be open in VAS (i.e connected to an NX engine). Signed-off-by: Sukadev Bhattiprolu --- Changelog[v8]: - [Michael Ellerman] Drop vas_initialized() check; defer code that sets pswid; Changelog[v7]: - Initialize txwin->user_win field for FTW windows. Changelog

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 writes: > > > diff --git a/arch/powerpc/platforms/powernv/copy-paste.h > > b/arch/powerpc/platforms/powernv/copy-paste.h > > new file mode 100644 >

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 writes: > > > diff --git a/arch/powerpc/platforms/powernv/vas-window.c > > b/arch/powerpc/platforms/powernv/vas-window.c > > index 2dd4b63..2

  1   2   3   4   5   6   7   8   9   >