diff options
author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-12-19 02:38:46 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-12-19 02:38:46 -0800 |
commit | 373476f581b02018e8e62ac6eac2a0fbb4a203b1 (patch) | |
tree | 9e3ecc45c3e732422bae20ba8681fef57cb1978b | |
parent | e93990b7d79b929f94d6ffa726428c21fd470e5f (diff) | |
parent | b4cbbb383034297fa6d2762cf72d995956e3c67f (diff) |
Merge "msm: ipa: fix IPC low priority logging"LE.UM.2.3.2-09301-SDX24LE.UM.2.3.2-09300-SDX24
-rw-r--r-- | drivers/platform/msm/ipa/ipa_v2/ipa_debugfs.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/platform/msm/ipa/ipa_v2/ipa_debugfs.c b/drivers/platform/msm/ipa/ipa_v2/ipa_debugfs.c index c018fc957fb2..a297f24c73c6 100644 --- a/drivers/platform/msm/ipa/ipa_v2/ipa_debugfs.c +++ b/drivers/platform/msm/ipa/ipa_v2/ipa_debugfs.c @@ -132,6 +132,7 @@ static struct dentry *dfile_ipa_poll_iteration; static char dbg_buff[IPA_MAX_MSG_LEN]; static char *active_clients_buf; static s8 ep_reg_idx; +static void *ipa_ipc_low_buff; int _ipa_read_gen_reg_v1_1(char *buff, int max_len) { @@ -1834,23 +1835,20 @@ static ssize_t ipa_enable_ipc_low(struct file *file, if (kstrtos8(dbg_buff, 0, &option)) return -EFAULT; + mutex_lock(&ipa_ctx->lock); if (option) { - if (!ipa_ctx->logbuf_low) { - ipa_ctx->logbuf_low = + if (!ipa_ipc_low_buff) { + ipa_ipc_low_buff = ipc_log_context_create(IPA_IPC_LOG_PAGES, "ipa_low", 0); + if (ipa_ipc_low_buff == NULL) + IPAERR("failed to get logbuf_low\n"); } - - if (ipa_ctx->logbuf_low == NULL) { - IPAERR("failed to get logbuf_low\n"); - return -EFAULT; - } - + ipa_ctx->logbuf_low = ipa_ipc_low_buff; } else { - if (ipa_ctx->logbuf_low) - ipc_log_context_destroy(ipa_ctx->logbuf_low); - ipa_ctx->logbuf_low = NULL; + ipa_ctx->logbuf_low = NULL; } + mutex_unlock(&ipa_ctx->lock); return count; } |