diff options
author | Andrew Cooper <andrew.cooper3@citrix.com> | 2013-08-06 14:48:36 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-08-08 12:03:09 +0100 |
commit | 20025504271220ab3bf041955a3cd40c6057e58e (patch) | |
tree | 19eed07173a6d33114837bb01905b70758117fbb /tools/firmware | |
parent | df385252a770fe2e304ab51283b26d6afc6990d1 (diff) | |
download | xen-20025504271220ab3bf041955a3cd40c6057e58e.tar.gz xen-20025504271220ab3bf041955a3cd40c6057e58e.tar.bz2 xen-20025504271220ab3bf041955a3cd40c6057e58e.zip |
rombios/keyboard: Don't needlessly poll the status register
Repeated polling of the status register is not going to change its value, so
don't needlessly take 8192 traps to Qemu when 1 will do.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'tools/firmware')
-rw-r--r-- | tools/firmware/rombios/rombios.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/firmware/rombios/rombios.c b/tools/firmware/rombios/rombios.c index 80980b67f8..e364759b3b 100644 --- a/tools/firmware/rombios/rombios.c +++ b/tools/firmware/rombios/rombios.c @@ -1805,12 +1805,12 @@ keyboard_init() while ( (inb(0x64) & 0x02) && (--max>0)) outb(0x80, 0x00); /* flush incoming keys */ - max=0x2000; + max=2; while (--max > 0) { outb(0x80, 0x00); if (inb(0x64) & 0x01) { inb(0x60); - max = 0x2000; + max = 2; } } |