On 1/8/22 08:11, Cédric Le Goater wrote:
+ object_property_set_int(OBJECT(phb), "index",
+ phb->phb_id, &error_abort);
+
+ pnv_phb4_set_stack_phb_props(stack, phb);
+
+ /* Assign the phb to the stack */
+ stack->phb = phb;
The stack object should check the validity of the stack->phb pointer always.
What do you mean by "check the validity"?
I am thinking of the usage of 'stack->phb', for instance in the routine
pnv_phb4_update_regions(). We should add an assert there.
Oh ok. I'll add an assert in this point (and in the code above that where you
also pointed it out.
And about pnv_phb4_update_regions(), v3 will need to handle it but not with
an assert but with a phb != NULL verification to become a NO-OP if phb is NULL.
It's an easier and less intrusive fix than trying to change the order of the
XSCOM initialization in stk_realize().
I will (hopefully) explain it better in the v3.
Thanks,
Daniel
Your changes seem to cleanup the stack <-> phb relation quite a lot. Which
is good.
Thanks,
C.