qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH 2/2] ppc/pnv: Implement ADU access to LPC space


From: Cédric Le Goater
Subject: Re: [PATCH 2/2] ppc/pnv: Implement ADU access to LPC space
Date: Thu, 2 May 2024 10:32:53 +0200
User-agent: Mozilla Thunderbird

Hello Nick,


diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 5869aac89a..eb9dbc62dd 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -1642,6 +1642,8 @@ static void pnv_chip_power9_realize(DeviceState *dev, 
Error **errp)
       }
/* ADU */
+    object_property_set_link(OBJECT(&chip9->adu), "lpc", OBJECT(&chip9->lpc),
+                             &error_abort);

I would add an assert on the lpc pointer in the ADU realize routine.

A assert != NULL, in case this failed to link correctly? (Maybe if it
was called before lpc object was realized). I will do.

It is to make sure that an ADU object is not "realized" without
the pointer '->lpc' being set before, since it is a must-have for
the implementation to operate (and do LPC transactions).

There are several :

   assert(s->chip);

in the pnv models for the same kind of purpose.

Thanks,

C.






reply via email to

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