On 06/01/2018 12:41 AM, Stewart Smith wrote:
> Haren Myneni writes:
>> NX increments readOffset by FIFO size in receive FIFO control register
>> when CRB is read. But the index in RxFIFO has to match with the
>> corresponding entry in FIFO maintained by VAS in kernel
NX can set 3rd bit in CR register for XER[SO] (Summation overflow)
which is not used for paste return value. So. mask this bit to get
proper return status.
Signed-off-by: Haren Myneni <ha...@us.ibm.com>
diff --git a/arch/powerpc/platforms/powernv/copy-paste.h
b/arch/powerpc/pla
and normal FIFOs.
Signed-off-by: Haren Myneni <ha...@us.ibm.com>
diff --git a/arch/powerpc/include/asm/opal-api.h
b/arch/powerpc/include/asm/opal-api.h
index d886a5b..ff61e4b 100644
--- a/arch/powerpc/include/asm/opal-api.h
+++ b/arch/powerpc/include/asm/opal-api.h
@@ -206,7 +206,8 @@
#
;
> So, it looks like there could be a problem in the error path, plausibly
> fixed by this patch:
>
> commit 656ecc16e8fc2ab44b3d70e3fcc197a7020d0ca5
> Author: Haren Myneni
> Date: Wed Jun 13 00:32:40 2018 -0700
>
> crypto/nx: Initialize 842 high and nor
System gets checkstop if RxFIFO overruns with more requests than the
maximum possible number of CRBs in FIFO at the same time. So find max
CRBs from FIFO size and set it to receive window credits.
CC: sta...@vger.kernel.org # v4.14+
Signed-off-by:Haren Myneni
diff --git
>> [c01c9d98be30] c000b584 ppc_clone+0x8/0xc
>> --- Exception: c00 (System Call) at 7afe9daf87f4
>> SP (7fffca606880) is in userspace
>>
>> So, it looks like there could be a problem in the error path, plausibly
>> fixed by this patch:
>>
>>
On 06/18/2019 05:35 AM, Michael Ellerman wrote:
> Haren Myneni writes:
>>
>> System gets checkstop if RxFIFO overruns with more requests than the
>> maximum possible number of CRBs in FIFO at the same time. So find max
>> CRBs from FIFO size and set it to receive w
System gets checkstop if RxFIFO overruns with more requests than the
maximum possible number of CRBs in FIFO at the same time. The max number
of requests per window is controlled by window credits. So find max
CRBs from FIFO size and set it to receive window credits.
Fixes: b0d6c9bab5e4
Setup fault window for each VAS instance. When NX gets fault on request
buffer, write fault CRBs in the corresponding fault FIFO and then sends
an interrupt to the OS.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/Makefile | 2 +-
arch
System checkstops if RxFIFO overruns with more requests than the
maximum possible number of CRBs allowed in FIFO at any time. So
max credits value (rxattr.wcreds_max) is set and is passed to
vas_rx_win_open() by the the driver.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv
NX expects OS to return credit for send window after processing each
fault. Also credit has to be returned even for fault window.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 10 ++
arch/powerpc/platforms/powernv/vas
NX may be processing requests while trying to close window. Wait until
all credits are returned and then free send window from VAS instance.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-window.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch
Read interrupts and vas-port device tree properties per each VAS
instance. NX generates an interrupt when it sees page fault on the
request buffer. Interrupts property is used to setup IRQ for handing
the fault and set port value for each user space send window.
Signed-off-by: Haren Myneni
Dump FIFO entry values if could not find send window and print CRB
for debugging.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 41 ++
1 file changed, 41 insertions(+)
diff --git a/arch/powerpc
s as suggested by Christoph Hellwig
Haren Myneni (13):
powerpc/vas: Describe vas-port and interrupts properties
powerpc/vas: Define nx_fault_stamp in coprocessor_request_block
powerpc/vas: Read interrupts and vas-port device tree properties
powerpc/vas: Setup fault window per VAS instance
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 130 +
1 file changed, 130 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/vas-fault.c
b/arch/powerpc/platforms/powernv/vas-fault.c
index e1e34c6..88a211b 100644
--- a/arch/powerpc
to its parent.
To prevent reusing the pid until the window closed, take reference to
pid and task mm.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-debug.c | 2 +-
arch/powerpc/platforms/powernv/vas-window.c | 44 ++---
arch/powerpc/platforms/powernv
-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 83 +
arch/powerpc/platforms/powernv/vas-window.c | 60 +
arch/powerpc/platforms/powernv/vas.c| 15 +-
arch/powerpc/platforms/powernv/vas.h
For each user space send window, register NX with fault window ID
and port value so that NX paste CRBs in this fault FIFO when it
sees fault on the request buffer.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-window.c | 15
-by: Haren Myneni
---
arch/powerpc/include/asm/icswx.h | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/icswx.h b/arch/powerpc/include/asm/icswx.h
index 9872f85..b233d1e 100644
--- a/arch/powerpc/include/asm/icswx.h
+++ b/arch/powerpc/include
Signed-off-by: Haren Myneni
---
Documentation/devicetree/bindings/powerpc/ibm,vas.txt | 5 +
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/powerpc/ibm,vas.txt
b/Documentation/devicetree/bindings/powerpc/ibm,vas.txt
index bf11d2f..12de08b 100644
Process can not close send window until all requests are processed.
Means wait until window state is not busy and send credits are
returned. Display debug message in case taking longer to close the
window.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-window.c | 26
> > +static void notify_process(pid_t pid, u64 fault_addr)> +{> + int rc;> + struct kernel_siginfo info;> +> + memset(, 0, sizeof(info));> +> + info.si_signo = SIGSEGV;> + info.si_errno = EFAULT;> + info.si_code = SEGV_MAPERR;> +> + info.si_addr = (void *)fault_addr;> + rcu_read_lock();> + rc =
into their address space and then use copy and paste instructions
to submit the CRBs to the NX engine.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/include/asm/vas.h | 5 +
arch/powerpc/platforms/powernv/vas-window.c | 10 ++
2 files
obe()
Signed-off-by: Haren Myneni
---
drivers/crypto/nx/nx-842-powernv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/nx/nx-842-powernv.c
b/drivers/crypto/nx/nx-842-powernv.c
index c037a24..8e63326 100644
--- a/drivers/crypto/nx/nx-842-powernv.c
+++ b/driv
system to make
sure no regression and tested GZIP compression on power9 with tests
available in the above link.
Thanks to Bulent Abali for nxz library and tests development.
Haren Myneni (10):
powerpc/vas: Define vas_win_paste_addr()
powerpc/vas: Initialize window attributes for GZIP
/paste instructions and pasting the CRBs to
the virtual address (aka paste_address) returned by mmap().
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
drivers/crypto/nx/Makefile| 2 +-
drivers/crypto/nx/nx-842-powernv.h| 2 +
drivers/crypto/nx/nx-commom
-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
Documentation/powerpc/index.rst | 1 +
Documentation/powerpc/vas-api.rst | 246
++
2 files changed, 247 insertions(+)
create mode 100644 Documentation/powerpc/vas-api.rst
diff --git
When window is opened, pid reference is taken for user space
windows. Not needed for kernel windows. So remove 'pid' in
vas_tx_win_attr struct.
Signed-off-by: Haren Myneni
---
arch/powerpc/include/asm/vas.h| 1 -
drivers/crypto/nx/nx-commom-powernv.c | 1 -
2 files changed, 2
Initialize send and receive window attributes for GZIP high and
normal priority types.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-window.c | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/vas-window.c
Move common code for 842 and GZIP such as initializtion, read device
tree entries and allocation of receive and send (kernel usage) windows
to nx-common-powernv.c and keep 842 specific code in nx-842-powernv.c
Signed-off-by: Haren Myneni
---
drivers/crypto/nx/Makefile| 2
Define the VAS_TX_WIN_OPEN ioctl interface for NX GZIP access
from user space. This interface is used to open GZIP send window and
mmap region which can be used by userspace to send requests to NX
directly with copy/paste instructions.
Signed-off-by: Haren Myneni
---
Documentation/ioctl/ioctl
Make code generic so that extend it to support new GZIP compression
type. Changed nx842 reference to nx and moved some code to new
functions. The actual functionality is not changed.
Signed-off-by: Haren Myneni
---
drivers/crypto/nx/nx-commom-powernv.c | 160
Changes to probe GZIP device-tree nodes, open RX windows and setup
GZIP compression type. No plans to provide GZIP usage in kernel right
now, but this patch enables GZIP for user space usage.
Signed-off-by: Haren Myneni
---
drivers/crypto/nx/nx-commom-powernv.c | 20 +++-
1
Process can not close send window until all requests are processed.
Means wait until window state is not busy and send credits are
returned. Display debug message in case taking longer to close the
window.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-window.c | 26
NX may be processing requests while trying to close window. Wait until
all credits are returned and then free send window from VAS instance.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-window.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch
Read interrupts and vas-port device tree properties per each VAS
instance. NX generates an interrupt when it sees page fault on the
request buffer. Interrupts property is used to setup IRQ for handing
the fault and set port value for each user space send window.
Signed-off-by: Haren Myneni
-by: Haren Myneni
---
arch/powerpc/include/asm/icswx.h | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/icswx.h b/arch/powerpc/include/asm/icswx.h
index 9872f85..b233d1e 100644
--- a/arch/powerpc/include/asm/icswx.h
+++ b/arch/powerpc/include
Dump FIFO entry values if could not find send window and print CRB
for debugging.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 41 ++
1 file changed, 41 insertions(+)
diff --git a/arch/powerpc
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 121 +
1 file changed, 121 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/vas-fault.c
b/arch/powerpc/platforms/powernv/vas-fault.c
index 57f21ea..45bea15c 100644
--- a/arch/powerpc
Setup fault window for each VAS instance. When NX gets fault on request
buffer, write fault CRBs in the corresponding fault FIFO and then sends
an interrupt to the OS.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/Makefile | 2
Signed-off-by: Haren Myneni
---
Documentation/devicetree/bindings/powerpc/ibm,vas.txt | 5 +
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/powerpc/ibm,vas.txt
b/Documentation/devicetree/bindings/powerpc/ibm,vas.txt
index bf11d2f..12de08b 100644
NX expects OS to return credit for send window after processing each
fault. Also credit has to be returned even for fault window.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 10 ++
arch/powerpc/platforms/powernv/vas
System checkstops if RxFIFO overruns with more requests than the
maximum possible number of CRBs allowed in FIFO at any time. So
max credits value (rxattr.wcreds_max) is set and is passed to
vas_rx_win_open() by the the driver.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv
to its parent.
To prevent reusing the pid until the window closed, take reference to
pid and task mm.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-debug.c | 2 +-
arch/powerpc/platforms/powernv/vas-window.c | 53 ++---
arch/powerpc/platforms/powernv
- Code cleanup as suggested by Christoph Hellwig
Haren Myneni (13):
powerpc/vas: Describe vas-port and interrupts properties
powerpc/vas: Define nx_fault_stamp in coprocessor_request_block
powerpc/vas: Read interrupts and vas-port device tree properties
powerpc/vas: Setup fault window pe
On Thu, 2019-12-12 at 05:02 -0800, Christoph Hellwig wrote:
> > + if (txwin->user_win) {
> > + /*
> > +* Window opened by child thread may not be closed when
> > +* it exits. So take reference to its pid and release it
> > +* when the window is free
For each user space send window, register NX with fault window ID
and port value so that NX paste CRBs in this fault FIFO when it
sees fault on the request buffer.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-window.c | 15
-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 83 +
arch/powerpc/platforms/powernv/vas-window.c | 60 +
arch/powerpc/platforms/powernv/vas.c| 21 +++-
arch/powerpc/platforms/powernv/vas.h
On Mon, 2019-12-09 at 02:38 -0600, Segher Boessenkool wrote:
> Hi!
>
> On Mon, Dec 09, 2019 at 06:37:09AM +0100, Christophe Leroy wrote:
> > What do you mean by NX ?
>
> It is the Power9 "Nest Accelerator". The patch series should ideally
> mention that right at the start, yeah.
Thanks, NX
space requests. No page faults on kernel
request buffer.
Changelog:
V2:
- Use threaded IRQ instead of own kernel thread handler
- Use pswid insted of user space CSB address to find valid CRB
- Removed unused macros and other changes as suggested by Christoph Hellwig
Haren Myneni (
-by: Haren Myneni
---
arch/powerpc/include/asm/icswx.h | 32 +++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/icswx.h b/arch/powerpc/include/asm/icswx.h
index 9872f85..4015ed4 100644
--- a/arch/powerpc/include/asm/icswx.h
+++ b/arch
For each fault CRB, update fault address in CRB (fault_storage_addr)
and translation error status in CSB. If the actual fault is in CSB,
send signal to process with SIGSEGV. Process can send new request by
touching the fault address.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren
System checkstops if RxFIFO overruns with more requests than the
maximum possible number of CRBs allowed in FIFO at any time. So
max credits value (rxattr.wcreds_max) is set and is passed to
vas_rx_win_open() by the the driver.
Signed-off-by:Haren Myneni
---
NX expects OS to return credit for send window after processing each
fault. Also credit has to be returned even for fault window.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 10 ++
arch/powerpc/platforms/powernv/vas
rn credits for send and fault windows after handling
faults.
Patch13: Fix closing send window after all credits are returned. This issue
happens only for user space requests. No page faults on kernel
request buffer.
Haren Myneni (13):
Revert "powerpc/powernv: re
This reverts commit 452d23c0f6bd97f2fd8a9691fee79b76040a0feb.
User space send windows (NX GZIP compression) need vas_win_paste_addr()
to mmap window paste address and vas_win_id() to get window ID when
window address is given.
vas_win_id() is introduced in original commit 61f3cca8cda97
Setup fault window for each VAS instance. When NX gets fault on request
buffer, write fault CRBs in the corresponding fault FIFO and then sends
an interrupt to the OS.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/Makefile | 2
. So for kernel requests, ignore if interrupts property is
not available.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
.../devicetree/bindings/powerpc/ibm,vas.txt| 5 ++
arch/powerpc/platforms/powernv/vas-window.c| 12
arch/powerpc/platforms/powernv
to the parent.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 14 --
arch/powerpc/platforms/powernv/vas-window.c | 6 +-
arch/powerpc/platforms/powernv/vas.h| 6 ++
3 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/arch
Dump FIFO values if could not find send window and print CRB for
debugging.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 40 ++
1 file changed, 40 insertions(+)
diff --git a/arch/powerpc/platforms
NX may be processing requests while trying to close window. Wait until
all credits are returned and then free send window from VAS instance.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-window.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch
Process can not close send window until all requests are processed.
Means wait until window state is not busy and send credits are
returned. Display debug message in case taking longer to close the
window.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-window.c | 26
Fault handler is created as kernel thread for each VAS instance and
invoked whenever NX generates page fault. This thread reads CRBs
from fault FIFO and process them.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 53
-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 84 +
arch/powerpc/platforms/powernv/vas-window.c | 51 ++
arch/powerpc/platforms/powernv/vas.h| 3 ++
3 files changed, 138 insertions(+)
diff
happens only for user space requests. No page faults on kernel
request buffer.
Haren Myneni (14):
powerpc/vas: Describe vas-port and interrupts properties
Revert "powerpc/powernv: remove the unused vas_win_paste_addr and
vas_win_id functions"
powerpc/vas: D
Setup fault window for each VAS instance. When NX gets fault on request
buffer, write fault CRBs in the corresponding fault FIFO and then sends
an interrupt to the OS.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/Makefile | 2
-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 81 +
arch/powerpc/platforms/powernv/vas-window.c | 51 ++
arch/powerpc/platforms/powernv/vas.h| 3 ++
3 files changed, 135 insertions(+)
diff
NX expects OS to return credit for send window after processing each
fault. Also credit has to be returned even for fault window.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 9 +
arch/powerpc/platforms/powernv/vas
System checkstops if RxFIFO overruns with more requests than the
maximum possible number of CRBs allowed in FIFO at any time. So
max credits value (rxattr.wcreds_max) is set and is passed to
vas_rx_win_open() by the the driver.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv
[PATCH 01/14] powerpc/vas: Describe vas-port and interrupts properties
Signed-off-by: Haren Myneni
---
Documentation/devicetree/bindings/powerpc/ibm,vas.txt | 5 +
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/powerpc/ibm,vas.txt
b/Documentation/devicetree
-by: Haren Myneni
---
arch/powerpc/include/asm/icswx.h | 32 +++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/icswx.h b/arch/powerpc/include/asm/icswx.h
index 9872f85..c071471 100644
--- a/arch/powerpc/include/asm/icswx.h
+++ b/arch
Fault handler is created as kernel thread for each VAS instance and
invoked whenever NX generates page fault. This thread reads CRBs
from fault FIFO and process them.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 54
NX may be processing requests while trying to close window. Wait until
all credits are returned and then free send window from VAS instance.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-window.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch
This reverts commit 452d23c0f6bd97f2fd8a9691fee79b76040a0feb.
User space send windows (NX GZIP compression) need vas_win_paste_addr()
to mmap window paste address and vas_win_id() to get window ID when
window address is given.
Added vas_win_id() and vas_win_paste_addr() with:
commit
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 121 -
1 file changed, 120 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powernv/vas-fault.c
b/arch/powerpc/platforms/powernv/vas-fault.c
index 7a8b2b5..dd27649 100644
to its parent.
To prevent reusing the pid until the window closed, take reference to
pid and task mm.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-debug.c | 2 +-
arch/powerpc/platforms/powernv/vas-window.c | 44 ++---
arch/powerpc/platforms/powernv
. So for kernel requests, ignore if interrupts property is
not available.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-window.c | 14 ++
arch/powerpc/platforms/powernv/vas.c| 68 ++---
arch/powerpc
Dump FIFO values if could not find send window and print CRB for
debugging.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 40 ++
1 file changed, 40 insertions(+)
diff --git a/arch/powerpc/platforms
Process can not close send window until all requests are processed.
Means wait until window state is not busy and send credits are
returned. Display debug message in case taking longer to close the
window.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-window.c | 26
"Linuxppc-dev"
wrote on 11/27/2019 12:30:55 AM:
>
> > +#define crb_csb_addr(c) __be64_to_cpu(c->csb_addr)
> > +#define crb_nx_fault_addr(c) __be64_to_cpu
> (c->stamp.nx.fault_storage_addr)
> > +#define crb_nx_flags(c) c->stamp.nx.flags
> > +#define crb_nx_fault_status(c)
"Linuxppc-dev"
wrote on 11/27/2019 12:28:10 AM:
>
> On Tue, Nov 26, 2019 at 05:03:27PM -0800, Haren Myneni wrote:
> >
> > This reverts commit 452d23c0f6bd97f2fd8a9691fee79b76040a0feb.
> >
> > User space send windows (NX GZIP compression) need vas_w
"Linuxppc-dev"
wrote on 11/27/2019 12:46:09 AM:
> >
> > +static void notify_process(pid_t pid, u64 fault_addr)
> > +{
> > + int rc;
> > + struct kernel_siginfo info;
> > +
> > + memset(, 0, sizeof(info));
> > +
> > + info.si_signo = SIGSEGV;
> > + info.si_errno = EFAULT;
> > +
On Wed, 2019-12-18 at 15:13 -0800, Haren Myneni wrote:
> On Wed, 2019-12-18 at 18:18 +1100, Oliver O'Halloran wrote:
> > On Wed, Nov 27, 2019 at 12:07 PM Haren Myneni
> > wrote:
> > >
> > > *snip*
> > >
> > > @@ -36,7 +62,18 @@ static int in
Setup fault window for each VAS instance. When NX gets fault on request
buffer, write fault CRBs in the corresponding fault FIFO and then sends
an interrupt to the OS.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/Makefile | 2
Dump FIFO entry values if could not find send window and print CRB
for debugging.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 41 ++
1 file changed, 41 insertions(+)
diff --git a/arch/powerpc
This function allocates IRQ on a specific chip. VAS needs per chip
IRQ allocation and will have IRQ handler per VAS instance.
Signed-off-by: Haren Myneni
---
arch/powerpc/include/asm/xive.h | 9 -
arch/powerpc/sysdev/xive/native.c | 6 +++---
2 files changed, 11 insertions(+), 4
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 120
+
1 file changed, 120 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/vas-fault.c
b/arch/powerpc/platforms/powernv/vas-fault.c
index 5c2cada..1d31d8d 100644
--- a/arch/powerpc
NX may be processing requests while trying to close window. Wait until
all credits are returned and then free send window from VAS instance.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-window.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch
Alloc IRQ and get trigger port address for each VAS instance. Kernel
register this IRQ per VAS instance and sets this port for each send
window. NX interrupts the kernel when it sees page fault.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas.c | 34
NX expects OS to return credit for send window after processing each
fault. Also credit has to be returned even for fault window.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 10 ++
arch/powerpc/platforms/powernv/vas
instance. It eliminates skiboot
dependency as suggested by Oliver.
Haren Myneni (14):
powerpc/xive: Define xive_native_alloc_irq_on_chip()
powerpc/xive: Define xive_native_alloc_get_irq_info()
powerpc/vas: Define nx_fault_stamp in coprocessor_request_block
powerpc/vas: Alloc and setup IRQ and trig
For each user space send window, register NX with fault window ID
and port value so that NX paste CRBs in this fault FIFO when it
sees fault on the request buffer.
Signed-off-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-window.c | 15
to its parent.
To prevent reusing the pid until the window closed, take reference to
pid and task mm.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-debug.c | 2 +-
arch/powerpc/platforms/powernv/vas-window.c | 53 ++---
arch/powerpc/platforms/powernv
System checkstops if RxFIFO overruns with more requests than the
maximum possible number of CRBs allowed in FIFO at any time. So
max credits value (rxattr.wcreds_max) is set and is passed to
vas_rx_win_open() by the the driver.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv
-by: Sukadev Bhattiprolu
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-fault.c | 85 +
arch/powerpc/platforms/powernv/vas-window.c | 60
arch/powerpc/platforms/powernv/vas.c| 21 ++-
arch/powerpc/platforms/powernv/vas.h
Process can not close send window until all requests are processed.
Means wait until window state is not busy and send credits are
returned. Display debug message in case taking longer to close the
window.
Signed-off-by: Haren Myneni
---
arch/powerpc/platforms/powernv/vas-window.c | 27
pnv_ocxl_alloc_xive_irq() in ocxl.c allocates IRQ and gets trigger port
address. VAS also needs this function, but based on chip ID. So moved
this common function to xive/native.c.
Signed-off-by: Haren Myneni
---
arch/powerpc/include/asm/xive.h | 2 ++
arch/powerpc/platforms/powernv
-by: Haren Myneni
---
arch/powerpc/include/asm/icswx.h | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/icswx.h b/arch/powerpc/include/asm/icswx.h
index 9872f85..b233d1e 100644
--- a/arch/powerpc/include/asm/icswx.h
+++ b/arch/powerpc/include
On Wed, 2019-12-18 at 16:18 -0600, Rob Herring wrote:
> On Mon, Dec 16, 2019 at 09:48:40PM -0800, Haren Myneni wrote:
> >
>
> Commit message?
>
> > Signed-off-by: Haren Myneni
>
> Your author and S-o-b emails don't match.
Thanks, Oliver suggested IRQ assign in
101 - 200 of 669 matches
Mail list logo