• Oliver O'Halloran's avatar
    powerpc/eeh: Add debugfs interface to run an EEH check · 22cda7c1
    Oliver O'Halloran authored
    Detecting an frozen EEH PE usually occurs when an MMIO load returns a 0xFFs
    response. When performing EEH testing using the EEH error injection feature
    available on some platforms there is no simple way to kick-off the kernel's
    recovery process since any accesses from userspace (usually /dev/mem) will
    bypass the MMIO helpers in the kernel which check if a 0xFF response is due
    to an EEH freeze or not.
    
    If a device contains a 0xFF byte in it's config space it's possible to
    trigger the recovery process via config space read from userspace, but this
    is not a reliable method. If a driver is bound to the device an in use it
    will frequently trigger the MMIO check, but this is also inconsistent.
    
    To solve these problems this patch adds a debugfs file called
    "eeh_dev_check" which accepts a <domain>:<bus>:<dev>.<fn> string and runs
    eeh_dev_check_failure() on it. This is the same check that's done when the
    kernel gets a 0xFF result from an config or MMIO read with the added
    benifit that it can be reliably triggered from userspace.
    Signed-off-by: default avatarOliver O'Halloran <oohall@gmail.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20190903101605.2890-13-oohall@gmail.com
    22cda7c1
eeh.c 50.8 KB