[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()); +#else 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__); +#endif static void __init bootmem_region_add(unsigned long s, unsigned long e) { -- 2.4.3 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |