Re: [PATCH 1/3] scsi: cxlflash: Fix fallthrough warnings.

2019-08-29 Thread Uma Krishnan
Below commit queued up for 5.4 includes these changes. commit 657bd277c162580674ddb86a90c4aeb62639bff5 Author: Gustavo A. R. Silva Date: Sun Jul 28 19:21:19 2019 -0500 Thanks, Uma Krishnan > On Aug 29, 2019, at 7:32 AM, Michal Suchanek wrote: > > Add fallthrough comments wher

Re: [PATCH 1/3] scsi: cxlflash: Fix fallthrough warnings.

2019-08-29 Thread Uma Krishnan
Below commit queued up for 5.4 includes these changes.commit 657bd277c162580674ddb86a90c4aeb62639bff5Author: Gustavo A. R. Silva Date:   Sun Jul 28 19:21:19 2019 -0500Thanks,Uma KrishnanOn Aug 29, 2019, at 7:32 AM, Michal Suchanek wrote:Add fallthrough comments where missing.Signed-off-by: Michal

[PATCH 7/7] cxlflash: Isolate external module dependencies

2018-05-11 Thread Uma Krishnan
drivers and adjust the module dependencies accordingly. This commit isolates the object files that are dependent on CXL and/or OCXL. The cxl/ocxl fops used in the core driver are tucked under an ifdef to avoid compilation errors. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/Kconfig | 2

[PATCH 6/7] cxlflash: Abstract hardware dependent assignments

2018-05-11 Thread Uma Krishnan
As a staging cleanup to support transport specific builds of the cxlflash module, relocate device dependent assignments to header files. This will avoid littering the core driver with conditional compilation logic. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c | 7

[PATCH 5/7] cxlflash: Add include guards to backend.h

2018-05-11 Thread Uma Krishnan
The new header file, backend.h, that was recently added is missing the include guards. This commit adds the guards. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/backend.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/scsi/cxlflash/backend.h b/drivers/scsi/cxlflash

[PATCH 4/7] cxlflash: Use local mutex for AFU serialization

2018-05-11 Thread Uma Krishnan
g a global mutex, transition the mutex to be per-AFU. This will allow commands to only be blocked by siblings of the same AFU. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/common.h | 1 + drivers/scsi/cxlflash/main.c | 6 +++--- 2 files changed, 4 insert

[PATCH 3/7] cxlflash: Acquire semaphore before invoking ioctl services

2018-05-11 Thread Uma Krishnan
quire it before invoking any ioctl services. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/superpipe.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/scsi/cxlflash/superpipe.c b/drivers/scsi/cxlflash/superpipe.c index 04a3bf9..5ba6e62 100644 --- a/drivers/scsi/cxl

[PATCH 2/7] cxlflash: Limit the debug logs in the IO path

2018-05-11 Thread Uma Krishnan
useful data in the log. The best option available is to limit the messages that should serve most of the common use cases. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi

[PATCH 1/7] cxlflash: Yield to active send threads

2018-05-11 Thread Uma Krishnan
tly used to track internal AFU commands and quiesce during reset. This same counter can also be used for the active send threads. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlfl

[PATCH 0/7] Miscellaneous patches and bug fixes

2018-05-11 Thread Uma Krishnan
This patch series adds few improvements to the cxlflash driver and it also contains couple of bug fixes. This patch series is intended for 4.18 and is bisectable. Matthew R. Ochs (1): cxlflash: Use local mutex for AFU serialization Uma Krishnan (6): cxlflash: Yield to active send threads

Re: [PATCH v3 00/41] cxlflash: OCXL transport support and miscellaneous fixes

2018-03-29 Thread Uma Krishnan
> On Mar 28, 2018, at 4:34 PM, Martin K. Petersen > wrote: > > > Uma, > >> This patch series adds OCXL support to the cxlflash driver. With this >> support, new devices using the OCXL transport will be supported by the >> cxlflash driver along with the existing CXL devices. An effort is made

[PATCH v3 41/41] cxlflash: Handle spurious interrupts

2018-03-26 Thread Uma Krishnan
flushed, leading to a possible crash when the memory for the flushed command is accessed. To resolve this problem, a boolean will indicate if the hardware queue is ready to process interrupts or not. This can be evaluated in the interrupt handler before proessing an interrupt. Signed-off-by: Uma

[PATCH v3 40/41] cxlflash: Remove commmands from pending list on timeout

2018-03-26 Thread Uma Krishnan
resolve this issue, when an AFU command or TMF command times out, the command should be deleted from the hardware queue pending command list before freeing the buffer. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a

[PATCH v3 39/41] cxlflash: Synchronize reset and remove ops

2018-03-26 Thread Uma Krishnan
result in a crash if the recovery thread tries to access this memory. To resolve this issue, the cxlflash remove handler will evaluate the device state and yield to any active reset or probing threads. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c | 6 +++--- 1 file changed, 3

[PATCH v3 38/41] cxlflash: Enable OCXL operations

2018-03-26 Thread Uma Krishnan
This commit enables the OCXL operations for the OCXL devices. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/main.c | 9 +++-- drivers/scsi/cxlflash/main.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/cxlflash/main.c b

[PATCH v3 37/41] cxlflash: Support AFU reset

2018-03-26 Thread Uma Krishnan
execution. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi/cxlflash/ocxl_hw.c index 5b5565d..0a95b5f 100644 --- a/drivers/scsi/cxlflash

[PATCH v3 36/41] cxlflash: Register for translation errors

2018-03-26 Thread Uma Krishnan
While enabling a context on the link, a predefined callback can be registered with the OCXL provider services to be notified on translation errors. These errors can in turn be passed back to the user on a read operation. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi

[PATCH v3 35/41] cxlflash: Introduce OCXL context state machine

2018-03-26 Thread Uma Krishnan
to the context state field. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 59 ++--- drivers/scsi/cxlflash/ocxl_hw.h | 8 ++ 2 files changed, 64 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/cxlflash

[PATCH v3 34/41] cxlflash: Update synchronous interrupt status bits

2018-03-26 Thread Uma Krishnan
formatting updates to some of the existing bits to allow all of the definitions to line up uniformly. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/sislite.h | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/drivers

[PATCH v3 33/41] cxlflash: Setup LISNs for master contexts

2018-03-26 Thread Uma Krishnan
Similar to user contexts, master contexts also require that the per-context LISN registers be programmed for certain AFUs. The mapped trigger page is obtained from underlying transport and registered with AFU for each master context. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs

[PATCH v3 32/41] cxlflash: Setup LISNs for user contexts

2018-03-26 Thread Uma Krishnan
handle is the mapped trigger page. Note that because these mappings are kernel only, the PASID of a kernel context must be used to satisfy the translation. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/common.h| 5 + drivers/scsi/cxlflash/sislite.h | 5

[PATCH v3 31/41] cxlflash: Introduce object handle fop

2018-03-26 Thread Uma Krishnan
the core driver as it manages the AFU specification (SISLite) for cxlflash. Note that for Power systems, the object handle is the effective address of the trigger page. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/backend.h | 1 + drivers/scsi/cxlflash

[PATCH v3 30/41] cxlflash: Support file descriptor mapping

2018-03-26 Thread Uma Krishnan
to map and release when requested. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi/cxlflash/ocxl_hw.c index 8a9f2f4..4bbc1d1

[PATCH v3 29/41] cxlflash: Support adapter context mmap and release

2018-03-26 Thread Uma Krishnan
clean up the context when invoked. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 72 + 1 file changed, 72 insertions(+) diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi/cxlflash/ocxl_hw.c index

[PATCH v3 28/41] cxlflash: Support adapter context reading

2018-03-26 Thread Uma Krishnan
The cxlflash userspace API requires that users be able to read the adapter context for any pending events or interrupts from the AFU. Support reading various events by implementing the AFU read fop to copy out event data. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi

[PATCH v3 27/41] cxlflash: Support adapter context polling

2018-03-26 Thread Uma Krishnan
The cxlflash userspace API requires that users be able to poll the adapter context for any pending events or interrupts from the AFU. Support polling on various events by implementing the AFU poll fop using a waitqueue. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi

[PATCH v3 26/41] cxlflash: Support starting user contexts

2018-03-26 Thread Uma Krishnan
equired 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 Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl

[PATCH v3 25/41] cxlflash: Support AFU interrupt mapping and registration

2018-03-26 Thread Uma Krishnan
Add support to map and unmap the irq space and manage irq registrations with the kernel for each allocated AFU interrupt. Also support mapping the physical trigger page to obtain an effective address that will be provided to the cxlflash core in a future commit. Signed-off-by: Uma Krishnan Acked

[PATCH v3 24/41] cxlflash: Support AFU interrupt management

2018-03-26 Thread Uma Krishnan
Add support to allocate and free AFU interrupts using the OCXL provider services. The trigger page returned upon successful allocation will be mapped and exposed to the cxlflash core in a future commit. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c

[PATCH v3 23/41] cxlflash: Support process element lifecycle

2018-03-26 Thread Uma Krishnan
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 Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash

[PATCH v3 22/41] cxlflash: Setup OCXL transaction layer

2018-03-26 Thread Uma Krishnan
The first function of the link needs to configure the transaction layer between the host and device. This is accomplished by a call to the OCXL provider services. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 10 ++ 1 file changed, 10

[PATCH v3 21/41] cxlflash: Setup function OCXL link

2018-03-26 Thread Uma Krishnan
After reading and modifying the function configuration, setup the OCXL link using the OCXL provider services. The link is released when the adapter is unconfigured. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Reviewed-by: Frederic Barrat --- drivers/scsi/cxlflash/ocxl_hw.c | 25

[PATCH v3 20/41] cxlflash: Support reading adapter VPD data

2018-03-26 Thread Uma Krishnan
Use the PCI VPD services to support reading the VPD data of the underlying adapter. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi

[PATCH v3 19/41] cxlflash: Support AFU state toggling

2018-03-26 Thread Uma Krishnan
The AFU should be enabled following a successful configuration and disabled near the end of the cleanup path. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Reviewed-by: Frederic Barrat --- drivers/scsi/cxlflash/ocxl_hw.c | 9 + 1 file changed, 9 insertions(+) diff --git a

[PATCH v3 18/41] cxlflash: Support process specific mappings

2018-03-26 Thread Uma Krishnan
Once the context is started, the assigned MMIO space can be mapped and unmapped. Provide means to map and unmap the context MMIO space. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 24 1 file changed, 24 insertions

[PATCH v3 17/41] cxlflash: Support starting an adapter context

2018-03-26 Thread Uma Krishnan
MMIO space while the rest have access to the context specific space. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 39 +++ drivers/scsi/cxlflash/ocxl_hw.h | 3 +++ 2 files changed, 42 insertions(+) diff --git a

[PATCH v3 16/41] cxlflash: MMIO map the AFU

2018-03-26 Thread Uma Krishnan
When the AFU is configured, the global and per process MMIO regions are presented by the configuration space. Save these regions and map the global MMIO region that is used to access all of the control and provisioning data in the AFU. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs

[PATCH v3 15/41] cxlflash: Support image reload policy modification

2018-03-26 Thread Uma Krishnan
On a PERST, the AFU image can be reloaded or left intact. Provide means to set this image reload policy. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 13 + drivers/scsi/cxlflash/ocxl_hw.h | 1 + 2 files changed, 14 insertions(+) diff

[PATCH v3 14/41] cxlflash: Support adapter context discovery

2018-03-26 Thread Uma Krishnan
Provide means to obtain the process element of an adapter context as well as locate an adapter context by file. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/scsi

[PATCH v3 13/41] cxlflash: Support adapter file descriptors for OCXL

2018-03-26 Thread Uma Krishnan
Allocate a file descriptor for an adapter context when requested. In order to allocate inodes for the file descriptors, a pseudo filesystem is created and used. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 200

[PATCH v3 12/41] cxlflash: Use IDR to manage adapter contexts

2018-03-26 Thread Uma Krishnan
A range of PASIDs are used as identifiers for the adapter contexts. These contexts may be destroyed and created randomly. Use an IDR to keep track of contexts that are in use and assign a unique identifier to new ones. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi

[PATCH v3 11/41] cxlflash: Adapter context support for OCXL

2018-03-26 Thread Uma Krishnan
is created when the hardware AFU is initialized. This is returned by the get_context() fop. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Reviewed-by: Frederic Barrat --- drivers/scsi/cxlflash/ocxl_hw.c | 90 + drivers/scsi/cxlflash/ocxl_hw.h

[PATCH v3 10/41] cxlflash: Setup AFU PASID

2018-03-26 Thread Uma Krishnan
Per the OCXL specification, the maximum PASID supported by the AFU is indicated by a field within the configuration space. Similar to acTags, implementations can choose to use any sub-range of PASID within their assigned range. For cxlflash, the entire range is used. Signed-off-by: Uma Krishnan

[PATCH v3 09/41] cxlflash: Setup AFU acTag range

2018-03-26 Thread Uma Krishnan
The OCXL specification supports distributing acTags amongst different AFUs and functions on the link. As cxlflash devices are expected to only support a single AFU per function, the entire range that was assigned to the function is also assigned to the AFU. Signed-off-by: Uma Krishnan Acked-by

[PATCH v3 08/41] cxlflash: Read host AFU configuration

2018-03-26 Thread Uma Krishnan
The host AFU configuration is read on the initialization path to identify the features and configuration of the AFU. This data is cached for use in later configuration steps. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Reviewed-by: Andrew Donnellan Reviewed-by: Frederic Barrat

[PATCH v3 07/41] cxlflash: Setup function acTag range

2018-03-26 Thread Uma Krishnan
The OCXL specification supports distributing acTags amongst different AFUs and functions on the link. The platform-specific acTag range for the link is obtained using the OCXL provider services and then assigned to the host function based on implementation. Signed-off-by: Uma Krishnan Acked-by

[PATCH v3 06/41] cxlflash: Read host function configuration

2018-03-26 Thread Uma Krishnan
functions present. This data is cached for use in later configuration steps. Note that for the OCXL hardware supported by the cxlflash driver, only one AFU per function is expected. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Reviewed-by: Andrew Donnellan Reviewed-by: Frederic Barrat

[PATCH v3 05/41] cxlflash: Hardware AFU for OCXL

2018-03-26 Thread Uma Krishnan
: Uma Krishnan Acked-by: Matthew R. Ochs Reviewed-by: Andrew Donnellan --- drivers/scsi/cxlflash/backend.h | 1 + drivers/scsi/cxlflash/cxl_hw.c | 6 ++ drivers/scsi/cxlflash/main.c| 9 +++-- drivers/scsi/cxlflash/ocxl_hw.c | 40 drivers/scsi

[PATCH v3 04/41] cxlflash: Introduce OCXL backend

2018-03-26 Thread Uma Krishnan
Add initial infrastructure to support a new cxlflash transport, OCXL. Claim a dependency on OCXL and add a new file, ocxl_hw.c, which will host the backend routines that are specific to OCXL. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Reviewed-by: Andrew Donnellan --- drivers/scsi

[PATCH v3 03/41] cxlflash: Add argument identifier names

2018-03-26 Thread Uma Krishnan
Checkpatch throws a warning when the argument identifier names are not included in the function definitions. To avoid these warnings, argument identifiers are added in the existing function definitions. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/backend.h

[PATCH v3 02/41] cxlflash: Avoid clobbering context control register value

2018-03-26 Thread Uma Krishnan
ned-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c| 5 - drivers/scsi/cxlflash/sislite.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index 3d3e003..b83a55a 100644 --- a/dr

[PATCH v3 01/41] cxlflash: Preserve number of interrupts for master contexts

2018-03-26 Thread Uma Krishnan
in more than one place, preserve the value in the master context structure. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/common.h | 1 + drivers/scsi/cxlflash/main.c | 11 --- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/scsi

[PATCH v3 00/41] cxlflash: OCXL transport support and miscellaneous fixes

2018-03-26 Thread Uma Krishnan
- Added 3 new patches to the end of the series which resolve corner cases v2 Changes: - Replaced OpenCXL with OCXL in the commit messages and comments Matthew R. Ochs (1): cxlflash: Avoid clobbering context control register value Uma Krishnan (40): cxlflash: Preserve number of interrupts for

Re: [PATCH v2 13/38] cxlflash: Support adapter file descriptors for OCXL

2018-03-23 Thread Uma Krishnan
> On Mar 22, 2018, at 12:12 PM, Frederic Barrat > wrote: > > > > Le 26/02/2018 à 23:21, Uma Krishnan a écrit : >> Allocate a file descriptor for an adapter context when requested. In order >> to allocate inodes for the file descriptors, a pseudo filesystem is

Re: [PATCH v2 12/38] cxlflash: Use IDR to manage adapter contexts

2018-03-22 Thread Uma Krishnan
> On Mar 22, 2018, at 11:40 AM, Frederic Barrat > wrote: > > > > Le 26/02/2018 à 23:21, Uma Krishnan a écrit : >> A range of PASIDs are used as identifiers for the adapter contexts. These >> contexts may be destroyed and created randomly. Use an IDR to keep tr

[PATCH v2 38/38] cxlflash: Enable OCXL operations

2018-02-26 Thread Uma Krishnan
This commit enables the OCXL operations for the OCXL devices. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/main.c | 9 +++-- drivers/scsi/cxlflash/main.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/cxlflash/main.c b

[PATCH v2 37/38] cxlflash: Support AFU reset

2018-02-26 Thread Uma Krishnan
execution. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi/cxlflash/ocxl_hw.c index 9356672..3c311f3 100644 --- a/drivers/scsi/cxlflash

[PATCH v2 36/38] cxlflash: Register for translation errors

2018-02-26 Thread Uma Krishnan
While enabling a context on the link, a predefined callback can be registered with the OCXL provider services to be notified on translation errors. These errors can in turn be passed back to the user on a read operation. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi

[PATCH v2 35/38] cxlflash: Introduce OCXL context state machine

2018-02-26 Thread Uma Krishnan
to the context state field. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 59 ++--- drivers/scsi/cxlflash/ocxl_hw.h | 8 ++ 2 files changed, 64 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/cxlflash

[PATCH v2 34/38] cxlflash: Update synchronous interrupt status bits

2018-02-26 Thread Uma Krishnan
formatting updates to some of the existing bits to allow all of the definitions to line up uniformly. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/sislite.h | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/drivers

[PATCH v2 33/38] cxlflash: Setup LISNs for master contexts

2018-02-26 Thread Uma Krishnan
Similar to user contexts, master contexts also require that the per-context LISN registers be programmed for certain AFUs. The mapped trigger page is obtained from underlying transport and registered with AFU for each master context. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs

[PATCH v2 32/38] cxlflash: Setup LISNs for user contexts

2018-02-26 Thread Uma Krishnan
handle is the mapped trigger page. Note that because these mappings are kernel only, the PASID of a kernel context must be used to satisfy the translation. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/common.h| 5 + drivers/scsi/cxlflash/sislite.h | 5

[PATCH v2 31/38] cxlflash: Introduce object handle fop

2018-02-26 Thread Uma Krishnan
the core driver as it manages the AFU specification (SISLite) for cxlflash. Note that for Power systems, the object handle is the effective address of the trigger page. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/backend.h | 1 + drivers/scsi/cxlflash

[PATCH v2 30/38] cxlflash: Support file descriptor mapping

2018-02-26 Thread Uma Krishnan
to map and release when requested. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi/cxlflash/ocxl_hw.c index 226fd6b..cb1becd

[PATCH v2 29/38] cxlflash: Support adapter context mmap and release

2018-02-26 Thread Uma Krishnan
clean up the context when invoked. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 72 + 1 file changed, 72 insertions(+) diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi/cxlflash/ocxl_hw.c index

[PATCH v2 28/38] cxlflash: Support adapter context reading

2018-02-26 Thread Uma Krishnan
The cxlflash userspace API requires that users be able to read the adapter context for any pending events or interrupts from the AFU. Support reading various events by implementing the AFU read fop to copy out event data. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi

[PATCH v2 27/38] cxlflash: Support adapter context polling

2018-02-26 Thread Uma Krishnan
The cxlflash userspace API requires that users be able to poll the adapter context for any pending events or interrupts from the AFU. Support polling on various events by implementing the AFU poll fop using a waitqueue. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi

[PATCH v2 26/38] cxlflash: Support starting user contexts

2018-02-26 Thread Uma Krishnan
equired 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 Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl

[PATCH v2 25/38] cxlflash: Support AFU interrupt mapping and registration

2018-02-26 Thread Uma Krishnan
Add support to map and unmap the irq space and manage irq registrations with the kernel for each allocated AFU interrupt. Also support mapping the physical trigger page to obtain an effective address that will be provided to the cxlflash core in a future commit. Signed-off-by: Uma Krishnan Acked

[PATCH v2 24/38] cxlflash: Support AFU interrupt management

2018-02-26 Thread Uma Krishnan
Add support to allocate and free AFU interrupts using the OCXL provider services. The trigger page returned upon successful allocation will be mapped and exposed to the cxlflash core in a future commit. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c

[PATCH v2 23/38] cxlflash: Support process element lifecycle

2018-02-26 Thread Uma Krishnan
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 Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash

[PATCH v2 22/38] cxlflash: Setup OCXL transaction layer

2018-02-26 Thread Uma Krishnan
The first function of the link needs to configure the transaction layer between the host and device. This is accomplished by a call to the OCXL provider services. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 10 ++ 1 file changed, 10

[PATCH v2 21/38] cxlflash: Setup function OCXL link

2018-02-26 Thread Uma Krishnan
After reading and modifying the function configuration, setup the OCXL link using the OCXL provider services. The link is released when the adapter is unconfigured. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 25 ++--- drivers

[PATCH v2 20/38] cxlflash: Support reading adapter VPD data

2018-02-26 Thread Uma Krishnan
Use the PCI VPD services to support reading the VPD data of the underlying adapter. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi

[PATCH v2 19/38] cxlflash: Support AFU state toggling

2018-02-26 Thread Uma Krishnan
The AFU should be enabled following a successful configuration and disabled near the end of the cleanup path. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b

[PATCH v2 18/38] cxlflash: Support process specific mappings

2018-02-26 Thread Uma Krishnan
Once the context is started, the assigned MMIO space can be mapped and unmapped. Provide means to map and unmap the context MMIO space. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 24 1 file changed, 24 insertions

[PATCH v2 17/38] cxlflash: Support starting an adapter context

2018-02-26 Thread Uma Krishnan
MMIO space while the rest have access to the context specific space. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 39 +++ drivers/scsi/cxlflash/ocxl_hw.h | 3 +++ 2 files changed, 42 insertions(+) diff --git a

[PATCH v2 16/38] cxlflash: MMIO map the AFU

2018-02-26 Thread Uma Krishnan
When the AFU is configured, the global and per process MMIO regions are presented by the configuration space. Save these regions and map the global MMIO region that is used to access all of the control and provisioning data in the AFU. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs

[PATCH v2 15/38] cxlflash: Support image reload policy modification

2018-02-26 Thread Uma Krishnan
On a PERST, the AFU image can be reloaded or left intact. Provide means to set this image reload policy. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 13 + drivers/scsi/cxlflash/ocxl_hw.h | 1 + 2 files changed, 14 insertions(+) diff

[PATCH v2 14/38] cxlflash: Support adapter context discovery

2018-02-26 Thread Uma Krishnan
Provide means to obtain the process element of an adapter context as well as locate an adapter context by file. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/scsi

[PATCH v2 13/38] cxlflash: Support adapter file descriptors for OCXL

2018-02-26 Thread Uma Krishnan
Allocate a file descriptor for an adapter context when requested. In order to allocate inodes for the file descriptors, a pseudo filesystem is created and used. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 200

[PATCH v2 12/38] cxlflash: Use IDR to manage adapter contexts

2018-02-26 Thread Uma Krishnan
A range of PASIDs are used as identifiers for the adapter contexts. These contexts may be destroyed and created randomly. Use an IDR to keep track of contexts that are in use and assign a unique identifier to new ones. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi

[PATCH v2 11/38] cxlflash: Adapter context support for OCXL

2018-02-26 Thread Uma Krishnan
is created when the hardware AFU is initialized. This is returned by the get_context() fop. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 90 + drivers/scsi/cxlflash/ocxl_hw.h | 6 +++ 2 files changed, 96

[PATCH v2 10/38] cxlflash: Setup AFU PASID

2018-02-26 Thread Uma Krishnan
Per the OCXL specification, the maximum PASID supported by the AFU is indicated by a field within the configuration space. Similar to acTags, implementations can choose to use any sub-range of PASID within their assigned range. For cxlflash, the entire range is used. Signed-off-by: Uma Krishnan

[PATCH v2 09/38] cxlflash: Setup AFU acTag range

2018-02-26 Thread Uma Krishnan
The OCXL specification supports distributing acTags amongst different AFUs and functions on the link. As cxlflash devices are expected to only support a single AFU and function, the entire range that was assigned to the function is also assigned to the AFU. Signed-off-by: Uma Krishnan Acked-by

[PATCH v2 08/38] cxlflash: Read host AFU configuration

2018-02-26 Thread Uma Krishnan
The host AFU configuration is read on the initialization path to identify the features and configuration of the AFU. This data is cached for use in later configuration steps. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 34

[PATCH v2 07/38] cxlflash: Setup function acTag range

2018-02-26 Thread Uma Krishnan
function per host is expected and thus the entire range is assigned. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 15 +++ drivers/scsi/cxlflash/ocxl_hw.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/drivers/scsi/cxlflash

[PATCH v2 06/38] cxlflash: Read host function configuration

2018-02-26 Thread Uma Krishnan
functions present. This data is cached for use in later configuration steps. Note that for the OCXL hardware supported by the cxlflash driver, only one AFU per function is expected. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/ocxl_hw.c | 41

[PATCH v2 05/38] cxlflash: Hardware AFU for OCXL

2018-02-26 Thread Uma Krishnan
: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/backend.h | 1 + drivers/scsi/cxlflash/cxl_hw.c | 6 ++ drivers/scsi/cxlflash/main.c| 9 +++-- drivers/scsi/cxlflash/ocxl_hw.c | 40 drivers/scsi/cxlflash/ocxl_hw.h | 19

[PATCH v2 04/38] cxlflash: Introduce OCXL backend

2018-02-26 Thread Uma Krishnan
Add initial infrastructure to support a new cxlflash transport, OCXL. Claim a dependency on OCXL and add a new file, ocxl_hw.c, which will host the backend routines that are specific to OCXL. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/Kconfig | 2

[PATCH v2 03/38] cxlflash: Add argument identifier names

2018-02-26 Thread Uma Krishnan
Checkpatch throws a warning when the argument identifier names are not included in the function definitions. To avoid these warnings, argument identifiers are added in the existing function definitions. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/backend.h

[PATCH v2 02/38] cxlflash: Avoid clobbering context control register value

2018-02-26 Thread Uma Krishnan
ned-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c| 5 - drivers/scsi/cxlflash/sislite.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index 3d3e003..b83a55a 100644 --- a/dr

[PATCH v2 01/38] cxlflash: Preserve number of interrupts for master contexts

2018-02-26 Thread Uma Krishnan
in more than one place, preserve the value in the master context structure. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/common.h | 1 + drivers/scsi/cxlflash/main.c | 11 --- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/scsi

[PATCH v2 00/38] cxlflash: OCXL transport support

2018-02-26 Thread Uma Krishnan
register value Uma Krishnan (37): cxlflash: Preserve number of interrupts for master contexts cxlflash: Add argument identifier names cxlflash: Introduce OCXL backend cxlflash: Hardware AFU for OCXL cxlflash: Read host function configuration cxlflash: Setup function acTag range cxlflash

Re: [PATCH 00/38] cxlflash: OpenCXL transport support

2018-02-23 Thread Uma Krishnan
On Feb 22, 2018, at 10:13 PM, Andrew Donnellan wrote:On 23/02/18 09:20, Uma Krishnan wrote:This patch series adds OpenCXL support to the cxlflash driver. Withthis support, new devices using the OpenCXL transport will be supportedby the cxlflash driver along with the existing CXL devices. An

Re: [PATCH 00/38] cxlflash: OpenCXL transport support

2018-02-23 Thread Uma Krishnan
> On Feb 22, 2018, at 10:13 PM, Andrew Donnellan > wrote: > > On 23/02/18 09:20, Uma Krishnan wrote: >> This patch series adds OpenCXL support to the cxlflash driver. With >> this support, new devices using the OpenCXL transport will be supported >> by the

Re: [PATCH 04/38] cxlflash: Introduce OpenCXL backend

2018-02-23 Thread Uma Krishnan
> On Feb 22, 2018, at 10:28 PM, Andrew Donnellan > wrote: > > On 23/02/18 09:22, Uma Krishnan wrote: >> Add initial infrastructure to support a new cxlflash transport, OpenCXL. >> Claim a dependency on OpenCXL (OCXL) and add a new file, ocxl_hw.c, which >> will

[PATCH 15/38] cxlflash: Support image reload policy modification

2018-02-22 Thread Uma Krishnan
On a PERST, the AFU image can be reloaded or left intact. Provide means to set this image reload policy. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/ocxl_hw.c | 13 + drivers/scsi/cxlflash/ocxl_hw.h | 1 + 2 files changed, 14 insertions(+) diff --git a/drivers/scsi

[PATCH 38/38] cxlflash: Enable OpenCXL operations

2018-02-22 Thread Uma Krishnan
This commit enables the OpenCXL operations for the OpenCXL devices. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c | 9 +++-- drivers/scsi/cxlflash/main.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash

[PATCH 37/38] cxlflash: Support AFU reset

2018-02-22 Thread Uma Krishnan
execution. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/ocxl_hw.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi/cxlflash/ocxl_hw.c index dc45ed2..8a1a9fc 100644 --- a/drivers/scsi/cxlflash/ocxl_hw.c +++ b/drivers/scsi

  1   2   3   4   >