diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-02-04 10:27:44 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-02-04 10:27:44 +0100 |
commit | ba1b3afd50913473f3036a63b4a82d7ba5c42009 (patch) | |
tree | 9dff0ddec4bf8b927a025b4bf9882cb1731170f3 /xen/console.c | |
parent | bfdb3be16e5a20eebc97b3ca613d9a4da4465533 (diff) | |
parent | 51e87d005139a435cd846ac5c224eed5042c4fa0 (diff) |
Merge branch 'master' into master-gdb_stubs
Diffstat (limited to 'xen/console.c')
-rw-r--r-- | xen/console.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/xen/console.c b/xen/console.c index 9798ec0a..884376ff 100644 --- a/xen/console.c +++ b/xen/console.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 Samuel Thibault <samuel.thibault@ens-lyon.org> + * Copyright (C) 2006-2011 Free Software Foundation * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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(); } @@ -216,9 +220,6 @@ int hypcnclose(int dev, int flag) int hypcnprobe(struct consdev *cp) { - struct xencons_interface *my_console; - my_console = (void*) mfn_to_kv(boot_info.console_mfn); - cp->cn_dev = makedev(0, 0); cp->cn_pri = CN_INTERNAL; return 0; @@ -231,7 +232,9 @@ int hypcninit(struct consdev *cp) simple_lock_init(&outlock); simple_lock_init(&inlock); console = (void*) mfn_to_kv(boot_info.console_mfn); +#ifdef MACH_PV_PAGETABLES pmap_set_page_readwrite(console); +#endif /* MACH_PV_PAGETABLES */ hyp_evt_handler(boot_info.console_evtchn, hypcnintr, 0, SPL6); return 0; } |