Message ID | 20250424202412.91612-10-philmd@linaro.org |
---|---|
State | New |
Headers | show |
Series | include: Remove "exec/exec-all.h" | expand |
On 24/04/25, Philippe Mathieu-Daudé wrote: > Most files including "exec/helper-proto.h" call GETPC(). > Include it there (in the common part) instead of the > unspecific "exec/exec-all.h" header. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > include/exec/exec-all.h | 1 - > include/exec/helper-proto-common.h | 2 ++ > accel/tcg/translate-all.c | 1 + > target/avr/helper.c | 1 - > 4 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h > index 4c5ad98c6a9..816274bf905 100644 > --- a/include/exec/exec-all.h > +++ b/include/exec/exec-all.h > @@ -26,7 +26,6 @@ > #include "exec/vaddr.h" > > #if defined(CONFIG_TCG) > -#include "accel/tcg/getpc.h" > > /** > * probe_access: > diff --git a/include/exec/helper-proto-common.h b/include/exec/helper-proto-common.h > index 16782ef46c8..76e6c25becb 100644 > --- a/include/exec/helper-proto-common.h > +++ b/include/exec/helper-proto-common.h > @@ -13,4 +13,6 @@ > #include "exec/helper-proto.h.inc" > #undef HELPER_H > > +#include "accel/tcg/getpc.h" > + Non-TCG builds will fail since exec/helper-proto.h is sometimes included outside CONFIG_TCG (e.g. target/arm/debug_helper.c).
On 4/28/25 11:27, Anton Johansson wrote: > On 24/04/25, Philippe Mathieu-Daudé wrote: >> Most files including "exec/helper-proto.h" call GETPC(). >> Include it there (in the common part) instead of the >> unspecific "exec/exec-all.h" header. >> >> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> >> --- >> include/exec/exec-all.h | 1 - >> include/exec/helper-proto-common.h | 2 ++ >> accel/tcg/translate-all.c | 1 + >> target/avr/helper.c | 1 - >> 4 files changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h >> index 4c5ad98c6a9..816274bf905 100644 >> --- a/include/exec/exec-all.h >> +++ b/include/exec/exec-all.h >> @@ -26,7 +26,6 @@ >> #include "exec/vaddr.h" >> >> #if defined(CONFIG_TCG) >> -#include "accel/tcg/getpc.h" >> >> /** >> * probe_access: >> diff --git a/include/exec/helper-proto-common.h b/include/exec/helper-proto-common.h >> index 16782ef46c8..76e6c25becb 100644 >> --- a/include/exec/helper-proto-common.h >> +++ b/include/exec/helper-proto-common.h >> @@ -13,4 +13,6 @@ >> #include "exec/helper-proto.h.inc" >> #undef HELPER_H >> >> +#include "accel/tcg/getpc.h" >> + > > Non-TCG builds will fail since exec/helper-proto.h is sometimes > included outside CONFIG_TCG (e.g. target/arm/debug_helper.c). Yes, I've removed that #ifndef in getpc.h on my tcg-next-1 branch. r~
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 4c5ad98c6a9..816274bf905 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -26,7 +26,6 @@ #include "exec/vaddr.h" #if defined(CONFIG_TCG) -#include "accel/tcg/getpc.h" /** * probe_access: diff --git a/include/exec/helper-proto-common.h b/include/exec/helper-proto-common.h index 16782ef46c8..76e6c25becb 100644 --- a/include/exec/helper-proto-common.h +++ b/include/exec/helper-proto-common.h @@ -13,4 +13,6 @@ #include "exec/helper-proto.h.inc" #undef HELPER_H +#include "accel/tcg/getpc.h" + #endif /* HELPER_PROTO_COMMON_H */ diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 38819a507b2..0408e2522a8 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -61,6 +61,7 @@ #include "system/tcg.h" #include "qapi/error.h" #include "accel/tcg/cpu-ops.h" +#include "accel/tcg/getpc.h" #include "tb-jmp-cache.h" #include "tb-hash.h" #include "tb-context.h" diff --git a/target/avr/helper.c b/target/avr/helper.c index afa591470fe..b9cd6d5ef27 100644 --- a/target/avr/helper.c +++ b/target/avr/helper.c @@ -23,7 +23,6 @@ #include "qemu/error-report.h" #include "cpu.h" #include "accel/tcg/cpu-ops.h" -#include "accel/tcg/getpc.h" #include "exec/cputlb.h" #include "exec/page-protection.h" #include "exec/target_page.h"
Most files including "exec/helper-proto.h" call GETPC(). Include it there (in the common part) instead of the unspecific "exec/exec-all.h" header. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/exec/exec-all.h | 1 - include/exec/helper-proto-common.h | 2 ++ accel/tcg/translate-all.c | 1 + target/avr/helper.c | 1 - 4 files changed, 3 insertions(+), 2 deletions(-)