[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] xen/arm: optee: Fix arm_smccc_smc's a0 for OPTEE_SMC_DISABLE_SHM_CACHE



commit 1c3ed9c908732d19660fbe83580674d585464d4c
Author:     Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
AuthorDate: Mon Sep 27 16:54:10 2021 +0300
Commit:     Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
CommitDate: Mon Sep 27 21:49:54 2021 -0700

    xen/arm: optee: Fix arm_smccc_smc's a0 for OPTEE_SMC_DISABLE_SHM_CACHE
    
    Fix a possible copy-paste error in arm_smccc_smc's first argument (a0)
    for OPTEE_SMC_DISABLE_SHM_CACHE case.
    
    This error causes Linux > v5.14-rc5 
(b5c10dd04b7418793517e3286cde5c04759a86de
    optee: Clear stale cache entries during initialization) to stuck
    repeatedly issuing OPTEE_SMC_DISABLE_SHM_CACHE call and waiting for
    the result to be OPTEE_SMC_RETURN_ENOTAVAIL which will never happen.
    
    Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
    Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
    Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
    Fixes: 2e35cdf9b2ca ("xen/arm: optee: add OP-TEE mediator skeleton")
    Backport: 4.13+
---
 xen/arch/arm/tee/optee.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/tee/optee.c b/xen/arch/arm/tee/optee.c
index 345361566e..6df0d44eb9 100644
--- a/xen/arch/arm/tee/optee.c
+++ b/xen/arch/arm/tee/optee.c
@@ -1692,7 +1692,7 @@ static bool optee_handle_call(struct cpu_user_regs *regs)
         return true;
 
     case OPTEE_SMC_DISABLE_SHM_CACHE:
-        arm_smccc_smc(OPTEE_SMC_ENABLE_SHM_CACHE, 0, 0, 0, 0, 0, 0,
+        arm_smccc_smc(OPTEE_SMC_DISABLE_SHM_CACHE, 0, 0, 0, 0, 0, 0,
                       OPTEE_CLIENT_ID(current->domain), &resp);
         set_user_reg(regs, 0, resp.a0);
         if ( resp.a0 == OPTEE_SMC_RETURN_OK ) {
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.