From: Max Filippov <jcmvbkbc@gmail.com>
To: qemu-devel@nongnu.org
Cc: Max Filippov <jcmvbkbc@gmail.com>
Subject: [Qemu-devel] [PATCH 1/4] target/xtensa: expose core runstall as an IRQ line
Date: Sun, 27 Jan 2019 18:09:34 -0800 [thread overview]
Message-ID: <20190128020937.22775-2-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <20190128020937.22775-1-jcmvbkbc@gmail.com>
Runstall signal looks very much like a level-triggered IRQ line. Provide
xtensa_get_runstall function that returns runstall IRQ.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
hw/xtensa/pic_cpu.c | 12 ++++++++++++
target/xtensa/cpu.h | 2 ++
2 files changed, 14 insertions(+)
diff --git a/hw/xtensa/pic_cpu.c b/hw/xtensa/pic_cpu.c
index 077f4ad53d6d..a8939f5e58d0 100644
--- a/hw/xtensa/pic_cpu.c
+++ b/hw/xtensa/pic_cpu.c
@@ -86,6 +86,12 @@ static void xtensa_ccompare_cb(void *opaque)
qemu_set_irq(env->irq_inputs[env->config->timerint[i]], 1);
}
+static void xtensa_set_runstall(void *opaque, int irq, int active)
+{
+ CPUXtensaState *env = opaque;
+ xtensa_runstall(env, active);
+}
+
void xtensa_irq_init(CPUXtensaState *env)
{
unsigned i;
@@ -106,9 +112,15 @@ void xtensa_irq_init(CPUXtensaState *env)
env->ext_irq_inputs[i] = env->irq_inputs[irq];
}
+ env->runstall_irq = qemu_allocate_irq(xtensa_set_runstall, env, 0);
}
qemu_irq *xtensa_get_extints(CPUXtensaState *env)
{
return env->ext_irq_inputs;
}
+
+qemu_irq xtensa_get_runstall(CPUXtensaState *env)
+{
+ return env->runstall_irq;
+}
diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h
index 176af8a53cf0..b665bfc0068a 100644
--- a/target/xtensa/cpu.h
+++ b/target/xtensa/cpu.h
@@ -485,6 +485,7 @@ typedef struct CPUXtensaState {
int pending_irq_level; /* level of last raised IRQ */
qemu_irq *irq_inputs;
qemu_irq ext_irq_inputs[MAX_NINTERRUPT];
+ qemu_irq runstall_irq;
XtensaCcompareTimer ccompare[MAX_NCCOMPARE];
uint64_t time_base;
uint64_t ccount_time;
@@ -571,6 +572,7 @@ void xtensa_sim_open_console(Chardev *chr);
void check_interrupts(CPUXtensaState *s);
void xtensa_irq_init(CPUXtensaState *env);
qemu_irq *xtensa_get_extints(CPUXtensaState *env);
+qemu_irq xtensa_get_runstall(CPUXtensaState *env);
int cpu_xtensa_signal_handler(int host_signum, void *pinfo, void *puc);
void xtensa_cpu_list(FILE *f, fprintf_function cpu_fprintf);
void xtensa_sync_window_from_phys(CPUXtensaState *env);
--
2.11.0
next prev parent reply other threads:[~2019-01-28 2:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-28 2:09 [Qemu-devel] [PATCH 0/4] target/xtensa: add SMP linux capable hardware Max Filippov
2019-01-28 2:09 ` Max Filippov [this message]
2019-01-28 2:09 ` [Qemu-devel] [PATCH 2/4] target/xtensa: add MX interrupt controller Max Filippov
2019-01-28 2:09 ` [Qemu-devel] [PATCH 3/4] hw/xtensa: xtfpga: use MX PIC for SMP Max Filippov
2019-01-28 2:09 ` [Qemu-devel] [PATCH 4/4] target-xtensa: add test_mmuhifi_c3 core Max Filippov
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=20190128020937.22775-2-jcmvbkbc@gmail.com \
--to=jcmvbkbc@gmail.com \
--cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.