diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2017-01-30 07:05:07 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-01-30 07:05:07 -0800 |
commit | 0f01552919f6b721e52ce439e76066ea536b5202 (patch) | |
tree | e8c76cc7781f877093a5e34b91e1436143eb25ca /drivers/soc | |
parent | 3f2738720d7668f8aa8f7036cd38dee3c495c8fc (diff) | |
parent | e4198e7ad105375667f7a14c5453ec4feff2cb1d (diff) |
Merge "memshare: Fix parameters to collect ramdump"
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/qcom/memshare/msm_memshare.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/soc/qcom/memshare/msm_memshare.c b/drivers/soc/qcom/memshare/msm_memshare.c index 5726c3277456..76f9ed046120 100644 --- a/drivers/soc/qcom/memshare/msm_memshare.c +++ b/drivers/soc/qcom/memshare/msm_memshare.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -38,6 +38,7 @@ static void mem_share_svc_recv_msg(struct work_struct *work); static DECLARE_DELAYED_WORK(work_recv_msg, mem_share_svc_recv_msg); static struct workqueue_struct *mem_share_svc_workqueue; static uint64_t bootup_request; +static bool ramdump_event; static void *memshare_ramdump_dev[MAX_CLIENTS]; static struct device *memshare_dev[MAX_CLIENTS]; @@ -337,18 +338,25 @@ static int modem_notifier_cb(struct notifier_block *this, unsigned long code, bootup_request++; break; + case SUBSYS_RAMDUMP_NOTIFICATION: + ramdump_event = 1; + break; + case SUBSYS_BEFORE_POWERUP: - if (_cmd) + if (_cmd) { notifdata = (struct notif_data *) _cmd; - else + } else { + ramdump_event = 0; break; + } - if (notifdata->enable_ramdump) { + if (notifdata->enable_ramdump && ramdump_event) { pr_info("memshare: %s, Ramdump collection is enabled\n", __func__); ret = mem_share_do_ramdump(); if (ret) pr_err("Ramdump collection failed\n"); + ramdump_event = 0; } break; |