]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
powerpc/powernv: Capture actag information for the device
authorFrederic Barrat <fbarrat@linux.vnet.ibm.com>
Tue, 23 Jan 2018 11:31:40 +0000 (12:31 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 27 Feb 2018 15:56:02 +0000 (09:56 -0600)
commit1558b51a649c5899e3e84bdba28b4a41f11c71de
tree00f7219bacadd69c21a62ff9b7d353037ce94f7b
parentbad9d1e845d8bd3ab6556dbebece320355e0dfd5
powerpc/powernv: Capture actag information for the device

BugLink: http://bugs.launchpad.net/bugs/1746988
In the opencapi protocol, host memory contexts are referenced by a
'actag'. During setup, a driver must tell the device how many actags
it can used, and what values are acceptable.

On POWER9, the NPU can handle 64 actags per link, so they must be
shared between all the PCI functions of the link. To get a global
picture of how many actags are used by each AFU of every function, we
capture some data at the end of PCI enumeration, so that actags can be
shared fairly if needed.

This is not powernv specific per say, but rather a consequence of the
opencapi configuration specification being quite general. The number
of available actags on POWER9 makes it more likely to be hit. This is
somewhat mitigated by the fact that existing AFUs are coded by
requesting a reasonable count of actags and existing devices carry
only one AFU.

Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit 2cb3d64b26984703a6bb80e66adcc3727ad37f9f)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/powerpc/include/asm/pnv-ocxl.h
arch/powerpc/platforms/powernv/ocxl.c
include/misc/ocxl-config.h [new file with mode: 0644]