[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/9] include: Move MMUAccessType to tlb-common.h
From: |
Anton Johansson |
Subject: |
[PATCH 2/9] include: Move MMUAccessType to tlb-common.h |
Date: |
Fri, 30 Jun 2023 14:25:44 +0200 |
This commit sets up and avoids circular inclusion in following commits.
CPUTLB and friends will be moved from cpu-defs.h to tlb-common.h and
depends on MMU_ACCESS_COUNT defined in hw/core/cpu.h, and hw/core/cpu.h
will in turn need to include tlb-common.h once the CPUTLB field has been
moved to CPUState.
Signed-off-by: Anton Johansson <anjo@rev.ng>
---
include/exec/tlb-common.h | 7 ++++++-
include/hw/core/cpu.h | 8 +-------
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/include/exec/tlb-common.h b/include/exec/tlb-common.h
index dc5a5faa0b..d1203354b4 100644
--- a/include/exec/tlb-common.h
+++ b/include/exec/tlb-common.h
@@ -19,7 +19,12 @@
#ifndef EXEC_TLB_COMMON_H
#define EXEC_TLB_COMMON_H 1
-#define CPU_TLB_ENTRY_BITS 5
+typedef enum MMUAccessType {
+ MMU_DATA_LOAD = 0,
+ MMU_DATA_STORE = 1,
+ MMU_INST_FETCH = 2
+#define MMU_ACCESS_COUNT 3
+} MMUAccessType;
/* Minimalized TLB entry for use by TCG fast path. */
typedef union CPUTLBEntry {
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index b08f8b7079..c226d7263c 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -25,6 +25,7 @@
#include "exec/cpu-common.h"
#include "exec/hwaddr.h"
#include "exec/memattrs.h"
+#include "exec/tlb-common.h"
#include "qapi/qapi-types-run-state.h"
#include "qemu/bitmap.h"
#include "qemu/rcu_queue.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 tcg-cpu-ops.h */
--
2.41.0
- [PATCH 0/9] Collapse CPUNegativeOffsetState into CPUState, Anton Johansson, 2023/06/30
- [PATCH 6/9] Move IcountDecr to CPUState and assert offset, Anton Johansson, 2023/06/30
- [PATCH 1/9] target/arm: Replace TARGET_PAGE_ENTRY_EXTRA, Anton Johansson, 2023/06/30
- [PATCH 2/9] include: Move MMUAccessType to tlb-common.h,
Anton Johansson <=
- [PATCH 7/9] include/exec: Remove [cpu|env]_neg() functions, Anton Johansson, 2023/06/30
- [PATCH 3/9] include/exec: Move CPUTLB and friends to tlb-common.h, Anton Johansson, 2023/06/30
- [PATCH 4/9] include/hw: introduce CPU_MAX_NEGATIVE_ENV_OFFSET, Anton Johansson, 2023/06/30
- [PATCH 9/9] include/exec: Remove CPUNegativeOffsetState, Anton Johansson, 2023/06/30
- [PATCH 8/9] target: Remove CPUNegativeOffsetState field from ArchCPU, Anton Johansson, 2023/06/30
- [PATCH 5/9] accel: Move CPUTLB to CPUState and assert offset, Anton Johansson, 2023/06/30