xen/VT-d: Remove the use of __LINE__ from IOMMU_WAIT_OP()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 24 Jan 2018 14:11:16 +0000 (14:11 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 25 Jan 2018 10:35:20 +0000 (10:35 +0000)
The use of __LINE__ in printk()'s is problematic for livepatching, as it tends
to cause unnecessary binary differences.

Take this opportunity to provide some rather more useful information than just
file/line/func in the form of the full register/stack trace leading to the
problem (which I've needed in the past for debugging).

Also, drop the unnecessary else clause while editing here here.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/drivers/passthrough/vtd/dmar.h

index 729b603525e90df039057c75d0ffb2300641381a..8f1b18ebb29aaa951f0fee04e471056e4dc4da47 100644 (file)
@@ -117,10 +117,11 @@ do {                                                \
             break;                                  \
         if ( NOW() > start_time + DMAR_OPERATION_TIMEOUT ) {    \
             if ( !kexecing )                                    \
-                panic("%s:%d:%s: DMAR hardware is malfunctional",\
-                      __FILE__, __LINE__, __func__);            \
-            else                                                \
-                break;                                          \
+            {                                                   \
+                dump_execution_state();                         \
+                panic("DMAR hardware malfunction");             \
+            }                                                   \
+            break;                                              \
         }                                                       \
         cpu_relax();                                            \
     }                                                           \