qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH v3 05/10] pnv_phb4_pec.c: move phb4 properties setup to pec_r


From: Cédric Le Goater
Subject: Re: [PATCH v3 05/10] pnv_phb4_pec.c: move phb4 properties setup to pec_realize()
Date: Mon, 10 Jan 2022 16:58:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

On 1/10/22 15:33, Daniel Henrique Barboza wrote:
Previous patch added stack->phb->index handling in pec_realize() for
specific reasons (phb->index is reliant on the stack index in
pec->stacks[]).

Move pnv_phb4_set_stack_phb_props() from stk_realize() to pec_realize()
to have a single spot in which we set PHB4 properties for the default
created stack->phb. This will give us one less spot to worry about when
introducing user creatable pnv-phb4s and having to deal with stack->phb
being NULL depending on -nodefaults being set.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
  hw/pci-host/pnv_phb4_pec.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/pci-host/pnv_phb4_pec.c b/hw/pci-host/pnv_phb4_pec.c
index 417fac4cef..d2851e8040 100644
--- a/hw/pci-host/pnv_phb4_pec.c
+++ b/hw/pci-host/pnv_phb4_pec.c
@@ -405,6 +405,7 @@ static void pnv_pec_realize(DeviceState *dev, Error **errp)
           */
          object_property_set_int(OBJECT(&stack->phb), "index", phb_id,
                                  &error_abort);
+        pnv_phb4_set_stack_phb_props(stack, &stack->phb);

hmm, this is exposing the PHB under the PEC. I am not sure this is useful
anymore. I will think about it.

C.


if (!qdev_realize(DEVICE(stk_obj), NULL, errp)) {
              return;
@@ -576,7 +577,6 @@ static void pnv_pec_stk_realize(DeviceState *dev, Error 
**errp)
      pnv_xscom_region_init(&stack->phb_regs_mr, OBJECT(&stack->phb),
                            &pnv_phb4_xscom_ops, &stack->phb, name, 0x40);
- pnv_phb4_set_stack_phb_props(stack, &stack->phb);
      if (!sysbus_realize(SYS_BUS_DEVICE(&stack->phb), errp)) {
          return;
      }





reply via email to

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