[Skiboot] [PATCH v2 0/3] npu2: Hook up data link interrupts
sam.bobroff at au1.ibm.com
Fri Aug 18 13:52:55 AEST 2017
Here's a patch to configure the NPU2 to generate XIVE interrupts and pass the
"recoverable data link" (also called "No-Stall") interrupts to Linux via
emulated PCI devices.
Because the emulated devices were already being created, it consists mostly of
acquiring a XIVE trigger page, writing it's address into a register in the NPU2
and creating the interrupt mapping properties in the device tree.
I've also added a new byte to the vendor capabilities section of the emulated
PCI devices; writes to it are passed through to the NPU2_MISC_IRQ_REQUEST
register where they cause the device to trigger an interrupt. It's not perfect,
because writing to that capability on two devices at once can cause one of the
interrupts to be lost (because of my simplistic implementation) but it can be
useful for testing.
I have a simple PCI kernel driver that can be used to access that capability
via some debugfs files. Would it be useful to put it somewhere?
And finally, I changed 'NPU' to 'NPU2' in several comments and prints to make
things clearer in the code and debug output.
Patch set changelog follows:
====== Version 1 -> version 2: ======
Patch 1/3: npu2: Update NPU to NPU2 in comments and messages
* Patch added.
Patch 2/3: npu2: Enable recoverable data link (no-stall) interrupts
* Use p->total_devices instead of manually counting them.
* Moved NPU -> NPU2 changes into a separate patch.
* Moved interrupt testing code into a separate patch.
Patch 3/3: npu2: Add vendor cap for IRQ testing
* Patch added.
Sam Bobroff (3):
npu2: Update NPU to NPU2 in comments and messages
npu2: Enable recoverable data link (no-stall) interrupts
npu2: Add vendor cap for IRQ testing
hw/npu2.c | 190 ++++++++++++++++++++++++++++++++++++++++++++--------
include/npu2-regs.h | 10 +++
2 files changed, 172 insertions(+), 28 deletions(-)
More information about the Skiboot