From: Brijesh Singh Subject: [PATCH v2] xen:arm: use SMC64 version function ID on ARM64 Date: Mon, 5 Oct 2015 10:27:19 -0500 Message-ID: <1444058839-15524-1-git-send-email-brijeshkumar.singh@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: stefano.stabellini@citrix.com, ian.campbell@citrix.com, suravee.suthikulpanit@amd.com, Brijesh Singh List-Id: xen-devel@lists.xenproject.org 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 --- xen/arch/arm/psci.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/psci.c b/xen/arch/arm/psci.c index 7ad6a43..654b89f 100644 --- a/xen/arch/arm/psci.c +++ b/xen/arch/arm/psci.c @@ -23,6 +23,17 @@ #include #include +/* While a 64-bit OS can make SMC32 call convension but some calls which + * requires passing function addresses (e.g CPU_ON) should set the + * parameter ID to SMC64. The macro will be used to choose the appropriate + * parameter 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 +127,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"); -- 1.9.1