scsi: cxlflash: Support process element lifecycle
authorUma Krishnan <ukrishn@linux.vnet.ibm.com>
Mon, 26 Mar 2018 16:33:35 +0000 (11:33 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 18 Apr 2018 23:32:49 +0000 (19:32 -0400)
commitc207b5714304528b9c1719800eb3a191370b6d80
treea95e3abeef8edd241f8fa5164a8d70cb3f726ab6
parentc52bf5b384532ebc49deea16daf65c5cd1afbab2
scsi: cxlflash: Support process element lifecycle

As part of the context lifecycle, the associated process element within the
Shared Process Area (SPA) of the link must be updated. Each process is defined
by various parameters (pid, tid, PASID mm) that are stored in the SPA upon
starting a context and invalidated when a context is stopped.

Use the OCXL provider services to configure the SPA with the appropriate data
that is unique to the process when starting a context. Initially only kernel
contexts are supported and therefore these process values are not applicable.
Note that the OCXL service used has an optional callback for translation fault
error notification. While not used here, it will be expanded in a future
commit.

Also add a service to stop a context by terminating the corresponding PASID
and remove the process element from the SPA.

Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/cxlflash/ocxl_hw.c