diff mbox series

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

Message ID 20241216214030.59393-1-philmd@linaro.org
State Superseded
Headers show
Series accel/tcg: Restrict curr_cflags() declaration to 'internal-common.h' | expand

Commit Message

Philippe Mathieu-Daudé Dec. 16, 2024, 9:40 p.m. UTC
curr_cflags() is only used within accel/tcg/,
move its declaration to accel/tcg/internal-common.h.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 accel/tcg/internal-common.h | 3 +++
 include/exec/cpu-common.h   | 3 ---
 accel/tcg/watchpoint.c      | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

Comments

Richard Henderson Dec. 16, 2024, 10:03 p.m. UTC | #1
On 12/16/24 15:40, Philippe Mathieu-Daudé wrote:
> curr_cflags() is only used within accel/tcg/,
> move its declaration to accel/tcg/internal-common.h.
> 
> Suggested-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   accel/tcg/internal-common.h | 3 +++
>   include/exec/cpu-common.h   | 3 ---
>   accel/tcg/watchpoint.c      | 1 +
>   3 files changed, 4 insertions(+), 3 deletions(-)

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

r~
Richard Henderson Dec. 17, 2024, 2:22 p.m. UTC | #2
On 12/16/24 15:40, Philippe Mathieu-Daudé wrote:
> curr_cflags() is only used within accel/tcg/,
> move its declaration to accel/tcg/internal-common.h.
> 
> Suggested-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   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~
Philippe Mathieu-Daudé Dec. 20, 2024, 4:13 p.m. UTC | #3
On 17/12/24 15:22, Richard Henderson wrote:
> On 12/16/24 15:40, Philippe Mathieu-Daudé wrote:
>> curr_cflags() is only used within accel/tcg/,
>> move its declaration to accel/tcg/internal-common.h.
>>
>> Suggested-by: Richard Henderson <richard.henderson@linaro.org>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   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.

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

Patch

diff --git a/accel/tcg/internal-common.h b/accel/tcg/internal-common.h
index a8fc3db7742..c8d714256cb 100644
--- a/accel/tcg/internal-common.h
+++ b/accel/tcg/internal-common.h
@@ -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
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index 638dc806a5f..ff9ea71f700 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -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
diff --git a/accel/tcg/watchpoint.c b/accel/tcg/watchpoint.c
index e24baead562..fbaf45d10f2 100644
--- a/accel/tcg/watchpoint.c
+++ b/accel/tcg/watchpoint.c
@@ -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