Loading drivers/misc/qseecom.c +0 −39 Original line number Diff line number Diff line Loading @@ -3944,10 +3944,8 @@ static int qseecom_load_external_elf(struct qseecom_dev_handle *data, struct ion_handle *ihandle; /* Ion handle */ struct qseecom_load_img_req load_img_req; int ret; int set_cpu_ret = 0; ion_phys_addr_t pa = 0; size_t len; struct cpumask mask; struct qseecom_load_app_ireq load_req; struct qseecom_load_app_64bit_ireq load_req_64bit; struct qseecom_command_scm_resp resp; Loading Loading @@ -3992,15 +3990,6 @@ static int qseecom_load_external_elf(struct qseecom_dev_handle *data, cmd_buf = (void *)&load_req_64bit; cmd_len = sizeof(struct qseecom_load_app_64bit_ireq); } /* SCM_CALL tied to Core0 */ mask = CPU_MASK_CPU0; set_cpu_ret = set_cpus_allowed_ptr(current, &mask); if (set_cpu_ret) { pr_err("set_cpus_allowed_ptr failed : ret %d\n", set_cpu_ret); ret = -EFAULT; goto exit_ion_free; } if (qseecom.support_bus_scaling) { mutex_lock(&qsee_bw_mutex); Loading Loading @@ -4061,15 +4050,6 @@ exit_register_bus_bandwidth_needs: } exit_cpu_restore: /* Restore the CPU mask */ mask = CPU_MASK_ALL; set_cpu_ret = set_cpus_allowed_ptr(current, &mask); if (set_cpu_ret) { pr_err("set_cpus_allowed_ptr failed to restore mask: ret %d\n", set_cpu_ret); ret = -EFAULT; } exit_ion_free: /* Deallocate the handle */ if (!IS_ERR_OR_NULL(ihandle)) ion_free(qseecom.ion_clnt, ihandle); Loading @@ -4079,10 +4059,8 @@ exit_ion_free: static int qseecom_unload_external_elf(struct qseecom_dev_handle *data) { int ret = 0; int set_cpu_ret = 0; struct qseecom_command_scm_resp resp; struct qseecom_unload_app_ireq req; struct cpumask mask; /* unavailable client app */ data->type = QSEECOM_UNAVAILABLE_CLIENT_APP; Loading @@ -4090,15 +4068,6 @@ static int qseecom_unload_external_elf(struct qseecom_dev_handle *data) /* Populate the structure for sending scm call to unload image */ req.qsee_cmd_id = QSEOS_UNLOAD_EXTERNAL_ELF_COMMAND; /* SCM_CALL tied to Core0 */ mask = CPU_MASK_CPU0; ret = set_cpus_allowed_ptr(current, &mask); if (ret) { pr_err("set_cpus_allowed_ptr failed : ret %d\n", ret); return -EFAULT; } /* SCM_CALL to unload the external elf */ ret = qseecom_scm_call(SCM_SVC_TZSCHEDULER, 1, &req, sizeof(struct qseecom_unload_app_ireq), Loading @@ -4123,14 +4092,6 @@ static int qseecom_unload_external_elf(struct qseecom_dev_handle *data) } qseecom_unload_external_elf_scm_err: /* Restore the CPU mask */ mask = CPU_MASK_ALL; set_cpu_ret = set_cpus_allowed_ptr(current, &mask); if (set_cpu_ret) { pr_err("set_cpus_allowed_ptr failed to restore mask: ret %d\n", set_cpu_ret); ret = -EFAULT; } return ret; } Loading Loading
drivers/misc/qseecom.c +0 −39 Original line number Diff line number Diff line Loading @@ -3944,10 +3944,8 @@ static int qseecom_load_external_elf(struct qseecom_dev_handle *data, struct ion_handle *ihandle; /* Ion handle */ struct qseecom_load_img_req load_img_req; int ret; int set_cpu_ret = 0; ion_phys_addr_t pa = 0; size_t len; struct cpumask mask; struct qseecom_load_app_ireq load_req; struct qseecom_load_app_64bit_ireq load_req_64bit; struct qseecom_command_scm_resp resp; Loading Loading @@ -3992,15 +3990,6 @@ static int qseecom_load_external_elf(struct qseecom_dev_handle *data, cmd_buf = (void *)&load_req_64bit; cmd_len = sizeof(struct qseecom_load_app_64bit_ireq); } /* SCM_CALL tied to Core0 */ mask = CPU_MASK_CPU0; set_cpu_ret = set_cpus_allowed_ptr(current, &mask); if (set_cpu_ret) { pr_err("set_cpus_allowed_ptr failed : ret %d\n", set_cpu_ret); ret = -EFAULT; goto exit_ion_free; } if (qseecom.support_bus_scaling) { mutex_lock(&qsee_bw_mutex); Loading Loading @@ -4061,15 +4050,6 @@ exit_register_bus_bandwidth_needs: } exit_cpu_restore: /* Restore the CPU mask */ mask = CPU_MASK_ALL; set_cpu_ret = set_cpus_allowed_ptr(current, &mask); if (set_cpu_ret) { pr_err("set_cpus_allowed_ptr failed to restore mask: ret %d\n", set_cpu_ret); ret = -EFAULT; } exit_ion_free: /* Deallocate the handle */ if (!IS_ERR_OR_NULL(ihandle)) ion_free(qseecom.ion_clnt, ihandle); Loading @@ -4079,10 +4059,8 @@ exit_ion_free: static int qseecom_unload_external_elf(struct qseecom_dev_handle *data) { int ret = 0; int set_cpu_ret = 0; struct qseecom_command_scm_resp resp; struct qseecom_unload_app_ireq req; struct cpumask mask; /* unavailable client app */ data->type = QSEECOM_UNAVAILABLE_CLIENT_APP; Loading @@ -4090,15 +4068,6 @@ static int qseecom_unload_external_elf(struct qseecom_dev_handle *data) /* Populate the structure for sending scm call to unload image */ req.qsee_cmd_id = QSEOS_UNLOAD_EXTERNAL_ELF_COMMAND; /* SCM_CALL tied to Core0 */ mask = CPU_MASK_CPU0; ret = set_cpus_allowed_ptr(current, &mask); if (ret) { pr_err("set_cpus_allowed_ptr failed : ret %d\n", ret); return -EFAULT; } /* SCM_CALL to unload the external elf */ ret = qseecom_scm_call(SCM_SVC_TZSCHEDULER, 1, &req, sizeof(struct qseecom_unload_app_ireq), Loading @@ -4123,14 +4092,6 @@ static int qseecom_unload_external_elf(struct qseecom_dev_handle *data) } qseecom_unload_external_elf_scm_err: /* Restore the CPU mask */ mask = CPU_MASK_ALL; set_cpu_ret = set_cpus_allowed_ptr(current, &mask); if (set_cpu_ret) { pr_err("set_cpus_allowed_ptr failed to restore mask: ret %d\n", set_cpu_ret); ret = -EFAULT; } return ret; } Loading