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

[Xen-devel] [PATCH v1 4/7] page-alloc: Remove dependency on __LINE__ for release builds

When using xsplice, use of __LINE__ can generate spurious changes in
functions due to embedded line numbers.  For release builds, remove the
use of these line numbers in BOOT_BUG_ON() and print the current text
address instead.

Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
 xen/common/page_alloc.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 98e30e5..8355894 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -206,11 +206,19 @@ struct scrub_region {
 static struct scrub_region __initdata region[MAX_NUMNODES];
 static unsigned long __initdata chunk_size;
+#ifdef NDEBUG
+static void __init boot_bug(void *addr)
+    panic("Boot BUG at %p", addr);
+#define BOOT_BUG_ON(p) if ( p ) boot_bug(current_text_addr());
 static void __init boot_bug(int line)
     panic("Boot BUG at %s:%d", __FILE__, line);
 #define BOOT_BUG_ON(p) if ( p ) boot_bug(__LINE__);
 static void __init bootmem_region_add(unsigned long s, unsigned long e)

Xen-devel mailing list



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