]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
cxl: Add AFU virtual PHB and kernel API
authorMichael Neuling <mikey@neuling.org>
Wed, 27 May 2015 06:07:18 +0000 (16:07 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 3 Jun 2015 03:27:20 +0000 (13:27 +1000)
commit6f7f0b3df6d49316c6f27390bb5ec250255be548
tree28c8e7d088f936e08a66344c723003b71a5ca29b
parent0520336afe5de76324c73f793bc40732e5c13359
cxl: Add AFU virtual PHB and kernel API

This patch does two things.

Firstly it presents the Accelerator Function Unit (AFUs) behind the POWER
Service Layer (PSL) as PCI devices on a virtual PCI Host Bridge (vPHB).  This
in in addition to the PSL being a PCI device itself.

As part of the Coherent Accelerator Interface Architecture (CAIA) AFUs can
provide an AFU configuration.  This AFU configuration recored is architected to
be the same as a PCI config space.

This patch sets discovers the AFU configuration records, provides AFU config
space read/write functions to these configuration records.  It then enumerates
the PCI bus.  It also hooks in PCI ops where appropriate.  It also destroys the
vPHB when the physical card is removed.

Secondly, it add an in kernel API for AFU to use CXL.  AFUs must present a
driver that firstly binds as a PCI device.  This PCI device can then be using
to do CXL specific operations (that can't sit in the PCI ops) using this API.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/misc/cxl/Makefile
drivers/misc/cxl/api.c [new file with mode: 0644]
drivers/misc/cxl/cxl.h
drivers/misc/cxl/pci.c
drivers/misc/cxl/vphb.c [new file with mode: 0644]
include/misc/cxl.h [new file with mode: 0644]