[RFC PATCH 3/3] add hvc backend for rtas

Arnd Bergmann arndb at de.ibm.com
Wed Dec 21 01:50:42 EST 2005


On Sünnavend 17 Dezember 2005 05:44, Milton Miller wrote:
> While the cookie could be zero, defining it non-zero per driver means 
> that if two console drivers both register with the core, we will 
> guarantee that /dev/console output is sent to the same driver as the 
> kernel printks.  The other driver will get assigned a minor number 
> above the last minor requested during the first scan.

How about using separate number spaces for each type of console
backend? AFAICS, this little change should do.

I'll send it as part of the updated set of console patches.

	Arnd <><

--- linux-2.6.15-rc.orig/drivers/char/hvc_console.c
+++ linux-2.6.15-rc/drivers/char/hvc_console.c
@@ -766,7 +766,8 @@ struct hvc_struct __devinit *hvc_alloc(u
         * see if this vterm id matches one registered for console.
         */
        for (i=0; i < MAX_NR_HVC_CONSOLES; i++)
-               if (vtermnos[i] == hp->vtermno)
+               if (vtermnos[i] == hp->vtermno &&
+                   cons_ops[i] == hp->ops)
                        break;

        /* no matching slot, just use a counter */



More information about the Linuxppc64-dev mailing list