]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv/pci: Dynamically allocate PHB diag data
authorRussell Currey <ruscur@russell.cc>
Wed, 14 Jun 2017 04:19:59 +0000 (14:19 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 27 Jun 2017 02:14:27 +0000 (12:14 +1000)
commit2a07c503c7fb17d9dbbd2e351408a01c0ae2514b
treef8b476a1af9cacc476f11cce0675c99c1f69296b
parentfdc59f7aa3f59dabc87a82e00de38117d2db3473
powerpc/powernv/pci: Dynamically allocate PHB diag data

Diagnostic data for PHBs currently works by allocated a fixed-sized buffer.
This is simple, but either wastes memory (though only a few kilobytes) or
in the case of PHB4 isn't enough to fit the whole data blob.

For machines that don't describe the diagnostic data size in the device
tree, use the hardcoded buffer size as before.  For those that do, only
allocate exactly what's needed.

In the special case of P7IOC (which has two types of diag data), the larger
should be specified in the device tree.

Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/eeh-powernv.c
arch/powerpc/platforms/powernv/pci-ioda.c
arch/powerpc/platforms/powernv/pci.c
arch/powerpc/platforms/powernv/pci.h