Skip to contentSkip to conversation

accel/tcg: Restrict curr_cflags() declaration to 'internal-common.h'

PATCH In review Philippe Mathieu-Daudé 2 participants 4 messages Dec 16, 2024 – Dec 20, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 accel/tcg: Restrict curr_cflags() declaration to 'internal-common.h'

curr_cflags() is only used within accel/tcg/, move its declaration to accel/tcg/internal-common.h.

---
 accel/tcg/internal-common.h | 3 +++
 include/exec/cpu-common.h   | 3 ---
 accel/tcg/watchpoint.c      | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)
accel/tcg/internal-common.h +3 -0
index a8fc3db7742..c8d714256cb 100644
@@ -56,4 +56,7 @@ void cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb,
 bool tcg_exec_realizefn(CPUState *cpu, Error **errp);
 void tcg_exec_unrealizefn(CPUState *cpu);
 
+/* current cflags for hashing/comparison */
+uint32_t curr_cflags(CPUState *cpu);
+
 #endif
include/exec/cpu-common.h +0 -3
index 638dc806a5f..ff9ea71f700 100644
@@ -190,9 +190,6 @@ void list_cpus(void);
 bool tcg_cflags_has(CPUState *cpu, uint32_t flags);
 void tcg_cflags_set(CPUState *cpu, uint32_t flags);
 
-/* current cflags for hashing/comparison */
-uint32_t curr_cflags(CPUState *cpu);
-
 /**
  * cpu_unwind_state_data:
  * @cpu: the cpu context
accel/tcg/watchpoint.c +1 -0
index e24baead562..fbaf45d10f2 100644
@@ -27,6 +27,7 @@
 #include "system/replay.h"
 #include "hw/core/tcg-cpu-ops.h"
 #include "hw/core/cpu.h"
+#include "internal-common.h"
 
 /*
  * Return true if this watchpoint address matches the specified
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Philippe Mathieu-Daudé

curr_cflags() is only used within accel/tcg/, move its declaration to accel/tcg/internal-common.h.

---
  accel/tcg/internal-common.h | 3 +++
  include/exec/cpu-common.h   | 3 ---
  accel/tcg/watchpoint.c      | 1 +
  3 files changed, 4 insertions(+), 3 deletions(-)

r~

#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 10 lines · Philippe Mathieu-Daudé

curr_cflags() is only used within accel/tcg/, move its declaration to accel/tcg/internal-common.h.

---
  accel/tcg/internal-common.h | 3 +++
  include/exec/cpu-common.h   | 3 ---
  accel/tcg/watchpoint.c      | 1 +
  3 files changed, 4 insertions(+), 3 deletions(-)

Thanks, queued.

r~

#3 lore raw
Quoted 13 lines · Richard Henderson
Quoted 10 lines · Philippe Mathieu-Daudé

curr_cflags() is only used within accel/tcg/, move its declaration to accel/tcg/internal-common.h.

---
  accel/tcg/internal-common.h | 3 +++
  include/exec/cpu-common.h   | 3 ---
  accel/tcg/watchpoint.c      | 1 +

  3 files changed, 4 insertions(+), 3 deletions(-)
Quoted 1 line

Thanks, queued.

Thanks but I'll take it via my tree to avoid blocking my PR :)