Skip to content

New driver to support OpenCAPI devices on POWER9

Frederic Barrat linuxppc-dev lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 6 repliesIn review
  2. v113 patches 19 repliesSuperseded

Changes in v2 from the cover letter

All/many patches:
use new SPDX tag for licensing info
fix sparse warnings
patch 2: set "From" field correctly
don't activate the PCI fixup on platforms other than powernv

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13powerpc/powernv: Introduce new PHB type for opencapi linksarch/powerpc/platforms/powernv/npu-dma.c arch/powerpc/platforms/powernv/pci-ioda.c arch/powerpc/platforms/powernv/pci.c +1 more+43 -121 reply
2/13powerpc/powernv: Set correct configuration space size for opencapi devicesarch/powerpc/platforms/powernv/pci-ioda.c+13 -00 replies
3/13powerpc/powernv: Add opal calls for opencapiarch/powerpc/include/asm/opal-api.h arch/powerpc/include/asm/opal.h arch/powerpc/platforms/powernv/opal-wrappers.S+13 -10 replies
4/13powerpc/powernv: Add platform-specific services for opencapiarch/powerpc/include/asm/pnv-ocxl.h arch/powerpc/platforms/powernv/Makefile arch/powerpc/platforms/powernv/ocxl.c+210 -00 replies
5/13powerpc/powernv: Capture actag information for the devicearch/powerpc/include/asm/pnv-ocxl.h arch/powerpc/platforms/powernv/ocxl.c include/misc/ocxl-config.h+354 -00 replies
6/13ocxl: Driver code for 'generic' opencapi devicesdrivers/misc/ocxl/config.c drivers/misc/ocxl/context.c drivers/misc/ocxl/file.c +7 more+3043 -00 replies
7/13ocxl: Add AFU interrupt supportarch/powerpc/include/asm/pnv-ocxl.h arch/powerpc/platforms/powernv/ocxl.c drivers/misc/ocxl/afu_irq.c +5 more+357 -22 replies
8/13ocxl: Add a kernel API for other opencapi driversdrivers/misc/ocxl/config.c drivers/misc/ocxl/link.c drivers/misc/ocxl/ocxl_internal.h +1 more+234 -710 replies
9/13ocxl: Add trace pointsdrivers/misc/ocxl/afu_irq.c drivers/misc/ocxl/context.c drivers/misc/ocxl/link.c +2 more+205 -10 replies
10/13ocxl: Add Makefile and Kconfigdrivers/misc/Kconfig drivers/misc/Makefile drivers/misc/ocxl/Kconfig +1 more+44 -00 replies
11/13cxl: Remove support for "Processing accelerators" classdrivers/misc/cxl/pci.c+0 -20 replies
12/13ocxl: DocumentationDocumentation/ABI/testing/sysfs-class-ocxl Documentation/accelerators/ocxl.rst Documentation/ioctl/ioctl-number.txt+196 -03 replies
13/13ocxl: add MAINTAINERS entryMAINTAINERS+12 -00 replies

Reviews trailers per patch

2 of 13 patches have a Reviewed-by or Acked-by.

PatchAndrew Donnellan
1/13
2/13
3/13A-b
4/13
5/13
6/13
7/13
8/13
9/13
10/13
11/13A-b
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/13] New driver to support OpenCAPI devices on POWER9

This series adds support for Open Coherent Accelerator (ocxl) devices on POWER9 processor. OpenCAPI is a consortium developing the specifications for an interface between processors and accelerators, allowing sharing the host memory with the accelerators, using virtual addresses.

The OpenCAPI device can also have its own local memory and provide access to the host, though it is not supported by that series.

The OpenCAPI specification is processor agnostic, but this series adds support specifically for powerpc.

Even though the underlying transport is not PCI, the firmware abstracts the hardware like a PCI host bridge and Linux sees the OpenCAPI devices as PCI devices. So a lot of existing infrastructure and commands can be reused.

Patches 1-5:  add the platform-specific services needed by the driver
Patches 6-10: driver code
Patch 11:     small correction to existing cxl driver
Patch 12:     documentation

Current limitations, that will be addressed in later patches:
- no capability to trigger a reset of the opencapi adapter
- no support for the 'wake_host_thread' command
- no support for adapters with a dual-link connection (none exists yet)
- no access to the adapter-local memory

Many people contributed directly or indirectly, from the software, hardware and bringup teams. In particular Andrew Donnellan and Alastair D'Silva, who are developing the related firmware and library.

Feedback welcome!

Changelog:
v2:
All/many patches:
use new SPDX tag for licensing info
fix sparse warnings
patch 2: set "From" field correctly
don't activate the PCI fixup on platforms other than powernv

patch 4:  fix typos
patch 7:  map AFU interrupt trigger page write-only
patch 10: rephrase CONFIG help message
patch 12: add documentation for new sysfs files
patch 13: follow alphabetical order for new entry in MAINTAINERS

Andrew Donnellan (1):
powerpc/powernv: Set correct configuration space size for opencapi
devices

Frederic Barrat (12):
powerpc/powernv: Introduce new PHB type for opencapi links powerpc/powernv: Add opal calls for opencapi powerpc/powernv: Add platform-specific services for opencapi powerpc/powernv: Capture actag information for the device
ocxl: Driver code for 'generic' opencapi devices
ocxl: Add AFU interrupt support
ocxl: Add a kernel API for other opencapi drivers
ocxl: Add trace points
ocxl: Add Makefile and Kconfig
cxl: Remove support for "Processing accelerators" class
ocxl: Documentation
ocxl: add MAINTAINERS entry

 Documentation/ABI/testing/sysfs-class-ocxl     |  35 ++
 Documentation/accelerators/ocxl.rst            | 160 ++++++
 Documentation/ioctl/ioctl-number.txt           |   1 +
 MAINTAINERS                                    |  12 +
 arch/powerpc/include/asm/opal-api.h            |   5 +-
 arch/powerpc/include/asm/opal.h                |   6 +
 arch/powerpc/include/asm/pnv-ocxl.h            |  36 ++
 arch/powerpc/platforms/powernv/Makefile        |   1 +
 arch/powerpc/platforms/powernv/npu-dma.c       |   2 +-
 arch/powerpc/platforms/powernv/ocxl.c          | 515 ++++++++++++++++++
 arch/powerpc/platforms/powernv/opal-wrappers.S |   3 +
 arch/powerpc/platforms/powernv/pci-ioda.c      |  54 +-
 arch/powerpc/platforms/powernv/pci.c           |   4 +
 arch/powerpc/platforms/powernv/pci.h           |   8 +-
 drivers/misc/Kconfig                           |   1 +
 drivers/misc/Makefile                          |   1 +
 drivers/misc/cxl/pci.c                         |   2 -
 drivers/misc/ocxl/Kconfig                      |  31 ++
 drivers/misc/ocxl/Makefile                     |  11 +
 drivers/misc/ocxl/afu_irq.c                    | 202 +++++++
 drivers/misc/ocxl/config.c                     | 723 +++++++++++++++++++++++++
 drivers/misc/ocxl/context.c                    | 279 ++++++++++
 drivers/misc/ocxl/file.c                       | 432 +++++++++++++++
 drivers/misc/ocxl/link.c                       | 647 ++++++++++++++++++++++
 drivers/misc/ocxl/main.c                       |  33 ++
 drivers/misc/ocxl/ocxl_internal.h              | 131 +++++
 drivers/misc/ocxl/pasid.c                      | 107 ++++
 drivers/misc/ocxl/pci.c                        | 585 ++++++++++++++++++++
 drivers/misc/ocxl/sysfs.c                      | 142 +++++
 drivers/misc/ocxl/trace.c                      |   6 +
 drivers/misc/ocxl/trace.h                      | 182 +++++++
 include/misc/ocxl-config.h                     |  45 ++
 include/misc/ocxl.h                            | 214 ++++++++
 include/uapi/misc/ocxl.h                       |  49 ++
 34 files changed, 4650 insertions(+), 15 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-class-ocxl
 create mode 100644 Documentation/accelerators/ocxl.rst
 create mode 100644 arch/powerpc/include/asm/pnv-ocxl.h
 create mode 100644 arch/powerpc/platforms/powernv/ocxl.c
 create mode 100644 drivers/misc/ocxl/Kconfig
 create mode 100644 drivers/misc/ocxl/Makefile
 create mode 100644 drivers/misc/ocxl/afu_irq.c
 create mode 100644 drivers/misc/ocxl/config.c
 create mode 100644 drivers/misc/ocxl/context.c
 create mode 100644 drivers/misc/ocxl/file.c
 create mode 100644 drivers/misc/ocxl/link.c
 create mode 100644 drivers/misc/ocxl/main.c
 create mode 100644 drivers/misc/ocxl/ocxl_internal.h
 create mode 100644 drivers/misc/ocxl/pasid.c
 create mode 100644 drivers/misc/ocxl/pci.c
 create mode 100644 drivers/misc/ocxl/sysfs.c
 create mode 100644 drivers/misc/ocxl/trace.c
 create mode 100644 drivers/misc/ocxl/trace.h
 create mode 100644 include/misc/ocxl-config.h
 create mode 100644 include/misc/ocxl.h
 create mode 100644 include/uapi/misc/ocxl.h
Signature · 1 line
2.14.1