diff options
author | Puja Gupta <pujag@codeaurora.org> | 2017-02-02 13:41:04 -0800 |
---|---|---|
committer | Puja Gupta <pujag@codeaurora.org> | 2017-02-03 10:57:38 -0800 |
commit | c50f341bf3f916de321985c7f74ff48eaac60927 (patch) | |
tree | f6865cca44b423d9fa4b7689a2da5cf6767f13e2 /drivers/soc | |
parent | 8ae485387de561300993140e243e0d3022e35ebe (diff) |
soc: qcom: pil: Fix error case scenario in subsystem ramdump
During ramdump collection we assign memory to HLOS from subsystem for
non-secure pil. Whether ramdump collection is successful or not, we
should assign memory back to subsystem. This is to avoid access
violations in powerup path which happens after ramdump.
CRs-Fixed: 2002073
Change-Id: I7f1d42aebb44464fe077ca544ce91c2d7a8eefbb
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/qcom/peripheral-loader.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/soc/qcom/peripheral-loader.c b/drivers/soc/qcom/peripheral-loader.c index eaeb8d4776fe..2244c64d28af 100644 --- a/drivers/soc/qcom/peripheral-loader.c +++ b/drivers/soc/qcom/peripheral-loader.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2010-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 @@ -171,7 +171,11 @@ int pil_do_ramdump(struct pil_desc *desc, void *ramdump_dev) ret = do_elf_ramdump(ramdump_dev, ramdump_segs, count); kfree(ramdump_segs); - if (!ret && desc->subsys_vmid > 0) + if (ret) + pil_err(desc, "%s: Ramdump collection failed for subsys %s rc:%d\n", + __func__, desc->name, ret); + + if (desc->subsys_vmid > 0) ret = pil_assign_mem_to_subsys(desc, priv->region_start, (priv->region_end - priv->region_start)); |