qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 15/24] exec/cpu-all: Remove unused headers


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 15/24] exec/cpu-all: Remove unused headers
Date: Tue, 12 Dec 2023 13:24:26 +0100
User-agent: Mozilla Thunderbird

On 12/12/23 00:16, Richard Henderson wrote:
On 12/11/23 13:19, Philippe Mathieu-Daudé wrote:
Nothing is required from the "qemu/thread.h" and
"hw/core/cpu.h" headers.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  include/exec/cpu-all.h | 2 --
  1 file changed, 2 deletions(-)

diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 9a7b5737d3..b1e293a08f 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -22,8 +22,6 @@
  #include "exec/cpu-common.h"
  #include "exec/memory.h"
  #include "exec/tswap.h"
-#include "qemu/thread.h"
-#include "hw/core/cpu.h"

While thread.h is fine, I'm not sure removing hw/core/cpu.h from cpu-all.h is a good idea, and would explain the rather surprising changes to add core/cpu.h to other files.

"hw/core/cpu.h" defines the CPUState structure. Any code that
deref CPUState needs to include its definition from "hw/core/cpu.h".

Similarly, files that don't deref CPUState/CPUClass/cpu_foo methods
shouldn't be polluted by its declarations.

This series focuses on useremu, next comes sysemu and "exec/cpu-all.h"
is split. I'll see if I can postpone this change.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]