mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
target-arm: Refactor CPU affinity handling
Introduces reusable definitions for CPU affinity masks/shifts and gets rid of hardcoded magic numbers. Signed-off-by: Pavel Fedin <p.fedin@samsung.com> Message-id: 7e6def4d0d91ae64615cdd2035b94d408d0a23c6.1441366248.git.p.fedin@samsung.com [PMM: folded overlong line] Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
d4e26d106a
commit
0f4a9e45ec
4 changed files with 16 additions and 5 deletions
|
@ -456,7 +456,7 @@ static void arm_cpu_initfn(Object *obj)
|
|||
*/
|
||||
Aff1 = cs->cpu_index / ARM_CPUS_PER_CLUSTER;
|
||||
Aff0 = cs->cpu_index % ARM_CPUS_PER_CLUSTER;
|
||||
cpu->mp_affinity = (Aff1 << 8) | Aff0;
|
||||
cpu->mp_affinity = (Aff1 << ARM_AFF1_SHIFT) | Aff0;
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
/* Our inbound IRQ and FIQ lines */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue