[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 34/37] spapr_pci: Fix endianness in assigned-addresses
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 34/37] spapr_pci: Fix endianness in assigned-addresses property |
Date: |
Mon, 4 Feb 2019 20:01:21 +1100 |
From: Alexey Kardashevskiy <address@hidden>
reg->phys_hi and assigned->phys_hi are big endian but we do an extra
byteswap anyway when copying reg->phys_hi to assigned->phys_hi.
To make things slightly more messy, we also add a relocatable bit (b_n())
although in the right endianness.
This fixes endianness of assigned->phys_hi.
This is unlikely to produce any visible difference though as we should end up
there only in the case of PCI hotplug and even then I am not sure if
(d->io_regions[i].addr == PCI_BAR_UNMAPPED) == true.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 5cdc98513d..c99721cde8 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -964,7 +964,7 @@ static void populate_resource_props(PCIDevice *d,
ResourceProps *rp)
}
assigned = &rp->assigned[assigned_idx++];
- assigned->phys_hi = cpu_to_be32(reg->phys_hi | b_n(1));
+ assigned->phys_hi = cpu_to_be32(be32_to_cpu(reg->phys_hi) | b_n(1));
assigned->phys_mid = cpu_to_be32(d->io_regions[i].addr >> 32);
assigned->phys_lo = cpu_to_be32(d->io_regions[i].addr);
assigned->size_hi = reg->size_hi;
--
2.20.1
- [Qemu-ppc] [PULL 06/37] ppc4xx: Pass array index to function instead of pointer into the array, (continued)
- [Qemu-ppc] [PULL 06/37] ppc4xx: Pass array index to function instead of pointer into the array, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 28/37] target/ppc: rework vmul{e, o}{s, u}{b, h, w} instructions to use Vsr* macros, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 23/37] spapr: Drop unused parameters from fdt building helper, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 25/37] QemuMacDrivers: update qemu_vga.ndrv to 90c488d built from submodule, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 20/37] hw/ppc: Move ppc40x_*reset() functions from ppc405_uc.c to ppc.c, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 21/37] MAINTAINERS: XIVE is an interrupt controller, not a machine, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 37/37] mmap-alloc: fix hugetlbfs misaligned length in ppc64, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 32/37] target/ppc: remove ROTRu32 and ROTRu64 macros from int_helper.c, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 26/37] hw/ppc/spapr: Add support for "-vga cirrus", David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 16/37] ppc/pnv: introduce a CPU machine_data, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 34/37] spapr_pci: Fix endianness in assigned-addresses property,
David Gibson <=
- [Qemu-ppc] [PULL 31/37] target/ppc: simplify VEXT_SIGNED macro in int_helper.c, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 29/37] target/ppc: eliminate use of HI_IDX and LO_IDX macros from int_helper.c, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 33/37] target/ppc: remove various HOST_WORDS_BIGENDIAN hacks in int_helper.c, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 30/37] target/ppc: eliminate use of EL_IDX macros from int_helper.c, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 35/37] hw/ppc: Don't include m48t59.h if it is not necessary, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 36/37] mmap-alloc: unfold qemu_ram_mmap(), David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 07/37] sam460ex: Fix support for memory larger than 1GB, David Gibson, 2019/02/04
- Re: [Qemu-ppc] [PULL 00/37] ppc-for-4.0 queue 20190204, Peter Maydell, 2019/02/04