OSDN Git Service

memshare: Perform Hypervisor mapping for boot-time allotted memory
authorManoj Prabhu B <bmanoj@codeaurora.org>
Fri, 16 Jun 2017 05:25:30 +0000 (10:55 +0530)
committerGerrit - the friendly Code Review server <code-review@localhost>
Fri, 16 Jun 2017 09:21:47 +0000 (02:21 -0700)
The patch performs Hypervisor mapping for guaranteed memshare
client's alloted memory at boot time and prevent allocation
for clients with size zero.

CRs-Fixed: 2062478
Change-Id: I96cc7b2014693d97f11411a7b62d2c365f21caf1
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
drivers/soc/qcom/memshare/msm_memshare.c

index 7406dba..6dd4b06 100644 (file)
@@ -968,8 +968,8 @@ static int memshare_child_probe(struct platform_device *pdev)
   /*
    *   Memshare allocation for guaranteed clients
    */
-       if (memblock[num_clients].guarantee) {
-               if (client_id == 1 && size > 0)
+       if (memblock[num_clients].guarantee && size > 0) {
+               if (client_id == 1)
                        size += MEMSHARE_GUARD_BYTES;
                rc = memshare_alloc(memsh_child->dev,
                                size,
@@ -980,6 +980,7 @@ static int memshare_child_probe(struct platform_device *pdev)
                        return rc;
                }
                memblock[num_clients].alloted = 1;
+               shared_hyp_mapping(num_clients);
        }
 
        /*