diff mbox series

[RFC,PATCH-for-10.1,11/39] hw/arm: Use full "target/arm/cpu.h" path to include target's "cpu.h"

Message ID 20250403235821.9909-12-philmd@linaro.org (mailing list archive)
State New
Headers show
Series single-binary: Make hw/arm/ common | expand

Commit Message

Philippe Mathieu-Daudé April 3, 2025, 11:57 p.m. UTC
We would like to get rid of '-I target/$ARCH/' in the CPPFLAGS.
Use the full path to "cpu.h": "target/arm/cpu.h".

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/hw/arm/digic.h      | 2 +-
 include/hw/arm/fsl-imx6.h   | 2 +-
 include/hw/arm/fsl-imx6ul.h | 2 +-
 include/hw/arm/fsl-imx7.h   | 2 +-
 include/hw/arm/fsl-imx8mp.h | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

Comments

Pierrick Bouvier April 4, 2025, 6:20 p.m. UTC | #1
On 4/3/25 16:57, Philippe Mathieu-Daudé wrote:
> We would like to get rid of '-I target/$ARCH/' in the CPPFLAGS.

While this change is correct, this is not strictly needed.
With the current approach, using a set of common files per architecture, 
we can rely on this include to be present, and it does not block from 
having common files.

> Use the full path to "cpu.h": "target/arm/cpu.h".
> 
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   include/hw/arm/digic.h      | 2 +-
>   include/hw/arm/fsl-imx6.h   | 2 +-
>   include/hw/arm/fsl-imx6ul.h | 2 +-
>   include/hw/arm/fsl-imx7.h   | 2 +-
>   include/hw/arm/fsl-imx8mp.h | 2 +-
>   5 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/include/hw/arm/digic.h b/include/hw/arm/digic.h
> index 8f2735c284f..646802806e0 100644
> --- a/include/hw/arm/digic.h
> +++ b/include/hw/arm/digic.h
> @@ -18,7 +18,7 @@
>   #ifndef HW_ARM_DIGIC_H
>   #define HW_ARM_DIGIC_H
>   
> -#include "cpu.h"
> +#include "target/arm/cpu.h"
>   #include "hw/timer/digic-timer.h"
>   #include "hw/char/digic-uart.h"
>   #include "qom/object.h"
> diff --git a/include/hw/arm/fsl-imx6.h b/include/hw/arm/fsl-imx6.h
> index 124bbd478fd..0ac145cf6ba 100644
> --- a/include/hw/arm/fsl-imx6.h
> +++ b/include/hw/arm/fsl-imx6.h
> @@ -35,7 +35,7 @@
>   #include "hw/pci-host/designware.h"
>   #include "hw/or-irq.h"
>   #include "system/memory.h"
> -#include "cpu.h"
> +#include "target/arm/cpu.h"
>   #include "qom/object.h"
>   
>   #define TYPE_FSL_IMX6 "fsl-imx6"
> diff --git a/include/hw/arm/fsl-imx6ul.h b/include/hw/arm/fsl-imx6ul.h
> index 4e3209b25b2..f8f9c249a23 100644
> --- a/include/hw/arm/fsl-imx6ul.h
> +++ b/include/hw/arm/fsl-imx6ul.h
> @@ -34,7 +34,7 @@
>   #include "hw/usb/chipidea.h"
>   #include "hw/usb/imx-usb-phy.h"
>   #include "system/memory.h"
> -#include "cpu.h"
> +#include "target/arm/cpu.h"
>   #include "qom/object.h"
>   #include "qemu/units.h"
>   
> diff --git a/include/hw/arm/fsl-imx7.h b/include/hw/arm/fsl-imx7.h
> index aa7818c4999..6aedd2b80b5 100644
> --- a/include/hw/arm/fsl-imx7.h
> +++ b/include/hw/arm/fsl-imx7.h
> @@ -37,7 +37,7 @@
>   #include "hw/pci-host/designware.h"
>   #include "hw/usb/chipidea.h"
>   #include "hw/or-irq.h"
> -#include "cpu.h"
> +#include "target/arm/cpu.h"
>   #include "qom/object.h"
>   #include "qemu/units.h"
>   
> diff --git a/include/hw/arm/fsl-imx8mp.h b/include/hw/arm/fsl-imx8mp.h
> index bc97fc416eb..f20f9e53187 100644
> --- a/include/hw/arm/fsl-imx8mp.h
> +++ b/include/hw/arm/fsl-imx8mp.h
> @@ -9,7 +9,7 @@
>   #ifndef FSL_IMX8MP_H
>   #define FSL_IMX8MP_H
>   
> -#include "cpu.h"
> +#include "target/arm/cpu.h"
>   #include "hw/char/imx_serial.h"
>   #include "hw/gpio/imx_gpio.h"
>   #include "hw/i2c/imx_i2c.h"
Philippe Mathieu-Daudé April 4, 2025, 9:53 p.m. UTC | #2
On 4/4/25 20:20, Pierrick Bouvier wrote:
> On 4/3/25 16:57, Philippe Mathieu-Daudé wrote:
>> We would like to get rid of '-I target/$ARCH/' in the CPPFLAGS.
> 
> While this change is correct, this is not strictly needed.
> With the current approach, using a set of common files per architecture, 
> we can rely on this include to be present, and it does not block from 
> having common files.

Indeed, I rebased this commit from my heterogeneous branch.

I'll keeping carrying / rebasing it for various months, trying to
remember to not keeping posting it.

Or alternatively I'll post it in a separate "cleanup series", not
mentioning single-binary or heterogeneous emulation.

>> Use the full path to "cpu.h": "target/arm/cpu.h".
>>
>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   include/hw/arm/digic.h      | 2 +-
>>   include/hw/arm/fsl-imx6.h   | 2 +-
>>   include/hw/arm/fsl-imx6ul.h | 2 +-
>>   include/hw/arm/fsl-imx7.h   | 2 +-
>>   include/hw/arm/fsl-imx8mp.h | 2 +-
>>   5 files changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/include/hw/arm/digic.h b/include/hw/arm/digic.h
index 8f2735c284f..646802806e0 100644
--- a/include/hw/arm/digic.h
+++ b/include/hw/arm/digic.h
@@ -18,7 +18,7 @@ 
 #ifndef HW_ARM_DIGIC_H
 #define HW_ARM_DIGIC_H
 
-#include "cpu.h"
+#include "target/arm/cpu.h"
 #include "hw/timer/digic-timer.h"
 #include "hw/char/digic-uart.h"
 #include "qom/object.h"
diff --git a/include/hw/arm/fsl-imx6.h b/include/hw/arm/fsl-imx6.h
index 124bbd478fd..0ac145cf6ba 100644
--- a/include/hw/arm/fsl-imx6.h
+++ b/include/hw/arm/fsl-imx6.h
@@ -35,7 +35,7 @@ 
 #include "hw/pci-host/designware.h"
 #include "hw/or-irq.h"
 #include "system/memory.h"
-#include "cpu.h"
+#include "target/arm/cpu.h"
 #include "qom/object.h"
 
 #define TYPE_FSL_IMX6 "fsl-imx6"
diff --git a/include/hw/arm/fsl-imx6ul.h b/include/hw/arm/fsl-imx6ul.h
index 4e3209b25b2..f8f9c249a23 100644
--- a/include/hw/arm/fsl-imx6ul.h
+++ b/include/hw/arm/fsl-imx6ul.h
@@ -34,7 +34,7 @@ 
 #include "hw/usb/chipidea.h"
 #include "hw/usb/imx-usb-phy.h"
 #include "system/memory.h"
-#include "cpu.h"
+#include "target/arm/cpu.h"
 #include "qom/object.h"
 #include "qemu/units.h"
 
diff --git a/include/hw/arm/fsl-imx7.h b/include/hw/arm/fsl-imx7.h
index aa7818c4999..6aedd2b80b5 100644
--- a/include/hw/arm/fsl-imx7.h
+++ b/include/hw/arm/fsl-imx7.h
@@ -37,7 +37,7 @@ 
 #include "hw/pci-host/designware.h"
 #include "hw/usb/chipidea.h"
 #include "hw/or-irq.h"
-#include "cpu.h"
+#include "target/arm/cpu.h"
 #include "qom/object.h"
 #include "qemu/units.h"
 
diff --git a/include/hw/arm/fsl-imx8mp.h b/include/hw/arm/fsl-imx8mp.h
index bc97fc416eb..f20f9e53187 100644
--- a/include/hw/arm/fsl-imx8mp.h
+++ b/include/hw/arm/fsl-imx8mp.h
@@ -9,7 +9,7 @@ 
 #ifndef FSL_IMX8MP_H
 #define FSL_IMX8MP_H
 
-#include "cpu.h"
+#include "target/arm/cpu.h"
 #include "hw/char/imx_serial.h"
 #include "hw/gpio/imx_gpio.h"
 #include "hw/i2c/imx_i2c.h"