[RFC][PATCH] discontiguous vterms

Hollis Blanchard hollisb at us.ibm.com
Fri Oct 31 08:58:25 EST 2003


The patch I sent earlier today looks like it got stuck in a mailing
list queue. To summarize (because I'm impatient and have another
comment on the subject), the old hvc_console driver -> arch interface
was this:

extern int hvc_count(int *start_termno);
extern int hvc_get_chars(int index, char *buf, int count);
extern int hvc_put_chars(int index, const char *buf, int count);

(There is an interface to arch code so the generic driver can be used
in other environments or even architectures.) The interface I proposed
earlier today was:

extern int hvc_get_vterms(u32 array[], int arraylen);
extern int hvc_get_chars(int index, char *buf, int count);
extern int hvc_put_chars(int index, const char *buf, int count);

In fact, I'd like to change that even further. The arch code has reason
to want a "void *sysdata" field attached to each hvc_struct (there are
two types of console protocols, and the arch code needs to know which
type each hvc_struct uses). So the new proposal is:

extern int hvc_get_vterms(struct hvc_struct array[], int arraylen);
extern int hvc_get_chars(struct hvc_struct *console, char *buf, int
count);
extern int hvc_put_chars(struct hvc_struct *console, const char *buf,
int count);

Then hvc_get_vterms() can set 'hvc_struct.sysdata' and
hvc_get/put_chars() can use it.

--
Hollis Blanchard
IBM Linux Technology Center


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list