Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx> --- lib/arm/asm/psci.h | 6 ++---- lib/arm/psci.c | 10 +++++++--- lib/arm64/asm/psci.h | 16 +--------------- 3 files changed, 10 insertions(+), 22 deletions(-) diff --git a/lib/arm/asm/psci.h b/lib/arm/asm/psci.h index 11ac45028d78..eeb55cf299d1 100644 --- a/lib/arm/asm/psci.h +++ b/lib/arm/asm/psci.h @@ -3,10 +3,8 @@ #include <libcflat.h> #include <linux/psci.h> -#define PSCI_INVOKE_ARG_TYPE u32 -#define PSCI_FN_CPU_ON PSCI_0_2_FN_CPU_ON - -extern int psci_invoke(u32 function_id, u32 arg0, u32 arg1, u32 arg2); +extern int psci_invoke(unsigned long function_id, unsigned long arg0, + unsigned long arg1, unsigned long arg2); extern int psci_cpu_on(unsigned long cpuid, unsigned long entry_point); extern void psci_sys_reset(void); extern int cpu_psci_cpu_boot(unsigned int cpu); diff --git a/lib/arm/psci.c b/lib/arm/psci.c index aca88851171f..a14acddeefd3 100644 --- a/lib/arm/psci.c +++ b/lib/arm/psci.c @@ -10,9 +10,9 @@ #include <asm/setup.h> #include <asm/page.h> -#define T PSCI_INVOKE_ARG_TYPE __attribute__((noinline)) -int psci_invoke(T function_id, T arg0, T arg1, T arg2) +int psci_invoke(unsigned long function_id, unsigned long arg0, + unsigned long arg1, unsigned long arg2) { asm volatile( "hvc #0" @@ -23,7 +23,11 @@ int psci_invoke(T function_id, T arg0, T arg1, T arg2) int psci_cpu_on(unsigned long cpuid, unsigned long entry_point) { - return psci_invoke(PSCI_FN_CPU_ON, cpuid, entry_point, 0); +#ifdef __arm__ + return psci_invoke(PSCI_0_2_FN_CPU_ON, cpuid, entry_point, 0); +#else + return psci_invoke(PSCI_0_2_FN64_CPU_ON, cpuid, entry_point, 0); +#endif } extern void secondary_entry(void); diff --git a/lib/arm64/asm/psci.h b/lib/arm64/asm/psci.h index 0a7d7c854e2b..783b36ef579e 100644 --- a/lib/arm64/asm/psci.h +++ b/lib/arm64/asm/psci.h @@ -1,15 +1 @@ -#ifndef _ASMARM64_PSCI_H_ -#define _ASMARM64_PSCI_H_ -#include <libcflat.h> -#include <linux/psci.h> - -#define PSCI_INVOKE_ARG_TYPE u64 -#define PSCI_FN_CPU_ON PSCI_0_2_FN64_CPU_ON - -extern int psci_invoke(u64 function_id, u64 arg0, u64 arg1, u64 arg2); -extern int psci_cpu_on(unsigned long cpuid, unsigned long entry_point); -extern void psci_sys_reset(void); -extern int cpu_psci_cpu_boot(unsigned int cpu); -extern void cpu_psci_cpu_die(unsigned int cpu); - -#endif /* _ASMARM64_PSCI_H_ */ +#include "../../arm/asm/psci.h" -- 2.9.4