diff options
author | danh-arm <dan.handley@arm.com> | 2015-06-19 14:16:40 +0100 |
---|---|---|
committer | danh-arm <dan.handley@arm.com> | 2015-06-19 14:16:40 +0100 |
commit | 08b337f50d1e9ed9acd76a9a5be38b080b1a0c2f (patch) | |
tree | 0ffbfd7e8a046764971b446e9fb0e3bbf1925c1b /services/std_svc/psci/psci_common.c | |
parent | 649591bbabbc737534943136751722307429b7d6 (diff) | |
parent | 9b89613eeb730b2813672098aa43ebd9cb94310c (diff) |
Merge pull request #323 from athoelke/at/fix-aff-inst-overflow
Fix integer extension in mpidr_set_aff_inst()
Diffstat (limited to 'services/std_svc/psci/psci_common.c')
-rw-r--r-- | services/std_svc/psci/psci_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/std_svc/psci/psci_common.c b/services/std_svc/psci/psci_common.c index 237cf1e9..63d84760 100644 --- a/services/std_svc/psci/psci_common.c +++ b/services/std_svc/psci/psci_common.c @@ -185,8 +185,8 @@ unsigned long mpidr_set_aff_inst(unsigned long mpidr, aff_shift = get_afflvl_shift(aff_lvl); /* Clear the existing affinity instance & set the new one*/ - mpidr &= ~(MPIDR_AFFLVL_MASK << aff_shift); - mpidr |= aff_inst << aff_shift; + mpidr &= ~(((unsigned long)MPIDR_AFFLVL_MASK) << aff_shift); + mpidr |= ((unsigned long)aff_inst) << aff_shift; return mpidr; } |