From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Alessandro Di Federico" <ale@rev.ng>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: [PATCH 06/10] includes: move irq definitions out of cpu-all.h
Date: Mon, 20 Mar 2023 10:10:31 +0000 [thread overview]
Message-ID: <20230320101035.2214196-7-alex.bennee@linaro.org> (raw)
In-Reply-To: <20230320101035.2214196-1-alex.bennee@linaro.org>
These are common across all versions of the system so it would help if
we could use them for common code.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
include/exec/cpu-all.h | 52 +-------------------------
include/exec/cpu-irq.h | 83 ++++++++++++++++++++++++++++++++++++++++++
include/exec/poison.h | 13 -------
3 files changed, 84 insertions(+), 64 deletions(-)
create mode 100644 include/exec/cpu-irq.h
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 2eb1176538..6b8085cf19 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -297,57 +297,7 @@ void *page_get_target_data(target_ulong address)
CPUArchState *cpu_copy(CPUArchState *env);
-/* Flags for use in ENV->INTERRUPT_PENDING.
-
- The numbers assigned here are non-sequential in order to preserve
- binary compatibility with the vmstate dump. Bit 0 (0x0001) was
- previously used for CPU_INTERRUPT_EXIT, and is cleared when loading
- the vmstate dump. */
-
-/* External hardware interrupt pending. This is typically used for
- interrupts from devices. */
-#define CPU_INTERRUPT_HARD 0x0002
-
-/* Exit the current TB. This is typically used when some system-level device
- makes some change to the memory mapping. E.g. the a20 line change. */
-#define CPU_INTERRUPT_EXITTB 0x0004
-
-/* Halt the CPU. */
-#define CPU_INTERRUPT_HALT 0x0020
-
-/* Debug event pending. */
-#define CPU_INTERRUPT_DEBUG 0x0080
-
-/* Reset signal. */
-#define CPU_INTERRUPT_RESET 0x0400
-
-/* Several target-specific external hardware interrupts. Each target/cpu.h
- should define proper names based on these defines. */
-#define CPU_INTERRUPT_TGT_EXT_0 0x0008
-#define CPU_INTERRUPT_TGT_EXT_1 0x0010
-#define CPU_INTERRUPT_TGT_EXT_2 0x0040
-#define CPU_INTERRUPT_TGT_EXT_3 0x0200
-#define CPU_INTERRUPT_TGT_EXT_4 0x1000
-
-/* Several target-specific internal interrupts. These differ from the
- preceding target-specific interrupts in that they are intended to
- originate from within the cpu itself, typically in response to some
- instruction being executed. These, therefore, are not masked while
- single-stepping within the debugger. */
-#define CPU_INTERRUPT_TGT_INT_0 0x0100
-#define CPU_INTERRUPT_TGT_INT_1 0x0800
-#define CPU_INTERRUPT_TGT_INT_2 0x2000
-
-/* First unused bit: 0x4000. */
-
-/* The set of all bits that should be masked when single-stepping. */
-#define CPU_INTERRUPT_SSTEP_MASK \
- (CPU_INTERRUPT_HARD \
- | CPU_INTERRUPT_TGT_EXT_0 \
- | CPU_INTERRUPT_TGT_EXT_1 \
- | CPU_INTERRUPT_TGT_EXT_2 \
- | CPU_INTERRUPT_TGT_EXT_3 \
- | CPU_INTERRUPT_TGT_EXT_4)
+#include "exec/cpu-irq.h"
#ifdef CONFIG_USER_ONLY
diff --git a/include/exec/cpu-irq.h b/include/exec/cpu-irq.h
new file mode 100644
index 0000000000..58bd98d812
--- /dev/null
+++ b/include/exec/cpu-irq.h
@@ -0,0 +1,83 @@
+/*
+ * Internal execution defines for qemu irqs
+ *
+ * Copyright (c) 2003 Fabrice Bellard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef EXEC_CPU_IRQ_H
+#define EXEC_CPU_IRQ_H
+
+/*
+ * Flags for use in ENV->INTERRUPT_PENDING.
+ *
+ * The numbers assigned here are non-sequential in order to preserve
+ * binary compatibility with the vmstate dump. Bit 0 (0x0001) was
+ * previously used for CPU_INTERRUPT_EXIT, and is cleared when loading
+ * the vmstate dump.
+ */
+
+/*
+ * External hardware interrupt pending. This is typically used for
+ * interrupts from devices.
+ */
+#define CPU_INTERRUPT_HARD 0x0002
+
+/*
+ * Exit the current TB. This is typically used when some system-level device
+ * makes some change to the memory mapping. E.g. the a20 line change.
+ */
+#define CPU_INTERRUPT_EXITTB 0x0004
+
+/* Halt the CPU. */
+#define CPU_INTERRUPT_HALT 0x0020
+
+/* Debug event pending. */
+#define CPU_INTERRUPT_DEBUG 0x0080
+
+/* Reset signal. */
+#define CPU_INTERRUPT_RESET 0x0400
+
+/* Several target-specific external hardware interrupts. Each target/cpu.h
+ should define proper names based on these defines. */
+#define CPU_INTERRUPT_TGT_EXT_0 0x0008
+#define CPU_INTERRUPT_TGT_EXT_1 0x0010
+#define CPU_INTERRUPT_TGT_EXT_2 0x0040
+#define CPU_INTERRUPT_TGT_EXT_3 0x0200
+#define CPU_INTERRUPT_TGT_EXT_4 0x1000
+
+/*
+ * Several target-specific internal interrupts. These differ from the
+ * preceding target-specific interrupts in that they are intended to
+ * originate from within the cpu itself, typically in response to some
+ * instruction being executed. These, therefore, are not masked while
+ * single-stepping within the debugger.
+ */
+#define CPU_INTERRUPT_TGT_INT_0 0x0100
+#define CPU_INTERRUPT_TGT_INT_1 0x0800
+#define CPU_INTERRUPT_TGT_INT_2 0x2000
+
+/* First unused bit: 0x4000. */
+
+/* The set of all bits that should be masked when single-stepping. */
+#define CPU_INTERRUPT_SSTEP_MASK \
+ (CPU_INTERRUPT_HARD \
+ | CPU_INTERRUPT_TGT_EXT_0 \
+ | CPU_INTERRUPT_TGT_EXT_1 \
+ | CPU_INTERRUPT_TGT_EXT_2 \
+ | CPU_INTERRUPT_TGT_EXT_3 \
+ | CPU_INTERRUPT_TGT_EXT_4)
+
+#endif /* EXEC_CPU_IRQ_H */
diff --git a/include/exec/poison.h b/include/exec/poison.h
index 140daa4a85..a0ab1d7d46 100644
--- a/include/exec/poison.h
+++ b/include/exec/poison.h
@@ -52,19 +52,6 @@
#pragma GCC poison TARGET_PAGE_BITS
#pragma GCC poison TARGET_PAGE_ALIGN
-#pragma GCC poison CPU_INTERRUPT_HARD
-#pragma GCC poison CPU_INTERRUPT_EXITTB
-#pragma GCC poison CPU_INTERRUPT_HALT
-#pragma GCC poison CPU_INTERRUPT_DEBUG
-#pragma GCC poison CPU_INTERRUPT_TGT_EXT_0
-#pragma GCC poison CPU_INTERRUPT_TGT_EXT_1
-#pragma GCC poison CPU_INTERRUPT_TGT_EXT_2
-#pragma GCC poison CPU_INTERRUPT_TGT_EXT_3
-#pragma GCC poison CPU_INTERRUPT_TGT_EXT_4
-#pragma GCC poison CPU_INTERRUPT_TGT_INT_0
-#pragma GCC poison CPU_INTERRUPT_TGT_INT_1
-#pragma GCC poison CPU_INTERRUPT_TGT_INT_2
-
#pragma GCC poison CONFIG_ALPHA_DIS
#pragma GCC poison CONFIG_CRIS_DIS
#pragma GCC poison CONFIG_HPPA_DIS
--
2.39.2
next prev parent reply other threads:[~2023-03-20 10:11 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 10:10 [PATCH 00/10] accel/tcg: refactor the cpu-exec loop Alex Bennée
2023-03-20 10:10 ` [PATCH 01/10] metadata: add .git-blame-ignore-revs Alex Bennée
2023-03-21 14:17 ` Philippe Mathieu-Daudé
2023-03-20 10:10 ` [PATCH 02/10] accel/tcg: move cpu_reloading_memory_map into cpu-exec-softmmu Alex Bennée
2023-03-20 12:56 ` Claudio Fontana
2023-03-20 13:32 ` Alex Bennée
2023-03-20 14:01 ` Claudio Fontana
2023-03-20 14:33 ` Alex Bennée
2023-03-20 16:14 ` Richard Henderson
2023-03-21 16:07 ` Alessandro Di Federico via
2023-03-20 10:10 ` [PATCH 03/10] accel/tcg: move i386 halt handling to sysemu_ops Alex Bennée
2023-03-20 14:52 ` Philippe Mathieu-Daudé
2023-03-20 17:18 ` Alex Bennée
2023-03-20 15:23 ` Claudio Fontana
2023-03-20 15:34 ` Philippe Mathieu-Daudé
2023-03-21 8:47 ` Claudio Fontana
2023-03-20 17:20 ` Alex Bennée
2023-03-20 10:10 ` [PATCH 04/10] accel/tcg: don't bother with ifdef for CPU_DUMP_CCOP Alex Bennée
2023-03-20 16:16 ` Richard Henderson
2023-03-20 16:17 ` Richard Henderson
2023-03-20 10:10 ` [PATCH 05/10] accel/tcg: remove the fake_user_interrupt guards Alex Bennée
2023-03-20 16:18 ` Richard Henderson
2023-03-20 10:10 ` Alex Bennée [this message]
2023-03-20 16:20 ` [PATCH 06/10] includes: move irq definitions out of cpu-all.h Richard Henderson
2023-03-21 16:06 ` Alessandro Di Federico via
2023-03-22 5:25 ` Richard Henderson
2023-03-22 21:15 ` Alessandro Di Federico
2023-03-20 10:10 ` [PATCH 07/10] accel/tcg: use QEMU_IOTHREAD_LOCK_GUARD to cover the exit Alex Bennée
2023-03-20 14:55 ` Philippe Mathieu-Daudé
2023-03-20 16:21 ` Richard Henderson
2023-03-20 10:10 ` [PATCH 08/10] accel/tcg: push i386 specific hacks into handle_cpu_interrupt callback Alex Bennée
2023-03-20 16:27 ` Richard Henderson
2023-03-20 17:14 ` Alex Bennée
2023-03-21 6:04 ` Richard Henderson
2023-03-20 10:10 ` [PATCH 09/10] accel/tcg: re-inline the filtering of virtual IRQs but data driven Alex Bennée
2023-03-20 14:58 ` Philippe Mathieu-Daudé
2023-03-20 16:30 ` Richard Henderson
2023-03-20 10:10 ` [PATCH 10/10] accel/tcg: remove unused includes Alex Bennée
2023-03-20 16:30 ` Richard Henderson
2023-03-21 16:07 ` Alessandro Di Federico via
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=20230320101035.2214196-7-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=ale@rev.ng \
--cc=eduardo@habkost.net \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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;
as well as URLs for NNTP newsgroup(s).