From 4934e479f1806e69cfab637156fe136994619c03 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Mon, 12 Oct 2020 08:36:41 +0200 Subject: hw: Use the PCI_DEVFN() macro from 'hw/pci/pci.h' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We already have a generic PCI_DEVFN() macro in "hw/pci/pci.h" to pack the PCI slot/function identifiers, use it. Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson Message-Id: <20201012124506.3406909-6-philmd@redhat.com> Reviewed-by: Huacai Chen Acked-by: Michael S. Tsirkin Message-Id: <20201231224911.1467352-4-f4bug@amsat.org> --- hw/arm/virt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/arm/virt.c') diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 96985917d3..bf3a717111 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1147,7 +1147,8 @@ static void create_pcie_irq_map(const VirtMachineState *vms, full_irq_map, sizeof(full_irq_map)); qemu_fdt_setprop_cells(vms->fdt, nodename, "interrupt-map-mask", - 0x1800, 0, 0, /* devfn (PCI_SLOT(3)) */ + cpu_to_be16(PCI_DEVFN(3, 0)), /* Slot 3 */ + 0, 0, 0x7 /* PCI irq */); } -- cgit 1.4.1