diff options
Diffstat (limited to 'linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c')
-rw-r--r-- | linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c b/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c index ccbcf5e7db..2d6eb044b6 100644 --- a/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c +++ b/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c @@ -30,6 +30,12 @@ static inline struct xencons_interface *xencons_interface(void) return mfn_to_virt(xen_start_info->console_mfn); } +static inline void notify_daemon(void) +{ + /* Use evtchn: this is called early, before irq is set up. */ + notify_remote_via_evtchn(xen_start_info->console_evtchn); +} + int xencons_ring_send(const char *data, unsigned len) { int sent = 0; @@ -47,8 +53,7 @@ int xencons_ring_send(const char *data, unsigned len) wmb(); intf->out_prod = prod; - /* Use evtchn: this is called early, before irq is set up. */ - notify_remote_via_evtchn(xen_start_info->console_evtchn); + notify_daemon(); return sent; } @@ -70,9 +75,11 @@ static irqreturn_t handle_input(int irq, void *unused, struct pt_regs *regs) 1, regs); } - wmb(); + mb(); intf->in_cons = cons; + notify_daemon(); + return IRQ_HANDLED; } @@ -102,6 +109,9 @@ int xencons_ring_init(void) xencons_irq = err; + /* In case we have in-flight data after save/restore... */ + notify_daemon(); + return 0; } |