Skip to content

Commit af25336

Browse files
JosephChen2017rkhuangtao
authored andcommitted
firmware: rockchip sip: add psci_smp_available check
We shouldn't call SMC if PSCI is not enabled. Change-Id: I362bea4ecb481b2eadcf6c481f016050e386eee0 Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
1 parent 2f8d635 commit af25336

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/firmware/rockchip_sip.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
#include <linux/io.h>
1616
#include <linux/rockchip/rockchip_sip.h>
1717
#include <asm/cputype.h>
18+
#ifdef CONFIG_ARM
19+
#include <asm/psci.h>
20+
#endif
1821
#include <asm/smp_plat.h>
1922
#include <uapi/linux/psci.h>
2023
#include <linux/ptrace.h>
@@ -308,6 +311,9 @@ static __init int sip_implement_version_init(void)
308311
{
309312
struct arm_smccc_res res;
310313

314+
if (!psci_smp_available())
315+
return 0;
316+
311317
res = __invoke_sip_fn_smc(SIP_SIP_VERSION, SIP_IMPLEMENT_V2,
312318
SECURE_REG_WR, 0);
313319
if (IS_SIP_ERROR(res.a0))

0 commit comments

Comments
 (0)