WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

Re: [XenPPC] [PATCH] Booting xen_maple_defconfig kernel on bare hardware

On Mon, 2006-07-31 at 21:41 -0400, Amos Waterland wrote:
> diff -r 17aa29a18b08 drivers/xen/console/console.c
> --- a/drivers/xen/console/console.c   Thu Jul 27 18:57:20 2006 -0400
> +++ b/drivers/xen/console/console.c   Mon Jul 31 21:04:17 2006 -0400
> @@ -70,6 +70,7 @@
>   */
>  static enum { XC_OFF, XC_DEFAULT, XC_TTY, XC_SERIAL } xc_mode = XC_DEFAULT;
>  static int xc_num = -1;
> +enum { XC_NUM_MAX = 8 };
>  
>  #ifdef CONFIG_MAGIC_SYSRQ
>  static unsigned long sysrq_requested;
> @@ -576,6 +577,7 @@ static int __init xencons_init(void)
>  
>       xencons_ring_init();
>  
> +retry:
>       xencons_driver = alloc_tty_driver((xc_mode == XC_SERIAL) ?
>                                         1 : MAX_NR_CONSOLES);
>       if (xencons_driver == NULL)
> @@ -612,6 +614,15 @@ static int __init xencons_init(void)
>                      DRV(xencons_driver)->name_base);
>               put_tty_driver(xencons_driver);
>               xencons_driver = NULL;
> +
> +             /* Somebody, almost certainly the real serial port
> +                driver, registered ahead of us, so find the first
> +                unused minor.  */
> +             if (xc_num <= XC_NUM_MAX) {
> +                 xc_num++;
> +                 goto retry;
> +             }
> +
>               return rc;
>       }
>  

I don't understand why you're doing this. The solution is for the
console driver to use a new major number.

-- 
Hollis Blanchard
IBM Linux Technology Center


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

<Prev in Thread] Current Thread [Next in Thread>