• Russell Currey's avatar
    powerpc/powernv/pci: Dynamically allocate PHB diag data · 5cb1f8fd
    Russell Currey authored
    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: default avatarRussell Currey <ruscur@russell.cc>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    5cb1f8fd
eeh-powernv.c 46.8 KB