[PATCH 02/24] exec/cpu-defs: Remove unnecessary headers

Philippe Mathieu-Daudé posted 24 patches 1 week, 2 days ago
[PATCH 02/24] exec/cpu-defs: Remove unnecessary headers
Posted by Philippe Mathieu-Daudé 1 week, 2 days ago
"exec/cpu-defs.h" should be kept as minimal as possible;
besides these includes don't seem necessay. Remove them.

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

diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h
index 0dbef3010c..ae18398fa9 100644
--- a/include/exec/cpu-defs.h
+++ b/include/exec/cpu-defs.h
@@ -23,14 +23,6 @@
 #error cpu.h included from common code
 #endif
 
-#include "qemu/host-utils.h"
-#include "qemu/thread.h"
-#ifndef CONFIG_USER_ONLY
-#include "exec/hwaddr.h"
-#endif
-#include "exec/memattrs.h"
-#include "hw/core/cpu.h"
-
 #include "cpu-param.h"
 
 #ifndef TARGET_LONG_BITS
-- 
2.45.2


Re: [PATCH 02/24] exec/cpu-defs: Remove unnecessary headers
Posted by Richard Henderson 1 week, 1 day ago
On 11/13/24 17:12, Philippe Mathieu-Daudé wrote:
> "exec/cpu-defs.h" should be kept as minimal as possible;
> besides these includes don't seem necessay. Remove them.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   include/exec/cpu-defs.h | 8 --------
>   1 file changed, 8 deletions(-)

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


r~


Re: [PATCH 02/24] exec/cpu-defs: Remove unnecessary headers
Posted by Thomas Huth 1 week, 2 days ago
On 14/11/2024 02.12, Philippe Mathieu-Daudé wrote:
> "exec/cpu-defs.h" should be kept as minimal as possible;
> besides these includes don't seem necessay. Remove them.

s/necessay/necessary/

> diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h
> --- a/include/exec/cpu-defs.h
> +++ b/include/exec/cpu-defs.h
> @@ -23,14 +23,6 @@
>   #error cpu.h included from common code
>   #endif
>   
> -#include "qemu/host-utils.h"
> -#include "qemu/thread.h"
> -#ifndef CONFIG_USER_ONLY
> -#include "exec/hwaddr.h"
> -#endif
> -#include "exec/memattrs.h"
> -#include "hw/core/cpu.h"

Seems to work. Good catch!

Tested-by: Thomas Huth <thuth@redhat.com>


Re: [PATCH 02/24] exec/cpu-defs: Remove unnecessary headers
Posted by Pierrick Bouvier 1 week, 2 days ago

On 11/13/24 17:12, Philippe Mathieu-Daudé wrote:
> "exec/cpu-defs.h" should be kept as minimal as possible;
> besides these includes don't seem necessay. Remove them.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   include/exec/cpu-defs.h | 8 --------
>   1 file changed, 8 deletions(-)
> 
> diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h
> index 0dbef3010c..ae18398fa9 100644
> --- a/include/exec/cpu-defs.h
> +++ b/include/exec/cpu-defs.h
> @@ -23,14 +23,6 @@
>   #error cpu.h included from common code
>   #endif
>   
> -#include "qemu/host-utils.h"
> -#include "qemu/thread.h"
> -#ifndef CONFIG_USER_ONLY
> -#include "exec/hwaddr.h"
> -#endif
> -#include "exec/memattrs.h"
> -#include "hw/core/cpu.h"
> -
>   #include "cpu-param.h"
>   
>   #ifndef TARGET_LONG_BITS

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>