All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Daniel Henrique Barboza" <danielhb413@gmail.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Cédric Le Goater" <clg@kaod.org>
Subject: [PULL 20/31] ppc/pnv: move phb_regs_mr to PnvPHB4
Date: Tue, 18 Jan 2022 14:07:19 +0100	[thread overview]
Message-ID: <20220118130730.1927983-21-clg@kaod.org> (raw)
In-Reply-To: <20220118130730.1927983-1-clg@kaod.org>

From: Daniel Henrique Barboza <danielhb413@gmail.com>

After recent changes, this MemoryRegion can be migrated to PnvPHB4
without too much trouble.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220113192952.911188-11-danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 include/hw/pci-host/pnv_phb4.h | 6 +++---
 hw/pci-host/pnv_phb4.c         | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/hw/pci-host/pnv_phb4.h b/include/hw/pci-host/pnv_phb4.h
index 1d53dda0ed95..6968efaba8f3 100644
--- a/include/hw/pci-host/pnv_phb4.h
+++ b/include/hw/pci-host/pnv_phb4.h
@@ -117,6 +117,9 @@ struct PnvPHB4 {
     uint64_t nest_regs[PHB4_PEC_NEST_STK_REGS_COUNT];
     MemoryRegion nest_regs_mr;
 
+    /* PHB pass-through XSCOM */
+    MemoryRegion phb_regs_mr;
+
     /* Memory windows from PowerBus to PHB */
     MemoryRegion phbbar;
     MemoryRegion intbar;
@@ -170,9 +173,6 @@ struct PnvPhb4PecStack {
     /* My own stack number */
     uint32_t stack_no;
 
-    /* PHB pass-through XSCOM */
-    MemoryRegion phb_regs_mr;
-
     /* The owner PEC */
     PnvPhb4PecState *pec;
 
diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c
index 37bab10fcb69..b5045fca641e 100644
--- a/hw/pci-host/pnv_phb4.c
+++ b/hw/pci-host/pnv_phb4.c
@@ -1481,9 +1481,9 @@ static void pnv_phb4_xscom_realize(PnvPHB4 *phb)
                           PHB4_PEC_PCI_STK_REGS_COUNT);
 
     /* PHB pass-through */
-    snprintf(name, sizeof(name), "xscom-pec-%d.%d-pci-stack-%d-phb",
+    snprintf(name, sizeof(name), "xscom-pec-%d.%d-pci-phb-%d",
              pec->chip_id, pec->index, stack->stack_no);
-    pnv_xscom_region_init(&stack->phb_regs_mr, OBJECT(phb),
+    pnv_xscom_region_init(&phb->phb_regs_mr, OBJECT(phb),
                           &pnv_phb4_xscom_ops, phb, name, 0x40);
 
     pec_nest_base = pecc->xscom_nest_base(pec);
@@ -1499,7 +1499,7 @@ static void pnv_phb4_xscom_realize(PnvPHB4 *phb)
     pnv_xscom_add_subregion(pec->chip,
                             pec_pci_base + PNV9_XSCOM_PEC_PCI_STK0 +
                             0x40 * stack->stack_no,
-                            &stack->phb_regs_mr);
+                            &phb->phb_regs_mr);
 }
 
 static void pnv_phb4_instance_init(Object *obj)
-- 
2.31.1



  parent reply	other threads:[~2022-01-18 14:42 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 13:06 [PULL 00/31] ppc queue Cédric Le Goater
2022-01-18 13:07 ` [PULL 01/31] docs: rSTify ppc-spapr-hotplug.txt Cédric Le Goater
2022-01-18 13:07 ` [PULL 02/31] docs: Rename ppc-spapr-hotplug.txt to ppc-spapr-hotplug.rst Cédric Le Goater
2022-01-18 13:07 ` [PULL 03/31] Link new ppc-spapr-hotplug.rst file to pseries.rst Cédric Le Goater
2022-01-18 13:07 ` [PULL 04/31] rSTify ppc-spapr-uv-hcalls.txt Cédric Le Goater
2022-01-18 13:07 ` [PULL 05/31] Rename ppc-spapr-uv-hcalls.txt to ppc-spapr-uv-hcalls.rst Cédric Le Goater
2022-01-18 13:07 ` [PULL 06/31] Link new ppc-spapr-uv-hcalls.rst to pseries.rst Cédric Le Goater
2022-01-18 13:07 ` [PULL 07/31] target/ppc: Remove last user of .load_state_old Cédric Le Goater
2022-01-18 13:07 ` [PULL 08/31] target/ppc: Finish removal of 401/403 CPUs Cédric Le Goater
2022-01-18 13:07 ` [PULL 09/31] target/ppc: Fix 7448 support Cédric Le Goater
2022-01-18 13:07 ` [PULL 10/31] tests/avocado: ppc: Add smoke tests for MPC7400 and MPC7450 families Cédric Le Goater
2022-01-18 13:07 ` [PULL 11/31] ppc/pnv: use PHB4 obj in pnv_pec_stk_pci_xscom_ops Cédric Le Goater
2022-01-18 13:07 ` [PULL 12/31] ppc/pnv: move PCI registers to PnvPHB4 Cédric Le Goater
2022-01-18 13:07 ` [PULL 13/31] ppc/pnv: move phbbar " Cédric Le Goater
2022-01-18 13:07 ` [PULL 14/31] ppc/pnv: move intbar " Cédric Le Goater
2022-01-18 13:07 ` [PULL 15/31] ppc/pnv: change pnv_phb4_update_regions() to use PnvPHB4 Cédric Le Goater
2022-01-18 13:07 ` [PULL 16/31] ppc/pnv: move mmbar0/mmbar1 and friends to PnvPHB4 Cédric Le Goater
2022-01-18 13:07 ` [PULL 17/31] ppc/pnv: move nest_regs[] " Cédric Le Goater
2022-01-18 13:07 ` [PULL 18/31] ppc/pnv: change pnv_pec_stk_update_map() to use PnvPHB4 Cédric Le Goater
2022-01-18 13:07 ` [PULL 19/31] ppc/pnv: move nest_regs_mr to PnvPHB4 Cédric Le Goater
2022-01-18 13:07 ` Cédric Le Goater [this message]
2022-01-18 13:07 ` [PULL 21/31] ppc/pnv: introduce PnvPHB4 'pec' property Cédric Le Goater
2022-01-18 13:07 ` [PULL 22/31] ppc/pnv: reduce stack->stack_no usage Cédric Le Goater
2022-01-18 13:07 ` [PULL 23/31] ppc/pnv: remove stack pointer from PnvPHB4 Cédric Le Goater
2022-01-18 13:07 ` [PULL 24/31] ppc/pnv: move default_phb_realize() to pec_realize() Cédric Le Goater
2022-01-18 13:07 ` [PULL 25/31] ppc/pnv: remove PnvPhb4PecStack::stack_no Cédric Le Goater
2022-01-18 13:07 ` [PULL 26/31] ppc/pnv: make PECs create and realize PHB4s Cédric Le Goater
2022-01-18 13:07 ` [PULL 27/31] ppc/pnv: remove PnvPhb4PecStack object Cédric Le Goater
2022-01-18 13:07 ` [PULL 28/31] ppc/pnv: rename pnv_pec_stk_update_map() Cédric Le Goater
2022-01-18 13:07 ` [PULL 29/31] ppc/pnv: Move root port allocation under pnv_pec_default_phb_realize() Cédric Le Goater
2022-01-18 13:07 ` [PULL 30/31] ppc/pnv: Add a 'rp_model' class attribute for the PHB4 PEC Cédric Le Goater
2022-01-18 13:07 ` [PULL 31/31] ppc/pnv: Remove PHB4 version property Cédric Le Goater
2022-01-18 22:27 ` [PULL 00/31] ppc queue Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220118130730.1927983-21-clg@kaod.org \
    --to=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.