Eduardo Habkost <ehabk...@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 <ehabk...@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

Reply via email to