[PATCH net-next v5 1/3] vmcore: add API to collect hardware dump in second kernel

2018-04-21 Thread Rahul Lakkireddy
The sequence of actions done by device drivers to append their device specific hardware/firmware logs to /proc/vmcore are as follows: 1. During probe (before hardware is initialized), device drivers register to the vmcore module (via vmcore_add_device_dump()), with callback function, along with bu

[PATCH net-next v5 3/3] cxgb4: collect hardware dump in second kernel

2018-04-21 Thread Rahul Lakkireddy
Register callback to collect hardware/firmware dumps in second kernel before hardware/firmware is initialized. The dumps for each device will be available as elf notes in /proc/vmcore in second kernel. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar --- v5: - No changes. v4: - No c

[PATCH net-next v5 2/3] vmcore: append device dumps to vmcore as elf notes

2018-04-21 Thread Rahul Lakkireddy
Update read and mmap logic to append device dumps as additional notes before the other elf notes. We add device dumps before other elf notes because the other elf notes may not fill the elf notes buffer completely and we will end up with zero-filled data between the elf notes and the device dumps.

[PATCH net-next v5 0/3] kernel: add support to collect hardware logs in crash recovery kernel

2018-04-21 Thread Rahul Lakkireddy
On production servers running variety of workloads over time, kernel panic can happen sporadically after days or even months. It is important to collect as much debug logs as possible to root cause and fix the problem, that may not be easy to reproduce. Snapshot of underlying hardware/firmware stat