ppc/pnv: make pnv_ics_get() use the chip8->phbs[] array
commitda6be50136800dee59e22ac95a6ee10c154e1210
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Tue, 21 Jun 2022 17:34:32 +0000 (21 14:34 -0300)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Wed, 6 Jul 2022 13:22:37 +0000 (6 10:22 -0300)
tree760227bf0f1870b573dd32dc098c5f8cb1159a30
parent792e8bb629c6c11e99b092d10790a6d027d7f2d2
ppc/pnv: make pnv_ics_get() use the chip8->phbs[] array

The function is working today by getting all the child objects of the
chip, interacting with each of them to check whether the child is a PHB,
and then doing what needs to be done.

We have all the chip PHBs in the phbs[] array so interacting with all
child objects is unneeded. Open code pnv_ics_get_phb_ics() into
pnv_ics_get() and remove both pnv_ics_get_phb_ics() and the
ForeachPhb3Args struct.

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220621173436.165912-5-danielhb413@gmail.com>
hw/ppc/pnv.c