[RFC PATCH 22/34] accel/tcg: [CPUTLB] Move CPU_TLB_DYN_[DEFAULT|MIN]* to cputlb.c

Anton Johansson via posted 34 patches 10 months, 1 week ago
[RFC PATCH 22/34] accel/tcg: [CPUTLB] Move CPU_TLB_DYN_[DEFAULT|MIN]* to cputlb.c
Posted by Anton Johansson via 10 months, 1 week ago
These macros are only used for softmmu targets and only used in
cputlb.c, move definitions there.

Signed-off-by: Anton Johansson <anjo@rev.ng>
---
 include/exec/cpu-defs.h | 3 ---
 accel/tcg/cputlb.c      | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h
index e8ccbe4bef..4b369e39b0 100644
--- a/include/exec/cpu-defs.h
+++ b/include/exec/cpu-defs.h
@@ -55,9 +55,6 @@
 #include "exec/target_long.h"
 
 #if defined(CONFIG_SOFTMMU) && defined(CONFIG_TCG)
-#define CPU_TLB_DYN_MIN_BITS 6
-#define CPU_TLB_DYN_DEFAULT_BITS 8
-
 # if HOST_LONG_BITS == 32
 /* Make sure we do not require a double-word shift for the TLB load */
 #  define CPU_TLB_DYN_MAX_BITS (32 - TARGET_PAGE_BITS)
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index 42be5b6289..a75a52d141 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -43,6 +43,9 @@
 #include "tcg/tcg-ldst.h"
 #include "tcg-target-reg-bits.h"
 
+#define CPU_TLB_DYN_MIN_BITS 6
+#define CPU_TLB_DYN_DEFAULT_BITS 8
+
 /* DEBUG defines, enable DEBUG_TLB_LOG to log to the CPU_LOG_MMU target */
 /* #define DEBUG_TLB */
 /* #define DEBUG_TLB_LOG */
-- 
2.43.0
Re: [RFC PATCH 22/34] accel/tcg: [CPUTLB] Move CPU_TLB_DYN_[DEFAULT|MIN]* to cputlb.c
Posted by Richard Henderson 10 months, 1 week ago
On 1/20/24 00:40, Anton Johansson wrote:
> These macros are only used for softmmu targets and only used in
> cputlb.c, move definitions there.
> 
> Signed-off-by: Anton Johansson<anjo@rev.ng>
> ---
>   include/exec/cpu-defs.h | 3 ---
>   accel/tcg/cputlb.c      | 3 +++
>   2 files changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~