[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 31/60] ppc/pnv: psi: add a PSIHB_REG macro
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 31/60] ppc/pnv: psi: add a PSIHB_REG macro |
Date: |
Sun, 10 Mar 2019 19:26:34 +1100 |
From: Cédric Le Goater <address@hidden>
This is a simple helper to translate XSCOM addresses to MMIO addresses
Signed-off-by: Cédric Le Goater <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/pnv_psi.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c
index c872be0b9c..a2f8d0dece 100644
--- a/hw/ppc/pnv_psi.c
+++ b/hw/ppc/pnv_psi.c
@@ -114,6 +114,8 @@
#define PSIHB_BAR_MASK 0x0003fffffff00000ull
#define PSIHB_FSPBAR_MASK 0x0003ffff00000000ull
+#define PSIHB_REG(addr) (((addr) >> 3) + PSIHB_XSCOM_BAR)
+
static void pnv_psi_set_bar(PnvPsi *psi, uint64_t bar)
{
MemoryRegion *sysmem = get_system_memory();
@@ -392,13 +394,13 @@ static void pnv_psi_reg_write(PnvPsi *psi, uint32_t
offset, uint64_t val,
*/
static uint64_t pnv_psi_mmio_read(void *opaque, hwaddr addr, unsigned size)
{
- return pnv_psi_reg_read(opaque, (addr >> 3) + PSIHB_XSCOM_BAR, true);
+ return pnv_psi_reg_read(opaque, PSIHB_REG(addr), true);
}
static void pnv_psi_mmio_write(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
- pnv_psi_reg_write(opaque, (addr >> 3) + PSIHB_XSCOM_BAR, val, true);
+ pnv_psi_reg_write(opaque, PSIHB_REG(addr), val, true);
}
static const MemoryRegionOps psi_mmio_ops = {
--
2.20.1
- [Qemu-devel] [PULL 29/60] ppc/xive: activate HV support, (continued)
- [Qemu-devel] [PULL 29/60] ppc/xive: activate HV support, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 21/60] ppc/xive: hardwire the Physical CAM line of the thread context, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 06/60] target/ppc: Implement large decrementer support for TCG, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 15/60] target/ppc: Refactor kvm_handle_debug, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 22/60] ppc: externalize ppc_get_vcpu_by_pir(), David Gibson, 2019/03/10
- [Qemu-devel] [PULL 25/60] ppc/pnv: change the CPU machine_data presenter type to Object *, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 20/60] PPC: E500: Add FSL I2C controller and integrate RTC with it, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 32/60] ppc/pnv: psi: add a reset handler, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 30/60] ppc/pnv: fix logging primitives using Ox, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 28/60] ppc/pnv: introduce a new pic_print_info() operation to the chip model, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 31/60] ppc/pnv: psi: add a PSIHB_REG macro,
David Gibson <=
- [Qemu-devel] [PULL 23/60] ppc/xive: export the TIMA memory accessors, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 41/60] mac_oldworld: use node name instead of alias name for hd device in FWPathProvider, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 24/60] ppc/pnv: export the xive_router_notify() routine, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 27/60] ppc/pnv: introduce a new dt_populate() operation to the chip model, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 37/60] target/ppc: introduce avr_full_offset() function, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 40/60] target/ppc: introduce vsr64_offset() to simplify get_cpu_vsr{l, h}() and set_cpu_vsr{l, h}(), David Gibson, 2019/03/10
- [Qemu-devel] [PULL 26/60] ppc/pnv: add a XIVE interrupt controller model for POWER9, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 42/60] mac_newworld: use node name instead of alias name for hd device in FWPathProvider, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 35/60] target/ppc: introduce single vsrl_offset() function, David Gibson, 2019/03/10
- [Qemu-devel] [PULL 34/60] target/ppc: introduce single fpr_offset() function, David Gibson, 2019/03/10