qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 19/19] ppc/pnv: Move num_phbs under Pnv8Chip


From: Cédric Le Goater
Subject: Re: [PATCH v2 19/19] ppc/pnv: Move num_phbs under Pnv8Chip
Date: Tue, 4 Jan 2022 11:07:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

On 1/4/22 10:53, Daniel Henrique Barboza wrote:


On 12/13/21 10:28, Cédric Le Goater wrote:
It is not used elsewhere so that's where it belongs.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---

I am/was using this patch and didn't provide my r-b on it:


Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>

Yes. Just resend with your next series.

Thanks,

C.



  include/hw/ppc/pnv.h | 4 ++--
  hw/ppc/pnv.c         | 7 +++----
  2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/include/hw/ppc/pnv.h b/include/hw/ppc/pnv.h
index ca27bd39f0ac..251c9854329d 100644
--- a/include/hw/ppc/pnv.h
+++ b/include/hw/ppc/pnv.h
@@ -52,7 +52,6 @@ struct PnvChip {
      uint64_t     cores_mask;
      PnvCore      **cores;
-    uint32_t     num_phbs;
      uint32_t     num_pecs;
      MemoryRegion xscom_mmio;
@@ -82,6 +81,7 @@ struct Pnv8Chip {
  #define PNV8_CHIP_PHB3_MAX 4
      PnvPHB3      phbs[PNV8_CHIP_PHB3_MAX];
+    uint32_t     num_phbs;
      XICSFabric    *xics;
  };
@@ -136,8 +136,8 @@ struct PnvChipClass {
      /*< public >*/
      uint64_t     chip_cfam_id;
      uint64_t     cores_mask;
-    uint32_t     num_phbs;
      uint32_t     num_pecs;
+    uint32_t     num_phbs;
      DeviceRealize parent_realize;
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 2b027e299d27..8a3732c982e5 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -1099,7 +1099,6 @@ static void pnv_chip_power10_intc_print_info(PnvChip 
*chip, PowerPCCPU *cpu,
  static void pnv_chip_power8_instance_init(Object *obj)
  {
-    PnvChip *chip = PNV_CHIP(obj);
      Pnv8Chip *chip8 = PNV8_CHIP(obj);
      PnvChipClass *pcc = PNV_CHIP_GET_CLASS(obj);
      int i;
@@ -1118,10 +1117,10 @@ static void pnv_chip_power8_instance_init(Object *obj)
      object_initialize_child(obj, "homer", &chip8->homer, TYPE_PNV8_HOMER);
      if (defaults_enabled()) {
-        chip->num_phbs = pcc->num_phbs;
+        chip8->num_phbs = pcc->num_phbs;
      }
-    for (i = 0; i < chip->num_phbs; i++) {
+    for (i = 0; i < chip8->num_phbs; i++) {
          object_initialize_child(obj, "phb[*]", &chip8->phbs[i], 
TYPE_PNV_PHB3);
      }
@@ -1239,7 +1238,7 @@ static void pnv_chip_power8_realize(DeviceState *dev, 
Error **errp)
                                  &chip8->homer.regs);
      /* PHB3 controllers */
-    for (i = 0; i < chip->num_phbs; i++) {
+    for (i = 0; i < chip8->num_phbs; i++) {
          PnvPHB3 *phb = &chip8->phbs[i];
          object_property_set_int(OBJECT(phb), "index", i, &error_fatal);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]