aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2011-01-18 12:25:16 +0000
committerKeir Fraser <keir@xen.org>2011-01-18 12:25:16 +0000
commit649db76541d67b95b82e9c5316f4dead6344b37a (patch)
treed2728306e8519fc078aba7df4b9f11d675571d4f
parent8e56df6acffe292bad90d5680cd31b7ba1d845a4 (diff)
downloadxen-649db76541d67b95b82e9c5316f4dead6344b37a.tar.gz
xen-649db76541d67b95b82e9c5316f4dead6344b37a.tar.bz2
xen-649db76541d67b95b82e9c5316f4dead6344b37a.zip
xen: stringify assertion condition for printing sooner.
So that: (XEN) Assertion '!(((*({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"(&per_cpu____preempt_count)); (typeof(&per_cpu____preempt_count)) (__ptr + (get_cpu_info()->per_cpu_offset)); }))) || ((irq_stat[(((get_cpu_info()->processor_id)1... becomes: (XEN) Assertion '"!in_atomic()"' failed at softirq.c:61 Signed-off-by: Ian Campbell <ian.campbell@citrix.com> xen-unstable changeset: 22774:96441daf4a5b xen-unstable date: Tue Jan 18 09:01:57 2011 +0000
-rw-r--r--xen/include/asm-x86/bug.h2
-rw-r--r--xen/include/xen/lib.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/xen/include/asm-x86/bug.h b/xen/include/asm-x86/bug.h
index 60efca2244..05083e0168 100644
--- a/xen/include/asm-x86/bug.h
+++ b/xen/include/asm-x86/bug.h
@@ -40,7 +40,7 @@ struct bug_frame {
asm volatile ( \
"ud2 ; ret %0" BUG_STR(1) BUG_STR(2) \
: : "i" (BUGFRAME_assert | (__LINE__<<2)), \
- "i" (__FILE__), "i" (#p) )
+ "i" (__FILE__), "i" (p) )
#endif /* __X86_BUG_H__ */
diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h
index d21e8dd5c0..5adddb4cb6 100644
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -27,7 +27,7 @@ void __warn(char *file, int line);
#ifndef assert_failed
#define assert_failed(p) \
do { \
- printk("Assertion '%s' failed, line %d, file %s\n", #p , \
+ printk("Assertion '%s' failed, line %d, file %s\n", p , \
__LINE__, __FILE__); \
BUG(); \
} while (0)
@@ -35,7 +35,7 @@ do { \
#ifndef NDEBUG
#define ASSERT(p) \
- do { if ( unlikely(!(p)) ) assert_failed(p); } while (0)
+ do { if ( unlikely(!(p)) ) assert_failed(#p); } while (0)
#else
#define ASSERT(p) ((void)0)
#endif