From 51bfb5b6f522b1fbe453c18df03648d72b08131f Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 16 Aug 2016 21:08:46 +0200 Subject: arm: Disable HVC PSCI calls by default All systems that are running on armv8 are running bare metal with firmware that implements PSCI running in EL3. That means we don't really need to expose the hypercall variants of them. This patch leaves the code in, but makes the code explicit enough to have the compiler optimize it out. With this we don't need to worry about hvc vs smc calling convention when calling psci helper functions. Signed-off-by: Alexander Graf Reviewed-by: Simon Glass --- arch/arm/include/asm/system.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'arch/arm/include/asm/system.h') diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index c18e1e3a10e..5166c653f34 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -106,15 +106,6 @@ void smp_kick_all_cpus(void); void flush_l3_cache(void); -/* - *Issue a hypervisor call in accordance with ARM "SMC Calling convention", - * DEN0028A - * - * @args: input and output arguments - * - */ -void hvc_call(struct pt_regs *args); - /* *Issue a secure monitor call in accordance with ARM "SMC Calling convention", * DEN0028A @@ -124,7 +115,7 @@ void hvc_call(struct pt_regs *args); */ void smc_call(struct pt_regs *args); -void __noreturn psci_system_reset(bool smc); +void __noreturn psci_system_reset(void); #endif /* __ASSEMBLY__ */ -- cgit v1.2.3 From 3ee655ed83ada67912cbbd14b6685bc0c7102553 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 16 Aug 2016 21:08:47 +0200 Subject: arm: Add PSCI shutdown function Using PSCI you can not only reset the system, you can also shut it down! This patch exposes a function to do exactly that to whatever code wants to make use of it. Signed-off-by: Alexander Graf Reviewed-by: Simon Glass --- arch/arm/include/asm/system.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/include/asm/system.h') diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 5166c653f34..b928bd8d174 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -116,6 +116,7 @@ void flush_l3_cache(void); void smc_call(struct pt_regs *args); void __noreturn psci_system_reset(void); +void __noreturn psci_system_off(void); #endif /* __ASSEMBLY__ */ -- cgit v1.2.3