void call_psci_system_off(void)
{
- if ( psci_ver > XEN_PSCI_V_0_1 )
+ if ( psci_ver > PSCI_VERSION(0, 1) )
call_smc(PSCI_0_2_FN_SYSTEM_OFF, 0, 0, 0);
}
void call_psci_system_reset(void)
{
- if ( psci_ver > XEN_PSCI_V_0_1 )
+ if ( psci_ver > PSCI_VERSION(0, 1) )
call_smc(PSCI_0_2_FN_SYSTEM_RESET, 0, 0, 0);
}
return -ENOENT;
}
- psci_ver = XEN_PSCI_V_0_1;
+ psci_ver = PSCI_VERSION(0, 1);
printk(XENLOG_INFO "Using PSCI-0.1 for SMP bringup\n");
if ( is_64bit_domain(d) && is_thumb )
return PSCI_INVALID_PARAMETERS;
- if( ( ver == XEN_PSCI_V_0_2 ) &&
- ( !test_bit(_VPF_down, &v->pause_flags) ) )
+ if ( (ver == PSCI_VERSION(0, 2)) &&
+ !test_bit(_VPF_down, &v->pause_flags) )
return PSCI_ALREADY_ON;
if ( (ctxt = alloc_vcpu_guest_context()) == NULL )
if ( is_32bit_domain(d) )
{
ctxt->user_regs.cpsr = PSR_GUEST32_INIT;
- if( ver == XEN_PSCI_V_0_2 )
+ if ( ver == PSCI_VERSION(0, 2) )
ctxt->user_regs.r0_usr = context_id;
}
#ifdef CONFIG_ARM_64
else
{
ctxt->user_regs.cpsr = PSR_GUEST64_INIT;
- if( ver == XEN_PSCI_V_0_2 )
+ if ( ver == PSCI_VERSION(0, 2) )
ctxt->user_regs.x0 = context_id;
}
#endif
int32_t do_psci_cpu_on(uint32_t vcpuid, register_t entry_point)
{
- return do_common_cpu_on(vcpuid,entry_point,0,XEN_PSCI_V_0_1);
+ return do_common_cpu_on(vcpuid, entry_point, 0 , PSCI_VERSION(0, 1));
}
int32_t do_psci_cpu_off(uint32_t power_state)
uint32_t do_psci_0_2_version(void)
{
- return XEN_PSCI_V_0_2;
+ return PSCI_VERSION(0, 2);
}
register_t do_psci_0_2_cpu_suspend(uint32_t power_state, register_t entry_point,
int32_t do_psci_0_2_cpu_on(register_t target_cpu, register_t entry_point,
register_t context_id)
{
- return do_common_cpu_on(target_cpu,entry_point,context_id,XEN_PSCI_V_0_2);
+ return do_common_cpu_on(target_cpu, entry_point, context_id,
+ PSCI_VERSION(0, 2));
}
static const unsigned long target_affinity_mask[] = {