summaryrefslogtreecommitdiff
path: root/drivers/scsi/cxlflash/ocxl_hw.h
diff options
context:
space:
mode:
authorUma Krishnan <ukrishn@linux.vnet.ibm.com>2018-03-26 11:33:55 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2018-04-18 19:32:49 -0400
commit762c7e9332584d2d7aa645c24dda190d3be8d5f9 (patch)
tree6edbc7fa0d29e6297ec3df54c5d0f101c5ff25e0 /drivers/scsi/cxlflash/ocxl_hw.h
parenta06b1cfc0400a699374e9c41d0ca46de2cb4d0d7 (diff)
scsi: cxlflash: Support starting user contexts
User contexts request interrupts and are started using the "start work" interface. Populate the start_work() fop to allocate and map interrupts before starting the user context. As part of starting the context, update the user process identification logic to properly derive the data required by the SPA. Also, introduce a skeleton interrupt handler using a bitmap, flag, and spinlock to track interrupts. This handler will be expanded in future commits. 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>
Diffstat (limited to 'drivers/scsi/cxlflash/ocxl_hw.h')
-rw-r--r--drivers/scsi/cxlflash/ocxl_hw.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/cxlflash/ocxl_hw.h b/drivers/scsi/cxlflash/ocxl_hw.h
index 9011af08a957..2eb53901daf3 100644
--- a/drivers/scsi/cxlflash/ocxl_hw.h
+++ b/drivers/scsi/cxlflash/ocxl_hw.h
@@ -55,6 +55,9 @@ struct ocxlflash_context {
phys_addr_t psn_phys; /* Process mapping */
u64 psn_size; /* Process mapping size */
+ spinlock_t slock; /* Protects irq/fault/event updates */
struct ocxlflash_irqs *irqs; /* Pointer to array of structures */
int num_irqs; /* Number of interrupts */
+ bool pending_irq; /* Pending interrupt on the context */
+ ulong irq_bitmap; /* Bits indicating pending irq num */
};