|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC v2 1/6] xen/arm: traps: Reorder early overwrite of FID
On Tue, 7 Feb 2017, Edgar E. Iglesias wrote:
> From: "Edgar E. Iglesias" <edgar.iglesias@xxxxxxxxxx>
>
> Move the early setting of PSCI_RESULT_REG to a later stage
> avoiding the early override of the FID that's stored in
> the same register.
>
> No functional change.
>
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xxxxxxxxxx>
Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> xen/arch/arm/traps.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
> index 92b1d80..c5a4d41 100644
> --- a/xen/arch/arm/traps.c
> +++ b/xen/arch/arm/traps.c
> @@ -1335,8 +1335,6 @@ static void do_trap_psci(struct cpu_user_regs *regs)
> {
> register_t fid = PSCI_ARG(regs,0);
>
> - /* preloading in case psci_mode_check fails */
> - PSCI_RESULT_REG(regs) = PSCI_INVALID_PARAMETERS;
> switch( fid )
> {
> case PSCI_cpu_off:
> @@ -1369,6 +1367,7 @@ static void do_trap_psci(struct cpu_user_regs *regs)
> case PSCI_0_2_FN_MIGRATE_INFO_UP_CPU:
> case PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU:
> perfc_incr(vpsci_migrate_info_up_cpu);
> + PSCI_RESULT_REG(regs) = PSCI_INVALID_PARAMETERS;
> if ( psci_mode_check(current->domain, fid) )
> PSCI_RESULT_REG(regs) = do_psci_0_2_migrate_info_up_cpu();
> break;
> @@ -1385,6 +1384,7 @@ static void do_trap_psci(struct cpu_user_regs *regs)
> case PSCI_0_2_FN_CPU_ON:
> case PSCI_0_2_FN64_CPU_ON:
> perfc_incr(vpsci_cpu_on);
> + PSCI_RESULT_REG(regs) = PSCI_INVALID_PARAMETERS;
> if ( psci_mode_check(current->domain, fid) )
> {
> register_t vcpuid = PSCI_ARG(regs,1);
> @@ -1397,6 +1397,7 @@ static void do_trap_psci(struct cpu_user_regs *regs)
> case PSCI_0_2_FN_CPU_SUSPEND:
> case PSCI_0_2_FN64_CPU_SUSPEND:
> perfc_incr(vpsci_cpu_suspend);
> + PSCI_RESULT_REG(regs) = PSCI_INVALID_PARAMETERS;
> if ( psci_mode_check(current->domain, fid) )
> {
> uint32_t pstate = PSCI_ARG32(regs,1);
> @@ -1409,6 +1410,7 @@ static void do_trap_psci(struct cpu_user_regs *regs)
> case PSCI_0_2_FN_AFFINITY_INFO:
> case PSCI_0_2_FN64_AFFINITY_INFO:
> perfc_incr(vpsci_cpu_affinity_info);
> + PSCI_RESULT_REG(regs) = PSCI_INVALID_PARAMETERS;
> if ( psci_mode_check(current->domain, fid) )
> {
> register_t taff = PSCI_ARG(regs,1);
> @@ -1420,6 +1422,7 @@ static void do_trap_psci(struct cpu_user_regs *regs)
> case PSCI_0_2_FN_MIGRATE:
> case PSCI_0_2_FN64_MIGRATE:
> perfc_incr(vpsci_cpu_migrate);
> + PSCI_RESULT_REG(regs) = PSCI_INVALID_PARAMETERS;
> if ( psci_mode_check(current->domain, fid) )
> {
> uint32_t tcpu = PSCI_ARG32(regs,1);
> --
> 2.7.4
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |