[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] x86/IRQ: add explicit tracing-enabled check to trace_irq_mask()



commit 92b80e3e3dfacf389cff797580b3806576051dfd
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Jul 4 17:42:25 2019 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jul 4 17:42:25 2019 +0200

    x86/IRQ: add explicit tracing-enabled check to trace_irq_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@xxxxxxxx>
    Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/irq.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 94682e4d58..2cac28aafb 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -99,8 +99,8 @@ void unlock_vector_lock(void)
     spin_unlock(&vector_lock);
 }
 
-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;
@@ -115,6 +115,13 @@ static void trace_irq_mask(uint32_t event, int irq, int 
vector,
     trace_var(event, 1, sizeof(d), &d);
 }
 
+static 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(int irq, int vector, const cpumask_t 
*cpu_mask)
 {
     cpumask_t online_mask;
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.