drivers: soc: qcom: Expose dump collection state
Expose a sysfs entry to userspace to enable dump collection. Also add an api to expose the current dump collection state. Change-Id: I4adb385d35eca71263e86095b8f3de68243abded Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
This commit is contained in:
parent
dedefe9f7c
commit
ab898431a4
@ -16,6 +16,13 @@
|
||||
#include <linux/devcoredump.h>
|
||||
#include <linux/soc/qcom/mdt_loader.h>
|
||||
|
||||
static int enable_dump_collection;
|
||||
module_param(enable_dump_collection, int, 0644);
|
||||
|
||||
bool dump_enabled(void)
|
||||
{
|
||||
return enable_dump_collection;
|
||||
}
|
||||
|
||||
int qcom_dump(struct list_head *segs, struct device *dev)
|
||||
{
|
||||
|
@ -21,6 +21,7 @@ struct qcom_dump_segment {
|
||||
extern int qcom_elf_dump(struct list_head *segs, struct device *dev);
|
||||
extern int qcom_dump(struct list_head *head, struct device *dev);
|
||||
extern int qcom_fw_elf_dump(struct firmware *fw, struct device *dev);
|
||||
extern bool dump_enabled(void);
|
||||
#else
|
||||
static inline int qcom_elf_dump(struct list_head *segs, struct device *dev)
|
||||
{
|
||||
@ -34,6 +35,10 @@ static inline int qcom_fw_elf_dump(struct firmware *fw, struct device *dev)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
static inline bool dump_enabled(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif /* CONFIG_QCOM_RAMDUMP */
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user