On 19.11.2024 13:59, Andrew Cooper wrote: > Eclair reports a Misra Rule 8.4 violation; that do_mca() can't see it's > declaration. It turns out that this is a consequence of do_mca() being > PV-only, and the declaration being compiled out in !PV builds. > > Therefore, arrange for do_mca() to be compiled out in !PV builds. This in > turn requires a number of static functions to become static inline.
Which generally we advocate against. The #ifdef variant you pointed at on Matrix wasn't all that bad. Plus ... > Signed-off-by: Andrew Cooper <[email protected]> > --- > CC: Jan Beulich <[email protected]> > CC: Roger Pau Monné <[email protected]> > CC: Stefano Stabellini <[email protected]> > CC: [email protected] <[email protected]> > > Bloat-o-meter on a !PV build reports: > > add/remove: 0/6 grow/shrink: 0/0 up/down: 0/-3717 (-3717) > Function old new delta > x86_mc_mceinject 31 - -31 > do_mca.cold 117 - -117 > x86_mc_msrinject 147 - -147 > x86_mc_msrinject.cold 230 - -230 > do_mc_get_cpu_info 500 - -500 > do_mca 2692 - -2692 ... what's the effect of the addition of "inline" on a PV=y build? By using the keyword, we may end up talking the compiler into inlining of code that better wouldn't be inlined. Jan
