Message ID | 20250422192819.302784-106-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show |
Series | single-binary patch queue | expand |
On 22/4/25 21:27, Richard Henderson wrote: > From: Pierrick Bouvier <pierrick.bouvier@linaro.org> > > Reviewed-by: Richard Henderson <richard.henderson@linaro.org> > Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > Message-ID: <20250325045915.994760-7-pierrick.bouvier@linaro.org> > --- > include/exec/cpu-all.h | 1 - > target/ppc/mmu-hash64.h | 2 ++ > target/i386/tcg/system/excp_helper.c | 1 + > target/i386/xsave_helper.c | 1 + > target/riscv/vector_helper.c | 1 + > 5 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h > index 957c86886e..bfa039ab76 100644 > --- a/include/exec/cpu-all.h > +++ b/include/exec/cpu-all.h > @@ -21,7 +21,6 @@ > > #include "exec/cpu-common.h" > #include "exec/cpu-interrupt.h" > -#include "exec/tswap.h" > #include "hw/core/cpu.h" > #include "exec/cpu-defs.h" > #include "exec/target_page.h" > diff --git a/target/ppc/mmu-hash64.h b/target/ppc/mmu-hash64.h > index ae8d4b37ae..b8fb12a970 100644 > --- a/target/ppc/mmu-hash64.h > +++ b/target/ppc/mmu-hash64.h > @@ -1,6 +1,8 @@ > #ifndef MMU_HASH64_H > #define MMU_HASH64_H > > +#include "exec/tswap.h" This header doesn't use "exec/tswap.h". Maybe you want this reviewed patch instead: https://lore.kernel.org/qemu-devel/20241211230357.97036-6-philmd@linaro.org/ > + > #ifndef CONFIG_USER_ONLY > > #ifdef TARGET_PPC64
On 4/23/25 03:27, Philippe Mathieu-Daudé wrote: > On 22/4/25 21:27, Richard Henderson wrote: >> From: Pierrick Bouvier <pierrick.bouvier@linaro.org> >> >> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> >> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> >> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> >> Message-ID: <20250325045915.994760-7-pierrick.bouvier@linaro.org> >> --- >> include/exec/cpu-all.h | 1 - >> target/ppc/mmu-hash64.h | 2 ++ >> target/i386/tcg/system/excp_helper.c | 1 + >> target/i386/xsave_helper.c | 1 + >> target/riscv/vector_helper.c | 1 + >> 5 files changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h >> index 957c86886e..bfa039ab76 100644 >> --- a/include/exec/cpu-all.h >> +++ b/include/exec/cpu-all.h >> @@ -21,7 +21,6 @@ >> >> #include "exec/cpu-common.h" >> #include "exec/cpu-interrupt.h" >> -#include "exec/tswap.h" >> #include "hw/core/cpu.h" >> #include "exec/cpu-defs.h" >> #include "exec/target_page.h" >> diff --git a/target/ppc/mmu-hash64.h b/target/ppc/mmu-hash64.h >> index ae8d4b37ae..b8fb12a970 100644 >> --- a/target/ppc/mmu-hash64.h >> +++ b/target/ppc/mmu-hash64.h >> @@ -1,6 +1,8 @@ >> #ifndef MMU_HASH64_H >> #define MMU_HASH64_H >> >> +#include "exec/tswap.h" > > This header doesn't use "exec/tswap.h". Maybe you want this > reviewed patch instead: > > https://lore.kernel.org/qemu-devel/20241211230357.97036-6-philmd@linaro.org/ > >> + >> #ifndef CONFIG_USER_ONLY >> >> #ifdef TARGET_PPC64 > See: [PATCH 002/147] exec/tswap: implement {ld,st}.*_p as functions instead of macros. It removes macro definitions from cpu-all.h, and implement those as proper functions in exec/tswap.h. ppc/mmu-hash64.h uses ld*_p, which are defined in exec/tswap.h, so it's the correct place for this include.
On 23/4/25 18:09, Pierrick Bouvier wrote: > On 4/23/25 03:27, Philippe Mathieu-Daudé wrote: >> On 22/4/25 21:27, Richard Henderson wrote: >>> From: Pierrick Bouvier <pierrick.bouvier@linaro.org> >>> >>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> >>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> >>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> >>> Message-ID: <20250325045915.994760-7-pierrick.bouvier@linaro.org> >>> --- >>> include/exec/cpu-all.h | 1 - >>> target/ppc/mmu-hash64.h | 2 ++ >>> target/i386/tcg/system/excp_helper.c | 1 + >>> target/i386/xsave_helper.c | 1 + >>> target/riscv/vector_helper.c | 1 + >>> 5 files changed, 5 insertions(+), 1 deletion(-) >>> >>> diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h >>> index 957c86886e..bfa039ab76 100644 >>> --- a/include/exec/cpu-all.h >>> +++ b/include/exec/cpu-all.h >>> @@ -21,7 +21,6 @@ >>> #include "exec/cpu-common.h" >>> #include "exec/cpu-interrupt.h" >>> -#include "exec/tswap.h" >>> #include "hw/core/cpu.h" >>> #include "exec/cpu-defs.h" >>> #include "exec/target_page.h" >>> diff --git a/target/ppc/mmu-hash64.h b/target/ppc/mmu-hash64.h >>> index ae8d4b37ae..b8fb12a970 100644 >>> --- a/target/ppc/mmu-hash64.h >>> +++ b/target/ppc/mmu-hash64.h >>> @@ -1,6 +1,8 @@ >>> #ifndef MMU_HASH64_H >>> #define MMU_HASH64_H >>> +#include "exec/tswap.h" >> >> This header doesn't use "exec/tswap.h". Maybe you want this >> reviewed patch instead: >> >> https://lore.kernel.org/qemu-devel/20241211230357.97036-6- >> philmd@linaro.org/ >> >>> + >>> #ifndef CONFIG_USER_ONLY >>> #ifdef TARGET_PPC64 >> > > See: [PATCH 002/147] exec/tswap: implement {ld,st}.*_p as functions > instead of macros. > It removes macro definitions from cpu-all.h, and implement those as > proper functions in exec/tswap.h. > > ppc/mmu-hash64.h uses ld*_p, which are defined in exec/tswap.h, so it's > the correct place for this include. Ah I missed that, OK then.
On 4/23/25 09:17, Philippe Mathieu-Daudé wrote: > On 23/4/25 18:09, Pierrick Bouvier wrote: >> On 4/23/25 03:27, Philippe Mathieu-Daudé wrote: >>> On 22/4/25 21:27, Richard Henderson wrote: >>>> From: Pierrick Bouvier <pierrick.bouvier@linaro.org> >>>> >>>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> >>>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> >>>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> >>>> Message-ID: <20250325045915.994760-7-pierrick.bouvier@linaro.org> >>>> --- >>>> include/exec/cpu-all.h | 1 - >>>> target/ppc/mmu-hash64.h | 2 ++ >>>> target/i386/tcg/system/excp_helper.c | 1 + >>>> target/i386/xsave_helper.c | 1 + >>>> target/riscv/vector_helper.c | 1 + >>>> 5 files changed, 5 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h >>>> index 957c86886e..bfa039ab76 100644 >>>> --- a/include/exec/cpu-all.h >>>> +++ b/include/exec/cpu-all.h >>>> @@ -21,7 +21,6 @@ >>>> #include "exec/cpu-common.h" >>>> #include "exec/cpu-interrupt.h" >>>> -#include "exec/tswap.h" >>>> #include "hw/core/cpu.h" >>>> #include "exec/cpu-defs.h" >>>> #include "exec/target_page.h" >>>> diff --git a/target/ppc/mmu-hash64.h b/target/ppc/mmu-hash64.h >>>> index ae8d4b37ae..b8fb12a970 100644 >>>> --- a/target/ppc/mmu-hash64.h >>>> +++ b/target/ppc/mmu-hash64.h >>>> @@ -1,6 +1,8 @@ >>>> #ifndef MMU_HASH64_H >>>> #define MMU_HASH64_H >>>> +#include "exec/tswap.h" >>> >>> This header doesn't use "exec/tswap.h". Maybe you want this >>> reviewed patch instead: >>> >>> https://lore.kernel.org/qemu-devel/20241211230357.97036-6- >>> philmd@linaro.org/ >>> >>>> + >>>> #ifndef CONFIG_USER_ONLY >>>> #ifdef TARGET_PPC64 >>> >> >> See: [PATCH 002/147] exec/tswap: implement {ld,st}.*_p as functions >> instead of macros. >> It removes macro definitions from cpu-all.h, and implement those as >> proper functions in exec/tswap.h. >> >> ppc/mmu-hash64.h uses ld*_p, which are defined in exec/tswap.h, so it's >> the correct place for this include. > > Ah I missed that, OK then. > > No worries, it's a bit confusing with all the variants we have, and I had to reproduce the compile error to find what was the rationale, so it makes sense you missed it.
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 957c86886e..bfa039ab76 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -21,7 +21,6 @@ #include "exec/cpu-common.h" #include "exec/cpu-interrupt.h" -#include "exec/tswap.h" #include "hw/core/cpu.h" #include "exec/cpu-defs.h" #include "exec/target_page.h" diff --git a/target/ppc/mmu-hash64.h b/target/ppc/mmu-hash64.h index ae8d4b37ae..b8fb12a970 100644 --- a/target/ppc/mmu-hash64.h +++ b/target/ppc/mmu-hash64.h @@ -1,6 +1,8 @@ #ifndef MMU_HASH64_H #define MMU_HASH64_H +#include "exec/tswap.h" + #ifndef CONFIG_USER_ONLY #ifdef TARGET_PPC64 diff --git a/target/i386/tcg/system/excp_helper.c b/target/i386/tcg/system/excp_helper.c index b0b74df72f..4badd73943 100644 --- a/target/i386/tcg/system/excp_helper.c +++ b/target/i386/tcg/system/excp_helper.c @@ -23,6 +23,7 @@ #include "exec/cputlb.h" #include "exec/page-protection.h" #include "exec/tlb-flags.h" +#include "exec/tswap.h" #include "tcg/helper-tcg.h" typedef struct TranslateParams { diff --git a/target/i386/xsave_helper.c b/target/i386/xsave_helper.c index 996e9f3bfe..24ab7be8e9 100644 --- a/target/i386/xsave_helper.c +++ b/target/i386/xsave_helper.c @@ -5,6 +5,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "exec/tswap.h" void x86_cpu_xsave_all_areas(X86CPU *cpu, void *buf, uint32_t buflen) { diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index 83978be060..7fffa23bc8 100644 --- a/target/riscv/vector_helper.c +++ b/target/riscv/vector_helper.c @@ -26,6 +26,7 @@ #include "exec/page-protection.h" #include "exec/helper-proto.h" #include "exec/tlb-flags.h" +#include "exec/tswap.h" #include "fpu/softfloat.h" #include "tcg/tcg-gvec-desc.h" #include "internals.h"