diff options
author | Uma Krishnan <ukrishn@linux.vnet.ibm.com> | 2018-03-26 18:33:55 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-04-19 01:32:49 +0200 |
commit | 762c7e9332584d2d7aa645c24dda190d3be8d5f9 (patch) | |
tree | 6edbc7fa0d29e6297ec3df54c5d0f101c5ff25e0 /drivers/scsi/cxlflash/ocxl_hw.h | |
parent | scsi: cxlflash: Support AFU interrupt mapping and registration (diff) | |
download | linux-762c7e9332584d2d7aa645c24dda190d3be8d5f9.tar.xz linux-762c7e9332584d2d7aa645c24dda190d3be8d5f9.zip |
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.h | 3 |
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 */ }; |