mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 17:11:42 +00:00
Merge pull request #323 from athoelke/at/fix-aff-inst-overflow
Fix integer extension in mpidr_set_aff_inst()
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user