[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] hw/core: Add bql_interrupt flag to CPUClass
From: |
Alex Bennée |
Subject: |
Re: [PATCH 1/2] hw/core: Add bql_interrupt flag to CPUClass |
Date: |
Sun, 02 Aug 2020 17:05:04 +0100 |
User-agent: |
mu4e 1.5.5; emacs 28.0.50 |
Eduardo Habkost <ehabkost@redhat.com> writes:
> On Fri, Jul 31, 2020 at 03:14:02PM -0400, Robert Foley wrote:
>> On Fri, 31 Jul 2020 at 13:44, Eduardo Habkost <ehabkost@redhat.com> wrote:
>> > >
>> > > +static inline void cpu_class_disable_bql_interrupt(CPUClass *cc)
>> > > +{
>> > > + cc->bql_interrupt = false;
>> > > +}
>> >
>> > Class data is not supposed to change outside class_init. Why do
>> > you need this function? I don't see it being used anywhere in
>> > this series.
>>
>> This function was to be called from changes in a later patch series
>> that depend on these changes. BTW, I added a correction above,
>> it should be disable, not enable. The idea is that it is initialized to
>> true,
>> but then the per arch changes would use this call at init time to set
>> it to false
>> as needed.
>
> If you plan to call it from class_init, I don't think you need a
> wrapper. You can simply set cc->bql_interrupt=false directly
> inside arch-specific class_init functions.
We just need to be careful of the ordering so the base class init goes
first. Is that always the case?
>
> If you plan to call it from somewhere else, then maybe the field
> doesn't belong to CPUClass.
>
>>
>> We can remove this function from this series and add it in later when
>> it gets used,
>> it might make things more clear.
>
> Makes sense to me.
--
Alex Bennée
- Re: [PATCH 1/2] hw/core: Add bql_interrupt flag to CPUClass,
Alex Bennée <=