summaryrefslogtreecommitdiff
path: root/xen
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-03-20 02:26:35 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-03-20 02:26:35 +0100
commit0410dd9e3fe657ef3d8334394180eac5956d407d (patch)
treeb3bbcec0436ffd11df122182229b2f3ad3ad1892 /xen
parent3799f797d1c8f440bd83c11db3d76a9fb93b6fdb (diff)
Complain about Xen console smash only once at a time
* xen/console.c (hypputc): Warning only once per console write about console ring smash.
Diffstat (limited to 'xen')
-rw-r--r--xen/console.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xen/console.c b/xen/console.c
index ed72d1a..cb61d45 100644
--- a/xen/console.c
+++ b/xen/console.c
@@ -47,9 +47,13 @@ int hypputc(int c)
hyp_console_io(CONSOLEIO_write, 1, kvtolin(&d));
} else {
spl_t spl = splhigh();
+ int complain;
simple_lock(&outlock);
while (hyp_ring_smash(console->out, console->out_prod, console->out_cons)) {
- hyp_console_put("ring smash\n");
+ if (!complain) {
+ complain = 1;
+ hyp_console_put("ring smash\n");
+ }
/* TODO: are we allowed to sleep in putc? */
hyp_yield();
}