From a1d742d88b7c4aef31c265ee931dfc51ec4be017 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Mon, 15 Nov 2021 23:36:18 +0100 Subject: hw/intc/arm_gicv3: Extract gicv3_set_gicv3state from arm_gicv3_cpuif.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gicv3_set_gicv3state() is used by arm_gicv3_common.c in arm_gicv3_common_realize(). Since we want to restrict arm_gicv3_cpuif.c to TCG, extract gicv3_set_gicv3state() to a new file. Add this file to the meson 'specific' source set, since it needs access to "cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Message-id: 20211115223619.2599282-2-philmd@redhat.com Signed-off-by: Peter Maydell --- hw/intc/arm_gicv3_cpuif_common.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 hw/intc/arm_gicv3_cpuif_common.c (limited to 'hw/intc/arm_gicv3_cpuif_common.c') diff --git a/hw/intc/arm_gicv3_cpuif_common.c b/hw/intc/arm_gicv3_cpuif_common.c new file mode 100644 index 0000000000..ff1239f65d --- /dev/null +++ b/hw/intc/arm_gicv3_cpuif_common.c @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * ARM Generic Interrupt Controller v3 + * + * Copyright (c) 2016 Linaro Limited + * Written by Peter Maydell + * + * This code is licensed under the GPL, version 2 or (at your option) + * any later version. + */ + +#include "qemu/osdep.h" +#include "gicv3_internal.h" +#include "cpu.h" + +void gicv3_set_gicv3state(CPUState *cpu, GICv3CPUState *s) +{ + ARMCPU *arm_cpu = ARM_CPU(cpu); + CPUARMState *env = &arm_cpu->env; + + env->gicv3state = (void *)s; +}; -- cgit 1.4.1