[Skiboot] [PATCH v3 0/3] npu2: Hook up data link interrupts

Sam Bobroff sam.bobroff at au1.ibm.com
Tue Aug 22 09:57:58 AEST 2017


Hi Skibooters,

[Note: Here is v3, which just has a few documentation fixes.]

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.

Cheers,
Sam.

Patch set changelog follows:

====== v2 -> v3: ======

Patch 1/3: npu2: Add vendor cap for IRQ testing

Patch 2/3: npu2: Enable recoverable data link (no-stall) interrupts

Patch 3/3: npu2: Update NPU to NPU2 in comments and messages
* Corrected name of NPU RING (no 2). [Andrew Donnellan]
* Corrected spelling of device. [Andrew Donnellan]

====== v1 -> v2: ======

Patch 1/3: npu2: Add vendor cap for IRQ testing
* New in this version.

Patch 2/3 (was 1/1): 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: Update NPU to NPU2 in comments and messages
* New in this version.

====== v1: ======

Patch 1/1: npu2: Enable recoverable data link (no-stall) interrupts

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(-)

-- 
2.14.1.2.g4274c698f



More information about the Skiboot mailing list