From: kaf24@scramble.cl.cam.ac.uk Date: Sat, 6 Sep 2003 07:14:55 +0000 (+0000) Subject: bitkeeper revision 1.415 (3f59896f82Ngzs7C7TvsxYpfL-oQRQ) X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~18712 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=296af8e10a7cce8a62bbf989f9d8f6182f0fc9dd;p=xen.git bitkeeper revision 1.415 (3f59896f82Ngzs7C7TvsxYpfL-oQRQ) printk.c, init.c, console.c: Small cleanups. --- diff --git a/xenolinux-2.4.22-sparse/arch/xeno/drivers/console/console.c b/xenolinux-2.4.22-sparse/arch/xeno/drivers/console/console.c index e69cd2488e..b93fe47656 100644 --- a/xenolinux-2.4.22-sparse/arch/xeno/drivers/console/console.c +++ b/xenolinux-2.4.22-sparse/arch/xeno/drivers/console/console.c @@ -26,22 +26,22 @@ #define XENO_TTY_MINOR 123 -/*** useful function for console debugging -- goes straight to Xen ****/ - +/*** Useful function for console debugging -- goes straight to Xen ****/ asmlinkage int xprintk(const char *fmt, ...) { - va_list args; - unsigned long flags; - int printed_len; - static char printk_buf[1024]; - - /* Emit the output into the temporary buffer */ - va_start(args, fmt); - printed_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args); - va_end(args); - - // Useful Hack if things are going wrong very early in the day - (void)HYPERVISOR_console_write(printk_buf, sizeof(printk_buf)); + va_list args; + int printk_len; + static char printk_buf[1024]; + + /* Emit the output into the temporary buffer */ + va_start(args, fmt); + printk_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args); + va_end(args); + + /* Send the processed output directly to Xen. */ + (void)HYPERVISOR_console_write(printk_buf, printk_len); + + return 0; } diff --git a/xenolinux-2.4.22-sparse/arch/xeno/mm/init.c b/xenolinux-2.4.22-sparse/arch/xeno/mm/init.c index acce1fbfd7..352e614a05 100644 --- a/xenolinux-2.4.22-sparse/arch/xeno/mm/init.c +++ b/xenolinux-2.4.22-sparse/arch/xeno/mm/init.c @@ -178,10 +178,6 @@ static void __init fixrange_init (unsigned long start, (*(unsigned long *)kpte)&~_PAGE_RW); set_pmd(pmd, __pmd(_KERNPG_TABLE + __pa(pte))); - - // XXX Xen below reqd ? - //if (pte != pte_offset(pmd, 0)) - // BUG(); } vaddr += PMD_SIZE; } diff --git a/xenolinux-2.4.22-sparse/kernel/printk.c b/xenolinux-2.4.22-sparse/kernel/printk.c index a46602ca35..5564fccf5d 100644 --- a/xenolinux-2.4.22-sparse/kernel/printk.c +++ b/xenolinux-2.4.22-sparse/kernel/printk.c @@ -429,9 +429,10 @@ asmlinkage int printk(const char *fmt, ...) va_end(args); #if 0 -// Useful Hack if things are going wrong very early in the day -(void)HYPERVISOR_console_write(printk_buf, sizeof(printk_buf)); + /* Useful if things are going wrong very early in the day. */ + (void)HYPERVISOR_console_write(printk_buf, printed_len); #endif + /* * Copy the output into log_buf. If the caller didn't provide * appropriate log level tags, we insert them here