From 0410dd9e3fe657ef3d8334394180eac5956d407d Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 20 Mar 2012 02:26:35 +0100 Subject: Complain about Xen console smash only once at a time * xen/console.c (hypputc): Warning only once per console write about console ring smash. --- xen/console.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'xen') 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(); } -- cgit v1.2.3