|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6] xen/arm : emulation of arm's PSCI v0.2 standard
On Sat, 2014-07-26 at 01:22 +0530, Parth Dixit wrote:
> + case PSCI_cpu_off:
> + {
> + uint32_t pstate = PSCI_ARG32(regs,1);
> + PSCI_RESULT_REG(regs) = (int32_t) do_psci_cpu_off(pstate);
do_psci_cpu_off returns int32_t, so no need for this cast. The same is
true of all of the helpers, I think. Except perhaps MIGRATE_INFO_UP_CPU
which differs between 32- and 64-bit.
IOW I think this...
> + case PSCI_0_2_FN_MIGRATE_INFO_UP_CPU:
> + if ( psci_mode_check(current->domain, fid) )
> + PSCI_RESULT_REG(regs) =
> + (uint32_t) do_psci_0_2_migrate_info_up_cpu();
... is the only cast which might need to remain, and even there I'm not
sure.
do_psci_0_2_migrate_info_up_cpu() returns a register_t, which given the
currently trivial implementation I think is likely to be sufficient
without the cast.
> +register_t do_psci_0_2_cpu_suspend(uint32_t power_state, register_t
> entry_point,
> + register_t context_id)
> +{
> + struct vcpu *v = current;
> +
> + /* affinity values are ignored in this implementation as
> + * at present xen does not supports affinity level greater
> + * than 0, for all affinity values passed we power down/ standby
> + * the current core */
> +
> + vcpu_block_unless_event_pending(v);
> +
> + /* if power down is requested context_id must be returned in x0/r0
> + * as the function return will be written in x0/r0 we return context_id
> + * instead os success value */
The spec isn't clear on this, but I don't think this can be correct.
I expect the requirement is that you either return PSCI_SUCCESS to the
instruction after the smc or you return to entry_point with
x0==context_id. I don't think it makes sense to return after the smc
with the x0==context_id. This is implied by section 5.4.2 bullet #4
which talks about handling PSCI return codes.
I'm going to ask ARM for clarification, please stand by.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |