[RFC PATCH 1/3] move hvc_console headers around

arnd at arndb.de arnd at arndb.de
Sat Dec 17 22:38:37 EST 2005


On Sünnavend 17 Dezember 2005 06:02, Milton Miller wrote:
> 
> On Dec 16, 2005, at 6:10 PM, Arnd Bergmann wrote:
> >   */
> >  #define HVC_ALLOC_TTY_ADAPTERS	8
> 
> This patch misses the requested cleanup of moving this define for the 
> total number of tty devices registered to the .h

What's the point of moving it to a header file if no other file needs
to know the value?

> and sanitizing that  against the number of consoles.

> Currently we can recoginse the first 16 devices in the device tree and 
> choose any one of them as the kernel console, but we only allow the 
> first 8 to have a tty (and hence allow /dev/console to be opened).

I understood the problem, but did not want to make functional changes to
the hvc_vio driver in my cleanup of the cleanup. What do you suggest as
a fix for this? Should the number be limited at all?
 
> >
> > +
> > +/*
> > + * This is a design shortcoming, the number '16' is a vio required 
> > buffer
> > + * size.  This should be changeable per architecture, but hvc_struct 
> > relies
> > + * upon it and that struct is used by all hvc_console backend 
> > drivers.  This
> > + * needs to be fixed.
> > + */
> 
> This is a bit strong.  vio requires inbuf to be at least 16, and will 
> process upto 16 in outbound.   They could be bigger, it will only cause 
> the hvc_driver to loop.  Outbound couuld be smaller, but it would 
> reduce the efficency.
ok

> > +#ifndef HVC_CONSOLE_H
> > +#define HVC_CONSOLE_H
> > +
> > +#include <linux/spinlock.h>
> > +#include <linux/list.h>
> > +#include <linux/kobject.h>
> > +
> 
> Since we removed thie actual definition of the struct, these includes 
> should go back to hvc_console.c (and any other file that needs them).

correct. I missed that when moving the struct again.

	Arnd <><



More information about the Linuxppc64-dev mailing list