ia64/xen-unstable

changeset 701:04ee411a15a2

bitkeeper revision 1.415 (3f59896f82Ngzs7C7TvsxYpfL-oQRQ)

printk.c, init.c, console.c:
Small cleanups.
author kaf24@scramble.cl.cam.ac.uk
date Sat Sep 06 07:14:55 2003 +0000 (2003-09-06)
parents 4145c2f30e68
children 5c88e89672e8
files xenolinux-2.4.22-sparse/arch/xeno/drivers/console/console.c xenolinux-2.4.22-sparse/arch/xeno/mm/init.c xenolinux-2.4.22-sparse/kernel/printk.c
line diff
     1.1 --- a/xenolinux-2.4.22-sparse/arch/xeno/drivers/console/console.c	Sat Sep 06 07:03:03 2003 +0000
     1.2 +++ b/xenolinux-2.4.22-sparse/arch/xeno/drivers/console/console.c	Sat Sep 06 07:14:55 2003 +0000
     1.3 @@ -26,22 +26,22 @@
     1.4  
     1.5  #define XENO_TTY_MINOR 123
     1.6  
     1.7 -/*** useful function for console debugging -- goes straight to Xen ****/
     1.8 -
     1.9 +/*** Useful function for console debugging -- goes straight to Xen ****/
    1.10  asmlinkage int xprintk(const char *fmt, ...)
    1.11  {
    1.12 -        va_list args;
    1.13 -        unsigned long flags;
    1.14 -        int printed_len;
    1.15 -        static char printk_buf[1024];
    1.16 +    va_list args;
    1.17 +    int printk_len;
    1.18 +    static char printk_buf[1024];
    1.19 +    
    1.20 +    /* Emit the output into the temporary buffer */
    1.21 +    va_start(args, fmt);
    1.22 +    printk_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args);
    1.23 +    va_end(args);
    1.24 +    
    1.25 +    /* Send the processed output directly to Xen. */
    1.26 +    (void)HYPERVISOR_console_write(printk_buf, printk_len);
    1.27  
    1.28 -        /* Emit the output into the temporary buffer */
    1.29 -        va_start(args, fmt);
    1.30 -        printed_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args);
    1.31 -        va_end(args);
    1.32 -
    1.33 -        // Useful Hack if things are going wrong very early in the day
    1.34 -        (void)HYPERVISOR_console_write(printk_buf, sizeof(printk_buf));
    1.35 +    return 0;
    1.36  }
    1.37  
    1.38  
     2.1 --- a/xenolinux-2.4.22-sparse/arch/xeno/mm/init.c	Sat Sep 06 07:03:03 2003 +0000
     2.2 +++ b/xenolinux-2.4.22-sparse/arch/xeno/mm/init.c	Sat Sep 06 07:14:55 2003 +0000
     2.3 @@ -178,10 +178,6 @@ static void __init fixrange_init (unsign
     2.4                                        (*(unsigned long *)kpte)&~_PAGE_RW);
     2.5  
     2.6  				set_pmd(pmd, __pmd(_KERNPG_TABLE + __pa(pte)));
     2.7 -
     2.8 -				// XXX Xen below reqd ?
     2.9 -				//if (pte != pte_offset(pmd, 0))
    2.10 -				//	BUG();
    2.11  			}
    2.12  			vaddr += PMD_SIZE;
    2.13  		}
     3.1 --- a/xenolinux-2.4.22-sparse/kernel/printk.c	Sat Sep 06 07:03:03 2003 +0000
     3.2 +++ b/xenolinux-2.4.22-sparse/kernel/printk.c	Sat Sep 06 07:14:55 2003 +0000
     3.3 @@ -429,9 +429,10 @@ asmlinkage int printk(const char *fmt, .
     3.4  	va_end(args);
     3.5  
     3.6  #if 0
     3.7 -// Useful Hack if things are going wrong very early in the day
     3.8 -(void)HYPERVISOR_console_write(printk_buf, sizeof(printk_buf));
     3.9 +	/* Useful if things are going wrong very early in the day. */
    3.10 +	(void)HYPERVISOR_console_write(printk_buf, printed_len);
    3.11  #endif
    3.12 +
    3.13  	/*
    3.14  	 * Copy the output into log_buf.  If the caller didn't provide
    3.15  	 * appropriate log level tags, we insert them here