|
From: | Daniel Henrique Barboza |
Subject: | Re: [PATCH v2 17/18] ppc/pnv: Introduce user creatable pnv-phb4 devices |
Date: | Sat, 8 Jan 2022 09:58:31 -0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |