xen/arm: psci: use SMC64 function ID when available on ARM64

As per PSCI 0.2 spec, if CPU_ON entry_point_address is 64-bit then SMC
call function ID parameter should be set to SMC64 version.

Signed-off-by: Brijesh Singh <brijeshkumar.singh@amd.com>
Reviewed-by: Julien grall <julien.grall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Brijesh Singh authored and Ian Campbell committed 2015-10-07 12:16:16 +01:00
1 parent 5dfa6eade5
commit 75c7de56df
1 file changed
+13 -1
+13 -1
View File
@@ -23,6 +23,18 @@
#include <xen/smp.h>
#include <asm/psci.h>
/*
* While a 64-bit OS can make calls with SMC32 calling conventions, for
* some calls it is necessary to use SMC64 to pass or return 64-bit values.
* For such calls PSCI_0_2_FN_NATIVE(x) will choose the appropriate
* (native-width) function ID.
*/
#ifdef CONFIG_ARM_64
#define PSCI_0_2_FN_NATIVE(name) PSCI_0_2_FN64_##name
#else
#define PSCI_0_2_FN_NATIVE(name) PSCI_0_2_FN_##name
#endif
uint32_t psci_ver;
static uint32_t psci_cpu_on_nr;
@@ -116,7 +128,7 @@ int __init psci_init_0_2(void)
return -EOPNOTSUPP;
}
psci_cpu_on_nr = PSCI_0_2_FN_CPU_ON;
psci_cpu_on_nr = PSCI_0_2_FN_NATIVE(CPU_ON);
printk(XENLOG_INFO "Using PSCI-0.2 for SMP bringup\n");
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.