Revision tags: v4.17.2, v4.17.1, v4.17, v4.16 |
|
#
007bb7d6 |
| 09-Feb-2018 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/vas: Add a couple of trace points
Add a couple of trace points in the VAS driver
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> [mpe: Add SPDX tag to new header] Signed-off
powerpc/vas: Add a couple of trace points
Add a couple of trace points in the VAS driver
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> [mpe: Add SPDX tag to new header] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
b00b6289 |
| 08-Feb-2018 |
Nicholas Piggin <npiggin@gmail.com> |
powerpc/vas: Don't set uses_vas for kernel windows
cp_abort is only required for user windows, because kernel context must not be preempted between a copy/paste pair.
Without this patch, the init t
powerpc/vas: Don't set uses_vas for kernel windows
cp_abort is only required for user windows, because kernel context must not be preempted between a copy/paste pair.
Without this patch, the init task gets used_vas set when it runs the nx842_powernv_init initcall, which opens windows for kernel usage.
used_vas is then never cleared anywhere, so it gets propagated into all other tasks. It's a property of the address space, so it should really be cleared when a new mm is created (or in dup_mmap if the mmaps are marked as VM_DONTCOPY). For now we seem to have no such driver, so leave that for another patch.
Fixes: 6c8e6bb2a52d ("powerpc/vas: Add support for user receive window") Cc: stable@vger.kernel.org # v4.15+ Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
Revision tags: v4.15, v4.13.16, v4.14 |
|
#
6c8e6bb2 |
| 07-Nov-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/vas: Add support for user receive window
Add support for user space receive window (for the Fast thread-wakeup coprocessor type)
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.c
powerpc/vas: Add support for user receive window
Add support for user space receive window (for the Fast thread-wakeup coprocessor type)
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
61f3cca8 |
| 07-Nov-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/vas: Define vas_win_id()
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 generate an unique handle for a
powerpc/vas: Define vas_win_id()
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 generate an unique handle for a user space receive window. Applications can use this handle to pair send and receive windows for fast thread-wakeup.
The hardware 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 <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
5676be2f |
| 07-Nov-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/vas: Define vas_win_paste_addr()
Define an interface that the NX drivers can use to find the physical paste address of a send window. This interface is expected to be used with the mmap() op
powerpc/vas: Define vas_win_paste_addr()
Define an interface that the NX drivers can use to find the physical paste address of a send window. This interface is expected to be used with the mmap() operation of the NX driver's device. i.e the user space process can use driver's mmap() operation to map the send window's paste 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 <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
ece4e512 |
| 07-Nov-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/vas: Export HVWC to debugfs
Export the VAS Window context information to debugfs.
We need to hold a mutex when closing the window to prevent a race with the debugfs read(). Rather than intr
powerpc/vas: Export HVWC to debugfs
Export the VAS Window context information to debugfs.
We need to hold a mutex when closing the window to prevent a race with the debugfs read(). Rather than introduce a per-instance mutex, we use the global vas_mutex for now, since it is not heavily contended.
The window->cop field is only 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 <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
6fccac16 |
| 07-Nov-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/vas: poll for return of window credits
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 t
powerpc/vas: poll for return of window credits
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 <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
62f659e0 |
| 07-Nov-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/vas: Save configured window credits
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-
powerpc/vas: Save configured window credits
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 <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
dfe954e4 |
| 07-Nov-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/vas: Reduce polling interval for busy state
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 v
powerpc/vas: Reduce polling interval for busy state
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 <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
36a288fe |
| 07-Nov-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/vas: Use helper to unpin/close window
Use a helper to have the hardware unpin and mark a window closed.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michae
powerpc/vas: Use helper to unpin/close window
Use a helper to have the hardware unpin and mark a window closed.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
4963ac36 |
| 07-Nov-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/vas: Drop poll_window_cast_out().
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.
S
powerpc/vas: Drop poll_window_cast_out().
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 <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
0a2c2c24 |
| 07-Nov-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/vas: Cleanup some debug code
Clean up vas.h and the debug code around ifdef vas_debug.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@e
powerpc/vas: Cleanup some debug code
Clean up vas.h and the debug code around ifdef vas_debug.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
51b53712 |
| 07-Nov-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/vas: Validate window credits
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
powerpc/vas: Validate window credits
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 <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
e34917fb |
| 07-Nov-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/vas: init missing fields from [rt]xattr
Initialize a few missing window context fields from the window attributes specified by the caller. These fields are currently set to their default val
powerpc/vas: init missing fields from [rt]xattr
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 <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
Revision tags: v4.13.5, v4.13 |
|
#
2392c8c8 |
| 29-Aug-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/powernv/vas: Define copy/paste interfaces
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
powerpc/powernv/vas: Define copy/paste interfaces
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 <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
5239af67 |
| 29-Aug-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/powernv/vas: Define vas_tx_win_open()
Define an interface to open a VAS send window. This interface is intended to be used the Nest Accelerator (NX) driver(s) to open a send window and use i
powerpc/powernv/vas: Define vas_tx_win_open()
Define an interface to open a VAS send window. This interface is intended to be used the Nest Accelerator (NX) driver(s) to open a send window and use it to submit compression/encryption requests to a VAS receive window.
The receive window, identified by the [vasid, cop] parameters, must already be open in VAS (i.e connected to an NX engine).
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
98271d41 |
| 29-Aug-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/powernv/vas: Define vas_win_close() interface
Define the vas_win_close() interface which should be used to close a send or receive windows.
While the hardware configurations required to ope
powerpc/powernv/vas: Define vas_win_close() interface
Define the vas_win_close() interface which should be used to close a send or receive windows.
While the hardware configurations required to open send and receive windows differ, the configuration to close a window is the same for both. So we use a single interface to close the window.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
62c4eda4 |
| 29-Aug-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/powernv/vas: Define vas_rx_win_open() interface
Define the vas_rx_win_open() interface. This interface is intended to be used by the Nest Accelerator (NX) driver(s) to setup receive windows
powerpc/powernv/vas: Define vas_rx_win_open() interface
Define the vas_rx_win_open() interface. This interface is intended to be used by the Nest Accelerator (NX) driver(s) to setup receive windows for one or more NX engines (which implement compression & encryption algorithms in the hardware).
Follow-on patches will provide an interface to close 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 <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
bbfe59f8 |
| 29-Aug-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/powernv/vas: Define helpers to alloc/free windows
Define helpers to allocate/free VAS window objects. These will be used in follow-on patches when opening/closing windows.
Signed-off-by: Su
powerpc/powernv/vas: Define helpers to alloc/free windows
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 <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
b25b33ac |
| 29-Aug-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/powernv/vas: Define helpers to init window context
Define helpers to initialize window context registers of the VAS hardware. These will be used in follow-on patches when opening/closing VAS
powerpc/powernv/vas: Define helpers to init window context
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 <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
180fe15a |
| 29-Aug-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/powernv/vas: Define helpers to access MMIO regions
Define some helper functions to access the MMIO regions. We use these in follow-on patches to read/write VAS hardware registers. They are a
powerpc/powernv/vas: Define helpers to access MMIO regions
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 <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
4dea2d1a |
| 29-Aug-2017 |
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
powerpc/powernv/vas: Define vas_init() and vas_exit()
Implement vas_init() and vas_exit() functions for a new VAS module. This VAS module is essentially a library for other device drivers and kernel
powerpc/powernv/vas: Define vas_init() and vas_exit()
Implement vas_init() and vas_exit() functions for a new VAS module. This VAS module is essentially a library for other device drivers and kernel users of the NX coprocessors like NX-842 and NX-GZIP. In the future this will be extended to add support for user space to access the NX coprocessors.
VAS is currently only supported with 64K page size.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
show more ...
|
#
97ebbfe4 |
| 17-Jun-2021 |
Haren Myneni <haren@linux.ibm.com> |
powerpc/powernv/vas: Release reference to tgid during window close commit 91cdbb955aa94ee0841af4685be40937345d29b8 upstream. The kernel handles the NX fault by updating CSB or sendi
powerpc/powernv/vas: Release reference to tgid during window close commit 91cdbb955aa94ee0841af4685be40937345d29b8 upstream. The kernel handles the NX fault by updating CSB or sending signal to process. In multithread applications, children can open VAS windows and can exit without closing them. But the parent can continue to send NX requests with these windows. To prevent pid reuse, reference will be taken on pid and tgid when the window is opened and release them during window close. The current code is not releasing the tgid reference which can cause pid leak and this patch fixes the issue. Fixes: db1c08a740635 ("powerpc/vas: Take reference to PID and mm for user space windows") Cc: stable@vger.kernel.org # 5.8+ Reported-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Haren Myneni <haren@linux.ibm.com> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/6020fc4d444864fe20f7dcdc5edfe53e67480a1c.camel@linux.ibm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
Revision tags: v5.10.43, v5.10.42, v5.10.41, v5.10.40, v5.10.39, v5.4.119, v5.10.36, v5.10.35, v5.10.34, v5.4.116, v5.10.33, v5.12, v5.10.32, v5.10.31, v5.10.30, v5.10.27, v5.10.26, v5.10.25, v5.10.24, v5.10.23, v5.10.22, v5.10.21, v5.10.20, v5.10.19, v5.4.101, v5.10.18, v5.10.17, v5.11, v5.10.16, v5.10.15, v5.10.14, v5.10, v5.8.17, v5.8.16, v5.8.15, v5.9, v5.8.14, v5.8.13, v5.8.12, v5.8.11, v5.8.10, v5.8.9, v5.8.8, v5.8.7, v5.8.6, v5.4.62, v5.8.5, v5.8.4, v5.4.61, v5.8.3, v5.4.60, v5.8.2, v5.4.59, v5.8.1, v5.4.58, v5.4.57, v5.4.56 |
|
#
3b70464a |
| 03-Aug-2020 |
Oliver O'Halloran <oohall@gmail.com> |
powerpc/powernv: Staticify functions without prototypes There's a few scattered in the powernv platform. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Reviewed-by: Joel St
powerpc/powernv: Staticify functions without prototypes There's a few scattered in the powernv platform. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200804005410.146094-4-oohall@gmail.com
show more ...
|
Revision tags: v5.8, v5.7.12, v5.4.55, v5.7.11, v5.4.54, v5.7.10, v5.4.53, v5.4.52, v5.7.9, v5.7.8, v5.4.51, v5.4.50, v5.7.7, v5.4.49, v5.7.6, v5.7.5, v5.4.48, v5.7.4, v5.7.3, v5.4.47, v5.4.46, v5.7.2, v5.4.45, v5.7.1, v5.4.44, v5.7, v5.4.43, v5.4.42, v5.4.41, v5.4.40, v5.4.39, v5.4.38, v5.4.37, v5.4.36, v5.4.35, v5.4.34 |
|
#
dda44eb2 |
| 17-Apr-2020 |
Haren Myneni <haren@linux.ibm.com> |
powerpc/vas: Add VAS user space API On power9, userspace can send GZIP compression requests directly to NX once kernel establishes NX channel / window with VAS. This patch provides u
powerpc/vas: Add VAS user space API On power9, userspace can send GZIP compression requests directly to NX once kernel establishes NX channel / window with VAS. This patch provides user space API which allows user space to establish channel using open VAS_TX_WIN_OPEN ioctl, mmap and close operations. Each window corresponds to file descriptor and application can open multiple windows. After the window is opened, VAS_TX_WIN_OPEN icoctl to open a window on specific VAS instance, mmap() system call to map the hardware address of engine's request queue into the application's virtual address space. Then the application can then submit one or more requests to the the engine by using the copy/paste instructions and pasting the CRBs to the virtual address (aka paste_address) returned by mmap(). Only NX GZIP coprocessor type is supported right now and allow GZIP engine access via /dev/crypto/nx-gzip device node. Thanks to Michael Ellerman for his changes and suggestions to make the ioctl generic to support any coprocessor type. Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Haren Myneni <haren@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/1587114121.2275.1109.camel@hbabu-laptop
show more ...
|