From 867683d86e3c88b07034d891937a3535ace5ff38 Mon Sep 17 00:00:00 2001 From: Daniel Henrique Barboza Date: Tue, 18 Jan 2022 12:56:31 +0100 Subject: ppc/pnv: move nest_regs_mr to PnvPHB4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We're now able to cleanly move nest_regs_mr to the PnvPHB4 device. One thing of notice here is the need to use a phb->stack->pec pointer because pnv_pec_stk_nest_xscom_write requires a PEC object. Another thing that can be noticed in the use of 'stack->stack_no' that still remains throughout the XSCOM code. After moving all MemoryRegions to the PnvPHB4 object, this illustrates what is the remaining role of the stack: provide a PEC pointer and the 'stack_no' information. If we can provide these in the PnvPHB4 object instead (spoiler: we can, and we will), the PnvPhb4PecStack device will be deprecated and can be removed. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Cédric Le Goater Message-Id: <20220113192952.911188-10-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater --- include/hw/pci-host/pnv_phb4.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/hw/pci-host/pnv_phb4.h') diff --git a/include/hw/pci-host/pnv_phb4.h b/include/hw/pci-host/pnv_phb4.h index a7e08772c1..1d53dda0ed 100644 --- a/include/hw/pci-host/pnv_phb4.h +++ b/include/hw/pci-host/pnv_phb4.h @@ -115,6 +115,7 @@ struct PnvPHB4 { /* Nest registers */ #define PHB4_PEC_NEST_STK_REGS_COUNT 0x17 uint64_t nest_regs[PHB4_PEC_NEST_STK_REGS_COUNT]; + MemoryRegion nest_regs_mr; /* Memory windows from PowerBus to PHB */ MemoryRegion phbbar; @@ -169,8 +170,6 @@ struct PnvPhb4PecStack { /* My own stack number */ uint32_t stack_no; - MemoryRegion nest_regs_mr; - /* PHB pass-through XSCOM */ MemoryRegion phb_regs_mr; -- cgit v1.2.3