[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 30/38] exec: Declare MMUAccessType type in 'mmu-access-type.h' hea
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 30/38] exec: Declare MMUAccessType type in 'mmu-access-type.h' header |
Date: |
Fri, 26 Apr 2024 21:41:50 +0200 |
The MMUAccessType enum is declared in "hw/core/cpu.h".
"hw/core/cpu.h" contains declarations related to CPUState
and CPUClass. Some source files only require MMUAccessType
and don't need to pull in all CPU* declarations. In order
to simplify, create a new "exec/mmu-access-type.h" header.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240418192525.97451-2-philmd@linaro.org>
---
include/exec/cpu_ldst.h | 1 +
include/exec/exec-all.h | 1 +
include/exec/mmu-access-type.h | 18 ++++++++++++++++++
include/hw/core/cpu.h | 8 +-------
4 files changed, 21 insertions(+), 7 deletions(-)
create mode 100644 include/exec/mmu-access-type.h
diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h
index 64e0319996..5b99666702 100644
--- a/include/exec/cpu_ldst.h
+++ b/include/exec/cpu_ldst.h
@@ -64,6 +64,7 @@
#include "exec/memopidx.h"
#include "exec/abi_ptr.h"
+#include "exec/mmu-access-type.h"
#include "qemu/int128.h"
#include "cpu.h"
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 530d442112..4c5e470581 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -25,6 +25,7 @@
#include "exec/abi_ptr.h"
#include "exec/cpu_ldst.h"
#endif
+#include "exec/mmu-access-type.h"
#include "exec/translation-block.h"
#include "qemu/clang-tsa.h"
diff --git a/include/exec/mmu-access-type.h b/include/exec/mmu-access-type.h
new file mode 100644
index 0000000000..28bbb05b94
--- /dev/null
+++ b/include/exec/mmu-access-type.h
@@ -0,0 +1,18 @@
+/*
+ * QEMU MMU Access type definitions
+ *
+ * Copyright (c) 2012 SUSE LINUX Products GmbH
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+#ifndef EXEC_MMU_ACCESS_TYPE_H
+#define EXEC_MMU_ACCESS_TYPE_H
+
+typedef enum MMUAccessType {
+ MMU_DATA_LOAD = 0,
+ MMU_DATA_STORE = 1,
+ MMU_INST_FETCH = 2
+#define MMU_ACCESS_COUNT 3
+} MMUAccessType;
+
+#endif
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index d89b2cffcb..759c3e7d89 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -25,6 +25,7 @@
#include "exec/hwaddr.h"
#include "exec/vaddr.h"
#include "exec/memattrs.h"
+#include "exec/mmu-access-type.h"
#include "exec/tlb-common.h"
#include "qapi/qapi-types-run-state.h"
#include "qemu/bitmap.h"
@@ -80,13 +81,6 @@ DECLARE_CLASS_CHECKERS(CPUClass, CPU,
typedef struct ArchCPU CpuInstanceType; \
OBJECT_DECLARE_TYPE(ArchCPU, CpuClassType, CPU_MODULE_OBJ_NAME);
-typedef enum MMUAccessType {
- MMU_DATA_LOAD = 0,
- MMU_DATA_STORE = 1,
- MMU_INST_FETCH = 2
-#define MMU_ACCESS_COUNT 3
-} MMUAccessType;
-
typedef struct CPUWatchpoint CPUWatchpoint;
/* see accel-cpu.h */
--
2.41.0
- [PULL 18/38] accel/tcg: Rename load-extract/store-insert headers using .h.inc suffix, (continued)
- [PULL 18/38] accel/tcg: Rename load-extract/store-insert headers using .h.inc suffix, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 20/38] accel/whpx: Use accel-specific per-vcpu @dirty field, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 21/38] accel/nvmm: Use accel-specific per-vcpu @dirty field, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 24/38] exec/cpu-all: Remove unused 'qemu/thread.h' header, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 25/38] exec/cpu-all: Remove unused tswapls() definitions, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 23/38] exec/cpu-all: Reduce 'qemu/rcu.h' header inclusion, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 26/38] exec: Declare target_words_bigendian() in 'exec/tswap.h', Philippe Mathieu-Daudé, 2024/04/26
- [PULL 27/38] exec: Move [b]tswapl() declarations to 'exec/user/tswap-target.h', Philippe Mathieu-Daudé, 2024/04/26
- [PULL 28/38] exec/user: Do not include 'cpu.h' in 'abitypes.h', Philippe Mathieu-Daudé, 2024/04/26
- [PULL 29/38] exec: Declare abi_ptr type in its own 'abi_ptr.h' header, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 30/38] exec: Declare MMUAccessType type in 'mmu-access-type.h' header,
Philippe Mathieu-Daudé <=
- [PULL 31/38] exec: Declare CPUBreakpoint/CPUWatchpoint type in 'breakpoint.h' header, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 32/38] exec: Restrict TCG specific declarations of 'cputlb.h', Philippe Mathieu-Daudé, 2024/04/26
- [PULL 33/38] exec: Restrict 'cpu_ldst.h' to TCG accelerator, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 34/38] exec: Rename 'exec/user/guest-base.h' as 'user/guest-base.h', Philippe Mathieu-Daudé, 2024/04/26
- [PULL 35/38] exec: Restrict inclusion of 'user/guest-base.h', Philippe Mathieu-Daudé, 2024/04/26
- [PULL 36/38] exec: Move CPUTLBEntry helpers to cputlb.c, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 37/38] hw/core: Avoid including the full 'hw/core/cpu.h' in 'tcg-cpu-ops.h', Philippe Mathieu-Daudé, 2024/04/26
- [PULL 38/38] plugins: Include missing 'qemu/bitmap.h' header, Philippe Mathieu-Daudé, 2024/04/26
- Re: [PULL 00/38] Exec / accelerators patches, Richard Henderson, 2024/04/27