crypto/nx: Use percpu send window for NX requests
commit976dd6490b1b45727733a3ee1e25e159c1d748ed
authorHaren Myneni <haren@linux.vnet.ibm.com>
Mon, 25 Sep 2017 06:43:02 +0000 (24 23:43 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 11 Nov 2017 22:03:11 +0000 (12 09:03 +1100)
tree3aa70f133106e962e68122d086e5e1e7d98047e8
parent6c8e6bb2a52d5e7ae5bbde21c21f6d5dfd6e9ae8
crypto/nx: Use percpu send window for NX requests

For P9 NX, the send window is opened for each crypto session and
closed upon free. But VAS supports 64K windows per chip for all
coprocessors including in user space support. So there is a
possibility of not getting the window for kernel requests.

This patch reserves windows for each coprocessor type (NX842) and are
available forever for kernel requests, Opens each window for each CPU
on the corresponding chip during driver initialization. So then use
the percpu txwin for NX requests depends on the CPU on which the
process is executing.

Signed-off-by: Haren Myneni <haren@us.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/crypto/nx/nx-842-powernv.c