[PATCH 11/12] ARM: migrate to common PSCI client code

Mark Rutland mark.rutland at arm.com
Tue May 26 05:59:39 PDT 2015


On Mon, May 18, 2015 at 08:14:51PM +0100, Ashwin Chaugule wrote:
> On 18 May 2015 at 05:46, Mark Rutland <mark.rutland at arm.com> wrote:
> >> >> +int psci_cpu_disable(unsigned int cpu)
> >> >> +{
> >> >> +       /* Fail early if we don't have CPU_OFF support */
> >> >> +       if (!psci_ops.cpu_off)
> >> >> +               return 0;
> >> >> +
> >> >> +       /* Trusted OS will deny CPU_OFF */
> >> >> +       if (psci_tos_resident_on(cpu))
> >> >> +               return 0;
> >> >> +
> >> >
> >> > Same question here. Seems like if MIGRATE_INFO_TYPE = 2 ( TOS is
> >> > present or does not require migration), you should be able to call
> >> > CPU_OFF. Otherwise the patch looks fine to me.
> >>
> >> err. Make that TOS is not present.
> >
> > In the cases where migration is not required, resident_cpu == -1, and
> > psci_tos_resident_on(cpu) will return false for any valid CPU. So I
> > don't see that we would deny migration here.
> >
> 
> Hm. Perhaps I was confused by the "return -EPERM" in the arm64 version
> and "return 0" here. :)

Looking at this again, you're absolutely right, and I'd gotten myself
confused about the expected return values. I'll respin this with
corrected return codes (-EPERM instead of 0 and 0 instead of 1).

Thanks for spotting that, and sorry for being so dense!

Mark.



More information about the linux-arm-kernel mailing list