Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 281e0780 authored by Vikram Mulukutla's avatar Vikram Mulukutla
Browse files

soc: qcom: scm-xpu: Add support for the new scm_call2 API



The scm library has added support for a new secure world
interface that is more aligned to the ARMv8 SMC calling
convention. Use the new API while maintaining backward
compatibility.

Change-Id: I108e4bb968e44a7e8a81033f8f1a837e4abad25a
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
parent 7adfdd78
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2014, 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
@@ -27,11 +27,17 @@ static int __init xpu_err_fatal_init(void)
		unsigned int config;
		unsigned int spare;
	} cmd;
	cmd.config = ERR_FATAL_ENABLE;
	cmd.spare = 0;
	struct scm_desc desc = {0};

	ret = scm_call(SCM_SVC_MP, XPU_ERR_FATAL, &cmd, sizeof(cmd), &response,
			sizeof(response));
	desc.arginfo = SCM_ARGS(2);
	desc.args[0] = cmd.config = ERR_FATAL_ENABLE;
	desc.args[1] = cmd.spare = 0;

	if (!is_scm_armv8())
		ret = scm_call(SCM_SVC_MP, XPU_ERR_FATAL, &cmd, sizeof(cmd),
				&response, sizeof(response));
	else
		ret = scm_call2(SCM_SIP_FNID(SCM_SVC_MP, XPU_ERR_FATAL), &desc);

	if (ret != 0)
		pr_warn("Failed to set XPU violations as fatal errors: %d\n",