[PATCH v9 1/3] PSCI: Add initial support for PSCIv0.2 functions
Ashwin Chaugule
ashwin.chaugule at linaro.org
Mon May 12 06:52:38 PDT 2014
On 11 May 2014 04:14, Anup Patel <anup at brainfault.org> wrote:
>> static u32 psci_power_state_pack(struct psci_power_state state)
>> {
>> - return ((state.id & PSCI_POWER_STATE_ID_MASK)
>> - << PSCI_POWER_STATE_ID_SHIFT) |
>> - ((state.type & PSCI_POWER_STATE_TYPE_MASK)
>> - << PSCI_POWER_STATE_TYPE_SHIFT) |
>> - ((state.affinity_level & PSCI_POWER_STATE_AFFL_MASK)
>> - << PSCI_POWER_STATE_AFFL_SHIFT);
>> + return ((state.id & PSCI_0_2_POWER_STATE_ID_MASK)
>> + << PSCI_0_2_POWER_STATE_ID_SHIFT) |
>> + ((state.type & PSCI_0_2_POWER_STATE_TYPE_MASK)
>> + << PSCI_0_2_POWER_STATE_TYPE_SHIFT) |
>> + ((state.affinity_level & PSCI_0_2_POWER_STATE_AFFL_MASK)
>> + << PSCI_0_2_POWER_STATE_AFFL_SHIFT);
>> }
>
> As per updated PSCI_0_2_POWER_STATE_xxx defines, this should be:
>
> return ((state.id << PSCI_0_2_POWER_STATE_ID_SHIFT)
> & PSCI_0_2_POWER_STATE_ID_MASK) |
> ((state.type << PSCI_0_2_POWER_STATE_TYPE_SHIFT)
> & PSCI_0_2_POWER_STATE_TYPE_MASK) |
> ((state.affinity_level << PSCI_0_2_POWER_STATE_AFFL_SHIFT)
> & PSCI_0_2_POWER_STATE_AFFL_MASK);
>
Argh! Thanks for noticing it anyway.
More information about the linux-arm-kernel
mailing list