diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-05 10:58:07 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-05 10:58:07 -0800 |
commit | 9a6fc8d0f8c3ee3d42417e8315fc8c8fae1d3213 (patch) | |
tree | b4bd15742d56e488592203e1d0a0d07a0684410d /drivers/char | |
parent | d4116f820496ae3af5225d09450edc7791df0045 (diff) | |
parent | 82d6469916c6fcfa345636a49004c9d1753905d1 (diff) | |
download | blackbird-op-linux-9a6fc8d0f8c3ee3d42417e8315fc8c8fae1d3213.tar.gz blackbird-op-linux-9a6fc8d0f8c3ee3d42417e8315fc8c8fae1d3213.zip |
Merge branch 'bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
* 'bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
xen: mask extended topology info in cpuid
xen/hvc: make sure console output is always emitted, with explicit polling
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/hvc_xen.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/char/hvc_xen.c b/drivers/char/hvc_xen.c index eba999f8598d..a6ee32b599a8 100644 --- a/drivers/char/hvc_xen.c +++ b/drivers/char/hvc_xen.c @@ -55,7 +55,7 @@ static inline void notify_daemon(void) notify_remote_via_evtchn(xen_start_info->console.domU.evtchn); } -static int write_console(uint32_t vtermno, const char *data, int len) +static int __write_console(const char *data, int len) { struct xencons_interface *intf = xencons_interface(); XENCONS_RING_IDX cons, prod; @@ -76,6 +76,29 @@ static int write_console(uint32_t vtermno, const char *data, int len) return sent; } +static int write_console(uint32_t vtermno, const char *data, int len) +{ + int ret = len; + + /* + * Make sure the whole buffer is emitted, polling if + * necessary. We don't ever want to rely on the hvc daemon + * because the most interesting console output is when the + * kernel is crippled. + */ + while (len) { + int sent = __write_console(data, len); + + data += sent; + len -= sent; + + if (unlikely(len)) + HYPERVISOR_sched_op(SCHEDOP_yield, NULL); + } + + return ret; +} + static int read_console(uint32_t vtermno, char *buf, int len) { struct xencons_interface *intf = xencons_interface(); |