Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34045
b: refs/heads/master
c: 790e05d
h: refs/heads/master
i:
  34043: 6222389
v: v3
  • Loading branch information
Stephen Rothwell committed Jul 14, 2006
1 parent 4e889ac commit a6e8241
Show file tree
Hide file tree
Showing 15 changed files with 655 additions and 49 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ca652c9396fa052815518e2b2ce2ebee6d9fb861
refs/heads/master: 790e05d8c2b9941218c7c9ffb5c318382fab0a8b
1 change: 0 additions & 1 deletion trunk/arch/powerpc/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#ifdef CONFIG_PPC64
#include <asm/paca.h>
#include <asm/lppaca.h>
#include <asm/iseries/hv_lp_event.h>
#include <asm/cache.h>
#include <asm/compat.h>
#endif
Expand Down
8 changes: 6 additions & 2 deletions trunk/arch/powerpc/platforms/iseries/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ menu "iSeries device drivers"
depends on PPC_ISERIES

config VIOCONS
tristate "iSeries Virtual Console Support"
tristate "iSeries Virtual Console Support (Obsolete)"
help
This is the old virtual console driver for legacy iSeries.
You should use the iSeries Hypervisor Virtual Console
support instead.

config VIODASD
tristate "iSeries Virtual I/O disk support"
help
If you are running on an iSeries system and you want to use
virtual disks created and managed by OS/400, say Y.
virtual disks created and managed by OS/400, say Y.

config VIOCD
tristate "iSeries Virtual I/O CD support"
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/powerpc/platforms/iseries/dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ static void __init dt_vdevices(struct iseries_flat_dt *dt)
dt_prop_u32(dt, "#address-cells", 1);
dt_prop_u32(dt, "#size-cells", 0);

dt_do_vdevice(dt, "vty", reg, -1, device_type_serial, NULL, 1);
dt_do_vdevice(dt, "vty", reg, -1, device_type_serial,
"IBM,iSeries-vty", 1);
reg++;

dt_do_vdevice(dt, "v-scsi", reg, -1, device_type_vscsi,
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/char/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,13 @@ config HVC_CONSOLE
console. This driver allows each pSeries partition to have a console
which is accessed via the HMC.

config HVC_ISERIES
bool "iSeries Hypervisor Virtual Console support"
depends on PPC_ISERIES && !VIOCONS
select HVC_DRIVER
help
iSeries machines support a hypervisor virtual console.

config HVC_RTAS
bool "IBM RTAS Console support"
depends on PPC_RTAS
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/char/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o
obj-$(CONFIG_SX) += sx.o generic_serial.o
obj-$(CONFIG_RIO) += rio/ generic_serial.o
obj-$(CONFIG_HVC_CONSOLE) += hvc_vio.o hvsi.o
obj-$(CONFIG_HVC_ISERIES) += hvc_iseries.o
obj-$(CONFIG_HVC_RTAS) += hvc_rtas.o
obj-$(CONFIG_HVC_DRIVER) += hvc_console.o
obj-$(CONFIG_RAW_DRIVER) += raw.o
Expand Down
14 changes: 9 additions & 5 deletions trunk/drivers/char/hvc_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ struct hvc_struct {
struct tty_struct *tty;
unsigned int count;
int do_wakeup;
char outbuf[N_OUTBUF] __ALIGNED__;
char *outbuf;
int outbuf_size;
int n_outbuf;
uint32_t vtermno;
struct hv_ops *ops;
Expand Down Expand Up @@ -505,7 +506,7 @@ static int hvc_write(struct tty_struct *tty, const unsigned char *buf, int count
if (hp->n_outbuf > 0)
hvc_push(hp);

while (count > 0 && (rsize = N_OUTBUF - hp->n_outbuf) > 0) {
while (count > 0 && (rsize = hp->outbuf_size - hp->n_outbuf) > 0) {
if (rsize > count)
rsize = count;
memcpy(hp->outbuf + hp->n_outbuf, buf, rsize);
Expand Down Expand Up @@ -538,7 +539,7 @@ static int hvc_write_room(struct tty_struct *tty)
if (!hp)
return -1;

return N_OUTBUF - hp->n_outbuf;
return hp->outbuf_size - hp->n_outbuf;
}

static int hvc_chars_in_buffer(struct tty_struct *tty)
Expand Down Expand Up @@ -728,12 +729,13 @@ static struct kobj_type hvc_kobj_type = {
};

struct hvc_struct __devinit *hvc_alloc(uint32_t vtermno, int irq,
struct hv_ops *ops)
struct hv_ops *ops, int outbuf_size)
{
struct hvc_struct *hp;
int i;

hp = kmalloc(sizeof(*hp), GFP_KERNEL);
hp = kmalloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size,
GFP_KERNEL);
if (!hp)
return ERR_PTR(-ENOMEM);

Expand All @@ -742,6 +744,8 @@ struct hvc_struct __devinit *hvc_alloc(uint32_t vtermno, int irq,
hp->vtermno = vtermno;
hp->irq = irq;
hp->ops = ops;
hp->outbuf_size = outbuf_size;
hp->outbuf = &((char *)hp)[ALIGN(sizeof(*hp), sizeof(long))];

kobject_init(&hp->kobj);
hp->kobj.ktype = &hvc_kobj_type;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/hvc_console.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extern int hvc_instantiate(uint32_t vtermno, int index, struct hv_ops *ops);

/* register a vterm for hvc tty operation (module_init or hotplug add) */
extern struct hvc_struct * __devinit hvc_alloc(uint32_t vtermno, int irq,
struct hv_ops *ops);
struct hv_ops *ops, int outbuf_size);
/* remove a vterm from hvc tty operation (modele_exit or hotplug remove) */
extern int __devexit hvc_remove(struct hvc_struct *hp);

Expand Down
Loading

0 comments on commit a6e8241

Please sign in to comment.