Loading drivers/soc/qcom/memshare/msm_memshare.c +11 −8 Original line number Diff line number Diff line /* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2018, 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 Loading Loading @@ -375,6 +375,7 @@ static int modem_notifier_cb(struct notifier_block *this, unsigned long code, if (memblock[i].peripheral == DHMS_MEM_PROC_MPSS_V01 && !memblock[i].guarantee && !memblock[i].client_request && memblock[i].alloted) { pr_debug("memshare: Freeing memory for client id: %d\n", memblock[i].client_id); Loading Loading @@ -630,12 +631,10 @@ static int handle_free_generic_req(void *req_h, void *req, void *conn_h) __func__); flag = 1; } else if (!memblock[client_id].guarantee && memblock[client_id].client_request && memblock[client_id].alloted) { pr_debug("In %s: pblk->virtual_addr :%lx, pblk->phy_addr: %lx\n,size: %d", __func__, (unsigned long int) memblock[client_id].virtual_addr, (unsigned long int)memblock[client_id].phy_addr, pr_debug("memshare: %s: client_id:%d, size: %d", __func__, client_id, memblock[client_id].size); dma_free_attrs(memsh_drv->dev, memblock[client_id].size, memblock[client_id].virtual_addr, Loading @@ -643,8 +642,8 @@ static int handle_free_generic_req(void *req_h, void *req, void *conn_h) &attrs); free_client(client_id); } else { pr_err("In %s, Request came for a guaranteed client cannot free up the memory\n", __func__); pr_err("In %s, Request came for a guaranteed client(client_id: %d) cannot free up the memory\n", __func__, client_id); } if (flag) { Loading Loading @@ -947,6 +946,10 @@ static int memshare_child_probe(struct platform_device *pdev) pdev->dev.of_node, "qcom,allocate-boot-time"); memblock[num_clients].client_request = of_property_read_bool( pdev->dev.of_node, "qcom,allocate-on-request"); rc = of_property_read_string(pdev->dev.of_node, "label", &name); if (rc) { Loading drivers/soc/qcom/memshare/msm_memshare.h +3 −1 Original line number Diff line number Diff line /* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2018, 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 Loading Loading @@ -39,6 +39,8 @@ struct mem_blocks { uint32_t guarantee; /* Memory alloted or not */ uint32_t alloted; /* Allocation on request from a client*/ uint32_t client_request; /* Size required for client */ uint32_t size; /* Loading Loading
drivers/soc/qcom/memshare/msm_memshare.c +11 −8 Original line number Diff line number Diff line /* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2018, 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 Loading Loading @@ -375,6 +375,7 @@ static int modem_notifier_cb(struct notifier_block *this, unsigned long code, if (memblock[i].peripheral == DHMS_MEM_PROC_MPSS_V01 && !memblock[i].guarantee && !memblock[i].client_request && memblock[i].alloted) { pr_debug("memshare: Freeing memory for client id: %d\n", memblock[i].client_id); Loading Loading @@ -630,12 +631,10 @@ static int handle_free_generic_req(void *req_h, void *req, void *conn_h) __func__); flag = 1; } else if (!memblock[client_id].guarantee && memblock[client_id].client_request && memblock[client_id].alloted) { pr_debug("In %s: pblk->virtual_addr :%lx, pblk->phy_addr: %lx\n,size: %d", __func__, (unsigned long int) memblock[client_id].virtual_addr, (unsigned long int)memblock[client_id].phy_addr, pr_debug("memshare: %s: client_id:%d, size: %d", __func__, client_id, memblock[client_id].size); dma_free_attrs(memsh_drv->dev, memblock[client_id].size, memblock[client_id].virtual_addr, Loading @@ -643,8 +642,8 @@ static int handle_free_generic_req(void *req_h, void *req, void *conn_h) &attrs); free_client(client_id); } else { pr_err("In %s, Request came for a guaranteed client cannot free up the memory\n", __func__); pr_err("In %s, Request came for a guaranteed client(client_id: %d) cannot free up the memory\n", __func__, client_id); } if (flag) { Loading Loading @@ -947,6 +946,10 @@ static int memshare_child_probe(struct platform_device *pdev) pdev->dev.of_node, "qcom,allocate-boot-time"); memblock[num_clients].client_request = of_property_read_bool( pdev->dev.of_node, "qcom,allocate-on-request"); rc = of_property_read_string(pdev->dev.of_node, "label", &name); if (rc) { Loading
drivers/soc/qcom/memshare/msm_memshare.h +3 −1 Original line number Diff line number Diff line /* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2018, 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 Loading Loading @@ -39,6 +39,8 @@ struct mem_blocks { uint32_t guarantee; /* Memory alloted or not */ uint32_t alloted; /* Allocation on request from a client*/ uint32_t client_request; /* Size required for client */ uint32_t size; /* Loading