[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 08/22] ppc/xics: use the QOM inter
From: |
Cédric Le Goater |
Subject: |
Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 08/22] ppc/xics: use the QOM interface to resend irqs |
Date: |
Mon, 27 Feb 2017 09:45:44 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
>>>> void icp_set_cppr(ICPState *ss, uint8_t cppr)
>>>> @@ -262,7 +261,7 @@ void icp_set_cppr(ICPState *ss, uint8_t cppr)
>>>> }
>>>> } else {
>>>> if (!XISR(ss)) {
>>>> - icp_resend(ss);
>>>> + icp_resend(XICS_INTERFACE(qdev_get_machine()), ss);
>>>
>>> Here you're assuming that the machine is the implementor of the xics
>>> interface, which is kinda ugly. The ICP should have a pointer to the
>>> xics interface, which will eventually replace the pointer to the
>>> overall xics object it has now.
>>
>> yes. I will try improve that. I don't like those calls to
>> qdev_get_machine()either.
>>
>> There are done in a couple of places though, under spapr_cpu_core
>> to get XICS for instance.
>
> Right, but I'm happier with it there, in code that's definitely
> associated with a particular machine, rather than in the xics code
> which is at least somewhat reusable.
I fixed that with the backlink on the XICSFabric.
C.
- [Qemu-devel] [PATCH v2 06/22] ppc/xics: use the QOM interface under the sPAPR machine, (continued)
[Qemu-devel] [PATCH v2 09/22] ppc/xics: remove xics_find_source(), Cédric Le Goater, 2017/02/16
[Qemu-devel] [PATCH v2 10/22] ppc/xics: register the reset handler of ICS objects, Cédric Le Goater, 2017/02/16
[Qemu-devel] [PATCH v2 11/22] ppc/xics: remove the XICS list of ICS, Cédric Le Goater, 2017/02/16
[Qemu-devel] [PATCH v2 12/22] ppc/xics: extend the QOM interface to handle ICPs, Cédric Le Goater, 2017/02/16