Re: [PATCH v4 14/14] tty: gunyah: Add tty console driver for RM Console Services

Greg Kroah-Hartman
2022-10-07T07:40:19Z

On Thu, Oct 06, 2022 at 10:59:51PM -0700, Elliot Berman wrote:
> > > + */
> > > +#define RSC_MGR_TTY_ADAPTERS 16
> >
> > We can have dynamic tty devices, so I don't understand this comment.
> > What really is the problem here?
> >
>
> Yes, I see the confusion. Dynamic device addition of tty devices is
> supported. As I understand, you need to know the maximum number of lines
> that could be added, and that is limitation I was referring to.

What do you mean by "lines"? That's not a tty kernel term.

> Is this comment better?
>
> The Linux TTY code requires us to know ahead of time how many lines we
> might need. Each line here corresponds to a VM. 16 seems like a
> reasonable number of lines for systems that are running Gunyah and using
> the provided console interface.

Again, line? Do you mean port?

> > > + cons_data->tty_driver->driver_name = "gh";

KBUILD_MODNAME?

> > > + cons_data->tty_driver->name = "ttyGH";
> >
> > Where did you pick this name from?
> >
> > Where is it documented?
> >
>
> "GH" is the shorthand we've been using for "Gunyah". I didn't find
> documentation for dynamically assigned char devices, but if it exists, I can
> add entry for ttyGH.

Why use a new name at all? Why not stick with the existing tty names
and device numbers?

thanks,

greg k-h