remoteproc: Add inline coredump functionality
authorRishabh Bhatnagar <rishabhb@codeaurora.org>
Thu, 16 Jul 2020 22:20:34 +0000 (15:20 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 21 Jul 2020 21:03:57 +0000 (14:03 -0700)
commitc97319881c9116dc7c56dd30115567b4078c4ba6
tree3f58d37590ba18bf8f7954a076b51ad40b27408b
parent76abf9cea6c8215ea45b9359f11f0e30127c544a
remoteproc: Add inline coredump functionality

The current coredump implementation uses vmalloc area to copy
all the segments. But this might put strain on low memory targets
as the firmware size sometimes is in tens of MBs. The situation
becomes worse if there are multiple remote processors undergoing
recovery at the same time. This patch adds inline coredump
functionality that avoids extra memory usage. This requires
recovery to be halted until data is read by userspace and free
function is called.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Sibi Sankar <sibis@codeaurora.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Tested-by: Sibi Sankar <sibis@codeaurora.org>
Link: https://lore.kernel.org/r/1594938035-7327-5-git-send-email-rishabhb@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/remoteproc_coredump.c
include/linux/remoteproc.h