• Huang Ying's avatar
    ACPI, APEI, GHES, printk support for recoverable error via NMI · 67eb2e99
    Huang Ying authored
    Some APEI GHES recoverable errors are reported via NMI, but printk is
    not safe in NMI context.
    
    To solve the issue, a lock-less memory allocator is used to allocate
    memory in NMI handler, save the error record into the allocated
    memory, put the error record into a lock-less list.  On the other
    hand, an irq_work is used to delay the operation from NMI context to
    IRQ context.  The irq_work IRQ handler will remove nodes from
    lock-less list, printk the error record and do some further processing
    include recovery operation, then free the memory.
    Signed-off-by: default avatarHuang Ying <ying.huang@intel.com>
    Signed-off-by: default avatarLen Brown <len.brown@intel.com>
    67eb2e99
ghes.c 22.5 KB