mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
target/arm: Create arm_cpu_mp_affinity
Wrapper to return the mp affinity bits from the cpu. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20240118200643.29037-10-philmd@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
750245ed7c
commit
c4380f7bcd
8 changed files with 17 additions and 11 deletions
|
@ -720,7 +720,7 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
|
|||
build_append_int_noprefix(table_data, vgic_interrupt, 4);
|
||||
build_append_int_noprefix(table_data, 0, 8); /* GICR Base Address*/
|
||||
/* MPIDR */
|
||||
build_append_int_noprefix(table_data, armcpu->mp_affinity, 8);
|
||||
build_append_int_noprefix(table_data, arm_cpu_mp_affinity(armcpu), 8);
|
||||
/* Processor Power Efficiency Class */
|
||||
build_append_int_noprefix(table_data, 0, 1);
|
||||
/* Reserved */
|
||||
|
|
|
@ -370,7 +370,7 @@ static void fdt_add_cpu_nodes(const VirtMachineState *vms)
|
|||
for (cpu = 0; cpu < smp_cpus; cpu++) {
|
||||
ARMCPU *armcpu = ARM_CPU(qemu_get_cpu(cpu));
|
||||
|
||||
if (armcpu->mp_affinity & ARM_AFF3_MASK) {
|
||||
if (arm_cpu_mp_affinity(armcpu) & ARM_AFF3_MASK) {
|
||||
addr_cells = 2;
|
||||
break;
|
||||
}
|
||||
|
@ -397,10 +397,10 @@ static void fdt_add_cpu_nodes(const VirtMachineState *vms)
|
|||
|
||||
if (addr_cells == 2) {
|
||||
qemu_fdt_setprop_u64(ms->fdt, nodename, "reg",
|
||||
armcpu->mp_affinity);
|
||||
arm_cpu_mp_affinity(armcpu));
|
||||
} else {
|
||||
qemu_fdt_setprop_cell(ms->fdt, nodename, "reg",
|
||||
armcpu->mp_affinity);
|
||||
arm_cpu_mp_affinity(armcpu));
|
||||
}
|
||||
|
||||
if (ms->possible_cpus->cpus[cs->cpu_index].props.has_node_id) {
|
||||
|
|
|
@ -107,7 +107,8 @@ static void fdt_add_cpu_nodes(VersalVirt *s, uint32_t psci_conduit)
|
|||
ARMCPU *armcpu = ARM_CPU(qemu_get_cpu(i));
|
||||
|
||||
qemu_fdt_add_subnode(s->fdt, name);
|
||||
qemu_fdt_setprop_cell(s->fdt, name, "reg", armcpu->mp_affinity);
|
||||
qemu_fdt_setprop_cell(s->fdt, name, "reg",
|
||||
arm_cpu_mp_affinity(armcpu));
|
||||
if (psci_conduit != QEMU_PSCI_CONDUIT_DISABLED) {
|
||||
qemu_fdt_setprop_string(s->fdt, name, "enable-method", "psci");
|
||||
}
|
||||
|
|
|
@ -67,9 +67,9 @@ static void crl_reset_cpu(XlnxVersalCRL *s, ARMCPU *armcpu,
|
|||
bool rst_old, bool rst_new)
|
||||
{
|
||||
if (rst_new) {
|
||||
arm_set_cpu_off(armcpu->mp_affinity);
|
||||
arm_set_cpu_off(arm_cpu_mp_affinity(armcpu));
|
||||
} else {
|
||||
arm_set_cpu_on_and_reset(armcpu->mp_affinity);
|
||||
arm_set_cpu_on_and_reset(arm_cpu_mp_affinity(armcpu));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue