From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org
Subject: [PATCH 2/3 - qemu-kvm stable-1.0] Allow i8259 to build without i8254
Date: Thu, 24 May 2012 12:15:10 +1000 [thread overview]
Message-ID: <1337825710.3038.51.camel@pasglop> (raw)
This allows the i8259 emulation to be compiled without the i8254
emulation.
Currently the i8259 emulation code references some variables defined
in i8254.c for the "time-drift fix". This moves the definitions from
i8254.c to i8259.c so that i8259.c becomes independent of i8254.c.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
This appears to be unnecessary on qemu-kvm master or the main qemu
hw/i8254.c | 3 ++-
hw/i8259.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/i8254.c b/hw/i8254.c
index 019c7b8..878a47b 100644
--- a/hw/i8254.c
+++ b/hw/i8254.c
@@ -348,7 +348,8 @@ static uint32_t pit_ioport_read(void *opaque, uint32_t addr)
}
/* global counters for time-drift fix */
-int64_t timer_acks=0, timer_interrupts=0, timer_ints_to_push=0;
+extern int64_t timer_acks, timer_ints_to_push;
+int64_t timer_interrupts=0;
extern int time_drift_fix;
diff --git a/hw/i8259.c b/hw/i8259.c
index c5841c0..f33a25d 100644
--- a/hw/i8259.c
+++ b/hw/i8259.c
@@ -211,7 +211,7 @@ static void pic_intack(PicState *s, int irq)
}
extern int time_drift_fix;
-extern int64_t timer_acks, timer_ints_to_push;
+int64_t timer_acks=0, timer_ints_to_push=0;
int pic_read_irq(PicState *s)
{
reply other threads:[~2012-05-24 2:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337825710.3038.51.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox