On 08.08.2023 12:18, Andrew Cooper wrote:
> On 08/08/2023 10:46 am, Jan Beulich wrote:
>> There's no need for every arch to define its own identical copy. If down
>> the road an arch needs to customize it, we can add #ifndef around the
>> common #define.
>>
>> To be on the safe side build-breakage-wise, change a couple of #include
>> <asm/cache.h> to the xen/ equivalent.
>>
>> Signed-off-by: Jan Beulich <jbeul...@suse.com>
> 
> Could we find a better place to put this?
> 
> __read_mostly is just a section.  It's relationship to the cache is only
> microarchitectural, and is not the same kind of information as the rest
> of cache.h
> 
> __ro_after_init is only here because __read_mostly is here, but has
> absolutely nothing to do with caches whatsoever.
> 
> If we're cleaning them up, they ought to live elsewhere.

I would be considering init.h (for having most other __section() uses,
and for also needing __read_mostly), but that's not a great place to
put these either. In fact I see less connection there than for cache.h.
So the primary need is a good suggestion (I'm hesitant to suggest to
introduce section.h just for this). In the absence of this, can we
perhaps deal with this in a 2nd step, thus not blocking this patch and
therefore not needing to then also clean up PPC-specific code?

Jan

Reply via email to