[PATCH] arm64: fix psci power state pack
Prashant Gaikwad
pgaikwad at nvidia.com
Wed Feb 12 04:22:38 EST 2014
Values has to be shifted right to create pack.
Signed-off-by: Prashant Gaikwad <pgaikwad at nvidia.com>
---
arch/arm64/kernel/psci.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c
index 4f97db3..6e8f1df 100644
--- a/arch/arm64/kernel/psci.c
+++ b/arch/arm64/kernel/psci.c
@@ -87,11 +87,11 @@ static int psci_to_linux_errno(int errno)
static u32 psci_power_state_pack(struct psci_power_state state)
{
return ((state.id & PSCI_POWER_STATE_ID_MASK)
- << PSCI_POWER_STATE_ID_SHIFT) |
+ >> PSCI_POWER_STATE_ID_SHIFT) |
((state.type & PSCI_POWER_STATE_TYPE_MASK)
- << PSCI_POWER_STATE_TYPE_SHIFT) |
+ >> PSCI_POWER_STATE_TYPE_SHIFT) |
((state.affinity_level & PSCI_POWER_STATE_AFFL_MASK)
- << PSCI_POWER_STATE_AFFL_SHIFT);
+ >> PSCI_POWER_STATE_AFFL_SHIFT);
}
/*
--
1.7.4.1
More information about the linux-arm-kernel
mailing list