Message ID | 5CDE924602000078002300B7@prv1-mh.provo.novell.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86: IRQ management adjustments | expand |
On Fri, May 17, 2019 at 04:51:50AM -0600, Jan Beulich wrote: > The setup for calling trace_var() (which itself checks tb_init_done) is > non-negligible, and hence a separate outer-most check is warranted. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com> I think a macro or helper would be helpful: ie: trace_enabled or some such. Checking tb_init_done is as obvious as it could be IMO. Roger.
On 17/05/2019 11:51, Jan Beulich wrote: > --- a/xen/arch/x86/irq.c > +++ b/xen/arch/x86/irq.c > @@ -137,6 +137,13 @@ static void trace_irq_mask(uint32_t even > trace_var(event, 1, sizeof(d), &d); > } > > +static inline void trace_irq_mask(uint32_t event, int irq, int vector, No inline. Otherwise, Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> > + const cpumask_t *mask) > +{ > + if ( unlikely(tb_init_done) ) > + _trace_irq_mask(event, irq, vector, mask); > +} > + > static int __init _bind_irq_vector(struct irq_desc *desc, int vector, > const cpumask_t *cpu_mask) > { > > > >
On 03.07.2019 20:41, Andrew Cooper wrote: > On 17/05/2019 11:51, Jan Beulich wrote: >> --- a/xen/arch/x86/irq.c >> +++ b/xen/arch/x86/irq.c >> @@ -137,6 +137,13 @@ static void trace_irq_mask(uint32_t even >> trace_var(event, 1, sizeof(d), &d); >> } >> >> +static inline void trace_irq_mask(uint32_t event, int irq, int vector, > > No inline. Well, I think in cases like this one we really want it, but anyway, I'll drop it just to make progress here. > Otherwise, Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> Thanks, Jan
--- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -121,8 +121,8 @@ static void release_old_vec(struct irq_d } } -static void trace_irq_mask(uint32_t event, int irq, int vector, - const cpumask_t *mask) +static void _trace_irq_mask(uint32_t event, int irq, int vector, + const cpumask_t *mask) { struct { unsigned int irq:16, vec:16; @@ -137,6 +137,13 @@ static void trace_irq_mask(uint32_t even trace_var(event, 1, sizeof(d), &d); } +static inline void trace_irq_mask(uint32_t event, int irq, int vector, + const cpumask_t *mask) +{ + if ( unlikely(tb_init_done) ) + _trace_irq_mask(event, irq, vector, mask); +} + static int __init _bind_irq_vector(struct irq_desc *desc, int vector, const cpumask_t *cpu_mask) {
The setup for calling trace_var() (which itself checks tb_init_done) is non-negligible, and hence a separate outer-most check is warranted. Signed-off-by: Jan Beulich <jbeulich@suse.com> --- v3: New.