From: Andrew Cooper Date: Wed, 24 Jan 2018 14:11:16 +0000 (+0000) Subject: xen/VT-d: Remove the use of __LINE__ from IOMMU_WAIT_OP() X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~704 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2375832c7e51b67f076e6b07854c4a541cb4bdc3;p=xen.git xen/VT-d: Remove the use of __LINE__ from IOMMU_WAIT_OP() 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 Reviewed-by: Jan Beulich Acked-by: Kevin Tian --- diff --git a/xen/drivers/passthrough/vtd/dmar.h b/xen/drivers/passthrough/vtd/dmar.h index 729b603525..8f1b18ebb2 100644 --- a/xen/drivers/passthrough/vtd/dmar.h +++ b/xen/drivers/passthrough/vtd/dmar.h @@ -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(); \ } \