[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Bug fix for debugtrace_dump stuff.
ChangeSet 1.1236.32.1, 2005/03/14 18:44:10+00:00, mafetter@xxxxxxxxxxxxxxxx Bug fix for debugtrace_dump stuff. Signed-off-by: michael.fetterman@xxxxxxxxxxxx console.c | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) diff -Nru a/xen/drivers/char/console.c b/xen/drivers/char/console.c --- a/xen/drivers/char/console.c 2005-04-05 12:07:10 -04:00 +++ b/xen/drivers/char/console.c 2005-04-05 12:07:10 -04:00 @@ -511,7 +511,10 @@ spin_lock_irqsave(&debugtrace_lock, flags); + printk("debugtrace_dump() starting\n"); + /* Print oldest portion of the ring. */ + ASSERT(debugtrace_buf[debugtrace_bytes - 1] == 0); serial_puts(sercon_handle, &debugtrace_buf[debugtrace_prd]); /* Print youngest portion of the ring. */ @@ -520,6 +523,8 @@ memset(debugtrace_buf, '\0', debugtrace_bytes); + printk("debugtrace_dump() finished\n"); + spin_unlock_irqrestore(&debugtrace_lock, flags); watchdog_on = _watchdog_on; @@ -538,6 +543,8 @@ spin_lock_irqsave(&debugtrace_lock, flags); + ASSERT(debugtrace_buf[debugtrace_bytes - 1] == 0); + va_start(args, fmt); (void)vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); @@ -563,19 +570,23 @@ static int __init debugtrace_init(void) { int order; - unsigned int kbytes; + unsigned int kbytes, bytes; /* Round size down to next power of two. */ while ( (kbytes = (debugtrace_kilobytes & (debugtrace_kilobytes-1))) != 0 ) debugtrace_kilobytes = kbytes; - debugtrace_bytes = debugtrace_kilobytes << 10; - if ( debugtrace_bytes == 0 ) + bytes = debugtrace_kilobytes << 10; + if ( bytes == 0 ) return 0; - order = get_order(debugtrace_bytes); + order = get_order(bytes); debugtrace_buf = (unsigned char *)alloc_xenheap_pages(order); ASSERT(debugtrace_buf != NULL); + + memset(debugtrace_buf, '\0', bytes); + + debugtrace_bytes = bytes; return 0; } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |