linux_dsm_epyc7002/drivers/misc/cxl
Ian Munsie 292841b096 cxl: Update process element after allocating interrupts
In the kernel API, it is possible to attempt to allocate AFU interrupts
after already starting a context. Since the process element structure
used by the hardware is only filled out at the time the context is
started, it will not be updated with the interrupt numbers that have
just been allocated and therefore AFU interrupts will not work unless
they were allocated prior to starting the context.

This can present some difficulties as each CAPI enabled PCI device in
the kernel API has a default context, which may need to be started very
early to enable translations, potentially before interrupts can easily
be set up.

This patch makes the API more flexible to allow interrupts to be
allocated after a context has already been started and takes care of
updating the PE structure used by the hardware and notifying it to
discard any cached copy it may have.

The update is currently performed via a terminate/remove/add sequence.
This is necessary on some hardware such as the XSL that does not
properly support the update LLCMD.

Note that this is only supported on powernv at present - attempting to
perform this ordering on PowerVM will raise a warning.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2016-06-16 23:08:49 +10:00
..
api.c cxl: Update process element after allocating interrupts 2016-06-16 23:08:49 +10:00
base.c cxl: Parse device tree and create cxl device(s) at boot 2016-03-09 23:39:59 +11:00
context.c powerpc updates for 4.7 2016-05-20 10:12:41 -07:00
cxl.h cxl: Update process element after allocating interrupts 2016-06-16 23:08:49 +10:00
debugfs.c cxl: Isolate a few bare-metal-specific calls 2016-03-09 13:05:47 +11:00
fault.c powerpc/mm: Replace _PAGE_USER with _PAGE_PRIVILEGED 2016-05-01 18:32:26 +10:00
file.c cxl: Adapter failure handling 2016-03-09 23:40:00 +11:00
flash.c cxl: static-ify variables to fix sparse warnings 2016-06-16 22:49:27 +10:00
guest.c cxl: Update process element after allocating interrupts 2016-06-16 23:08:49 +10:00
hcalls.c cxl: Add tracepoints around the cxl hcall 2016-03-09 23:40:01 +11:00
hcalls.h cxl: Add guest-specific code 2016-03-09 23:36:52 +11:00
irq.c cxl: Keep IRQ mappings on context teardown 2016-04-27 12:04:31 +10:00
Kconfig cxl: Add CONFIG_CXL_EEH symbol 2015-08-17 13:56:29 +10:00
main.c cxl: Adapter failure handling 2016-03-09 23:40:00 +11:00
Makefile cxl: Support to flash a new image on the adapter from a guest 2016-03-09 23:39:56 +11:00
native.c cxl: Update process element after allocating interrupts 2016-06-16 23:08:49 +10:00
of.c cxl: Add guest-specific code 2016-03-09 23:36:52 +11:00
pci.c cxl: Increase timeout for detection of AFU mmio hang 2016-04-22 21:45:50 +10:00
sysfs.c cxl: Allow initialization on timebase sync failures 2016-04-22 21:45:44 +10:00
trace.c cxl: Add tracepoints 2015-01-22 17:31:51 +11:00
trace.h cxl: Add tracepoints around the cxl hcall 2016-03-09 23:40:01 +11:00
vphb.c cxl: Ignore probes for virtual afu pci devices 2016-03-09 23:40:03 +11:00