target/ppc: Fix build warnings when building with 'disable-tcg'
PATCH 1/1 target/ppc: Fix build warnings when building with 'disable-tcg'
Kowshik reported that building qemu with GCC 12.2.1 for 'ppc64-softmmu' target is failing due to following build warnings:
<snip>
../target/ppc/cpu_init.c:7018:13: error: 'ppc_restore_state_to_opc' defined but not used [-Werror=unused-function] 7018 | static void ppc_restore_state_to_opc(CPUState *cs,
<snip>
Fix this by wrapping these function definitions in 'ifdef CONFIG_TCG' so that they are only defined if qemu is compiled with '--enable-tcg'
--- target/ppc/cpu_init.c | 2 ++ target/ppc/excp_helper.c | 2 ++ 2 files changed, 4 insertions(+)
target/ppc/cpu_init.c +2 -0
@@ -7015,6 +7015,7 @@ static vaddr ppc_cpu_get_pc(CPUState *cs)return cpu->env.nip; } +#ifdef CONFIG_TCG static void ppc_restore_state_to_opc (CPUState *cs,const TranslationBlock *tb,const uint64_t *data)
@@ -7023,6 +7024,7 @@ static void ppc_restore_state_to_opc(CPUState *cs, cpu->env.nip = data[0]; } +#endif /* CONFIG_TCG */ static bool ppc_cpu_has_work (CPUState *cs) {
target/ppc/excp_helper.c +2 -0
@@ -2842,6 +2842,7 @@ void helper_td(CPUPPCState *env, target_ulong arg1, target_ulong arg2,#endif #endif +#ifdef CONFIG_TCG static uint32_t helper_SIMON_LIKE_32_64 (uint32_t x,uint64_t key,uint32_t lane) {const uint16_t c =0xfffc ;
@@ -2924,6 +2925,7 @@ HELPER_HASH(HASHST, env->spr[SPR_HASHKEYR], true) HELPER_HASH(HASHCHK, env->spr[SPR_HASHKEYR], false) HELPER_HASH(HASHSTP, env->spr[SPR_HASHPKEYR], true) HELPER_HASH(HASHCHKP, env->spr[SPR_HASHPKEYR], false) +#endif /* CONFIG_TCG */ #if !defined(CONFIG_USER_ONLY )
Signature · 1 line
2.38.1
Hi Vaibhav,
Nice to see some people are still building QEMU at IBM ;-)
Quoted 8 lines · On Wed, 16 Nov 2022 18:47:43 +0530 Vaibhav Jain <[email protected]> wrote:
Kowshik reported that building qemu with GCC 12.2.1 for 'ppc64-softmmu' target is failing due to following build warnings:
<snip>
../target/ppc/cpu_init.c:7018:13: error: 'ppc_restore_state_to_opc' defined but not used [-Werror=unused-function] 7018 | static void ppc_restore_state_to_opc(CPUState *cs,
<snip>
Quoted 6 lines
Fix this by wrapping these function definitions in 'ifdef
CONFIG_TCG' so that they are only defined if qemu is compiled with '--enable-tcg'Reported-by Kowshik Jois B S <[email protected]>Signed-off-by Vaibhav Jain <[email protected]>---
This was introduced by a recent commit.
Vaibhav,
This is serious enough it should get fixed in 7.2. Please fill up an issue as explain in [1].
Cheers,
--
Greg
[1] https://lists.nongnu.org/archive/html/qemu-devel/2022-11/msg00137.html
Quoted 44 lines
target/ppc/cpu_init.c | 2 ++ target/ppc/excp_helper.c | 2 ++ 2 files changed, 4 insertions(+)target/ppc/cpu_init.c +2
-0@@ -7015,6 +7015,7 @@ static vaddr ppc_cpu_get_pc(CPUState *cs)return cpu->env.nip; } +#ifdef CONFIG_TCG static void ppc_restore_state_to_opc (CPUState *cs,const TranslationBlock *tb,const uint64_t *data)@@ -7023,6 +7024,7 @@ static void ppc_restore_state_to_opc(CPUState *cs, cpu->env.nip = data[0]; } +#endif /* CONFIG_TCG */ static bool ppc_cpu_has_work (CPUState *cs) {target/ppc/excp_helper.c +2
-0@@ -2842,6 +2842,7 @@ void helper_td(CPUPPCState *env, target_ulong arg1, target_ulong arg2,#endif #endif +#ifdef CONFIG_TCG static uint32_t helper_SIMON_LIKE_32_64 (uint32_t x,uint64_t key,uint32_t lane) {const uint16_t c =0xfffc ;@@ -2924,6 +2925,7 @@ HELPER_HASH(HASHST, env->spr[SPR_HASHKEYR], true) HELPER_HASH(HASHCHK, env->spr[SPR_HASHKEYR], false) HELPER_HASH(HASHSTP, env->spr[SPR_HASHPKEYR], true) HELPER_HASH(HASHCHKP, env->spr[SPR_HASHPKEYR], false) +#endif /* CONFIG_TCG */ #if !defined(CONFIG_USER_ONLY )
Quoted 17 lines · Greg Kurz
Hi Vaibhav,
Nice to see some people are still building QEMU at IBM ;-)
Quoted 10 lines · On Wed, 16 Nov 2022 18:47:43 +0530 Vaibhav Jain <[email protected]> wrote:
Kowshik reported that building qemu with GCC 12.2.1 for 'ppc64-softmmu' target is failing due to following build warnings:
<snip>
../target/ppc/cpu_init.c:7018:13: error: 'ppc_restore_state_to_opc' defined but not used [-Werror=unused-function] 7018 | static void ppc_restore_state_to_opc(CPUState *cs,
<snip>Fix this by wrapping these function definitions in 'ifdef
CONFIG_TCG' so that they are only defined if qemu is compiled with '--enable-tcg'
Interestingly this config isn't covered in .gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml.
Quoted 16 lines · Philippe Mathieu-Daudé
Quoted 15 lines · Greg Kurz
Hi Vaibhav,
Nice to see some people are still building QEMU at IBM ;-)
Quoted 8 lines · On Wed, 16 Nov 2022 18:47:43 +0530 Vaibhav Jain <[email protected]> wrote:
Kowshik reported that building qemu with GCC 12.2.1 for 'ppc64-softmmu' target is failing due to following build warnings:
<snip>
../target/ppc/cpu_init.c:7018:13: error: 'ppc_restore_state_to_opc' defined but not used [-Werror=unused-function] 7018 | static void ppc_restore_state_to_opc(CPUState *cs,
<snip>
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Fix this by wrapping these function definitions in 'ifdef
CONFIG_TCG' so that they are only defined if qemu is compiled with '--enable-tcg'Interestingly this config isn't covered in
.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml.
Why should it be tested there? s390x is not ppc64.
If you want to test this, you either have to do it with a cross compiler (in .gitlab-ci.d/crossbuilds.yml) or in .travis.yml on a ppc64 host.
Thomas
Quoted 2 lines · Greg Kurz
Hi Vaibhav,
Hey Greg,
Good to see you,
Quoted 1 line
Nice to see some people are still building QEMU at IBM ;-)
Yeah, and will hopefully continue to do this in future :-)
<snip>
Quoted 6 lines
Quoted 3 lines
Reported-by Kowshik Jois B S <[email protected]>Signed-off-by Vaibhav Jain <[email protected]>---
Reviewed-by Greg Kurz <[email protected]>
Thanks
Quoted 3 lines
This was introduced by a recent commit.
Fixes 61bd1d29421a ("target/ppc: Convert to tcg_ops restore_state_to_opc")
Thanks again for pointing out the commit that caused this.
Quoted 6 lines
Vaibhav,
This is serious enough it should get fixed in 7.2. Please fill up an issue as explain in [1].
I have raised an issue on gitlab at
https://gitlab.com/qemu-project/qemu/-/issues/1319
Signature · 2 lines
Cheers ~ Vaibhav
Quoted 27 lines · Vaibhav Jain
Quoted 2 lines · Greg Kurz
Hi Vaibhav,
Hey Greg,
Good to see you,
Quoted 1 line
Nice to see some people are still building QEMU at IBM ;-)
Yeah, and will hopefully continue to do this in future :-)
<snip>
Quoted 6 lines
Quoted 3 lines
Reported-by Kowshik Jois B S <[email protected]>Signed-off-by Vaibhav Jain <[email protected]>---
Reviewed-by Greg Kurz <[email protected]>Thanks
Quoted 3 lines
This was introduced by a recent commit.
Fixes 61bd1d29421a ("target/ppc: Convert to tcg_ops restore_state_to_opc")Thanks again for pointing out the commit that caused this.
Quoted 2 lines
Quoted 7 lines
Quoted 4 lines
Vaibhav,
This is serious enough it should get fixed in 7.2. Please fill up an issue as explain in [1].
I have raised an issue on gitlab at
https://gitlab.com/qemu-project/qemu/-/issues/1319
And so,
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/377
Thanks,
C.
Quoted 31 lines · Vaibhav Jain
Kowshik reported that building qemu with GCC 12.2.1 for 'ppc64-softmmu' target is failing due to following build warnings:
<snip>
../target/ppc/cpu_init.c:7018:13: error: 'ppc_restore_state_to_opc' defined but not used [-Werror=unused-function] 7018 | static void ppc_restore_state_to_opc(CPUState *cs,
<snip>Fix this by wrapping these function definitions in 'ifdef
CONFIG_TCG' so that they are only defined if qemu is compiled with '--enable-tcg'Reported-by Kowshik Jois B S <[email protected]>Signed-off-by Vaibhav Jain <[email protected]>--- target/ppc/cpu_init.c | 2 ++ target/ppc/excp_helper.c | 2 ++ 2 files changed, 4 insertions(+)target/ppc/cpu_init.c +1
-0@@ -7015,6 +7015,7 @@ static vaddr ppc_cpu_get_pc(CPUState *cs)return cpu->env.nip; } +#ifdef CONFIG_TCG static void ppc_restore_state_to_opc (CPUState *cs,const TranslationBlock *tb,const uint64_t *data)
target/ppc/cpu_init.c static void ppc_restore_state_to_opc(CPUState *cs, · line 7027
Quoted 4 lines
target/ppc/cpu_init.c +1
-0@@ -7023,6 +7024,7 @@ static void ppc_restore_state_to_opc(CPUState *cs, cpu->env.nip = data[0]; } +#endif /* CONFIG_TCG */
Oops sorry.
Quoted 13 lines
target/ppc/excp_helper.c +1
-0@@ -2842,6 +2842,7 @@ void helper_td(CPUPPCState *env, target_ulong arg1, target_ulong arg2,#endif #endif +#ifdef CONFIG_TCG static uint32_t helper_SIMON_LIKE_32_64 (uint32_t x,uint64_t key,uint32_t lane) {const uint16_t c =0xfffc ;
target/ppc/excp_helper.c HELPER_HASH(HASHST, env->spr[SPR_HASHKEYR], true) · line 2928
Quoted 4 lines
target/ppc/excp_helper.c +1
-0@@ -2924,6 +2925,7 @@ HELPER_HASH(HASHST, env->spr[SPR_HASHKEYR], true) HELPER_HASH(HASHCHK, env->spr[SPR_HASHKEYR], false) HELPER_HASH(HASHSTP, env->spr[SPR_HASHPKEYR], true) HELPER_HASH(HASHCHKP, env->spr[SPR_HASHPKEYR], false) +#endif /* CONFIG_TCG */
Hmm this is another fix... You could split your patch in 2, but not a big deal. Regardless:
Hi Philippe,
Quoted 4 lines · Philippe Mathieu-Daudé
Oops sorry.
Fixes 61bd1d2942 ("target/ppc: Convert to tcg_ops restore_state_to_opc")
Thanks for figuring and pointing this out
Quoted 9 lines
Quoted 9 lines
target/ppc/excp_helper.c +0
-0@@ -2842,6 +2842,7 @@ void helper_td(CPUPPCState *env, target_ulong arg1, target_ulong arg2,#endif #endif
Quoted 12 lines
target/ppc/excp_helper.c HELPER_HASH(HASHST, env->spr[SPR_HASHKEYR], true) · line 2928
Quoted 9 lines
target/ppc/excp_helper.c +2
-0+#ifdef CONFIG_TCG static uint32_t helper_SIMON_LIKE_32_64 (uint32_t x,uint64_t key,uint32_t lane) {const uint16_t c =0xfffc ;@@ -2924,6 +2925,7 @@ HELPER_HASH(HASHST, env->spr[SPR_HASHKEYR], true) HELPER_HASH(HASHCHK, env->spr[SPR_HASHKEYR], false) HELPER_HASH(HASHSTP, env->spr[SPR_HASHPKEYR], true) HELPER_HASH(HASHCHKP, env->spr[SPR_HASHPKEYR], false) +#endif /* CONFIG_TCG */ Fixes 670f1da374 ("target/ppc: Implement hashst and hashchk")
Thanks
Quoted 2 lines
Hmm this is another fix... You could split your patch in 2, but not a big deal. Regardless:
This being a trivial patch, descided against splitting it in 2.
Quoted 1 line
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Thanks,
Signature · 2 lines
Cheers ~ Vaibhav
Daniel Henrique Barboza
Reviewed-by Greg Kurz Reviewed-by Philippe Mathieu-Daudé Tested-by Kowshik Jois B S on v1 1/1 AppliedQueued in gitlab.com/danielhb/qemu/tree/ppc-next with the following tags:
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/377
Thanks,
Daniel
Quoted 58 lines · Vaibhav Jain
Kowshik reported that building qemu with GCC 12.2.1 for 'ppc64-softmmu' target is failing due to following build warnings:
<snip>
../target/ppc/cpu_init.c:7018:13: error: 'ppc_restore_state_to_opc' defined but not used [-Werror=unused-function] 7018 | static void ppc_restore_state_to_opc(CPUState *cs,
<snip>Fix this by wrapping these function definitions in 'ifdef
CONFIG_TCG' so that they are only defined if qemu is compiled with '--enable-tcg'Reported-by Kowshik Jois B S <[email protected]>Signed-off-by Vaibhav Jain <[email protected]>--- target/ppc/cpu_init.c | 2 ++ target/ppc/excp_helper.c | 2 ++ 2 files changed, 4 insertions(+)target/ppc/cpu_init.c +2
-0@@ -7015,6 +7015,7 @@ static vaddr ppc_cpu_get_pc(CPUState *cs)return cpu->env.nip; } +#ifdef CONFIG_TCG static void ppc_restore_state_to_opc (CPUState *cs,const TranslationBlock *tb,const uint64_t *data)@@ -7023,6 +7024,7 @@ static void ppc_restore_state_to_opc(CPUState *cs, cpu->env.nip = data[0]; } +#endif /* CONFIG_TCG */ static bool ppc_cpu_has_work (CPUState *cs) {target/ppc/excp_helper.c +2
-0@@ -2842,6 +2842,7 @@ void helper_td(CPUPPCState *env, target_ulong arg1, target_ulong arg2,#endif #endif +#ifdef CONFIG_TCG static uint32_t helper_SIMON_LIKE_32_64 (uint32_t x,uint64_t key,uint32_t lane) {const uint16_t c =0xfffc ;@@ -2924,6 +2925,7 @@ HELPER_HASH(HASHST, env->spr[SPR_HASHKEYR], true) HELPER_HASH(HASHCHK, env->spr[SPR_HASHKEYR], false) HELPER_HASH(HASHSTP, env->spr[SPR_HASHPKEYR], true) HELPER_HASH(HASHCHKP, env->spr[SPR_HASHPKEYR], false) +#endif /* CONFIG_TCG */ #if !defined(CONFIG_USER_ONLY )
Hi Daniel,
Thanks for quick turnaround on this,
Minor correction to the commit tags below:
Quoted 7 lines · Daniel Henrique Barboza
Queued in gitlab.com/danielhb/qemu/tree/ppc-next with the following tags:
Reported-by Kowshik Jois B S <[email protected]>Fixes 61bd1d2942 ("target/ppc: Convert to tcg_ops restore_state_to_opc")Fixes 670f1da374 ("target/ppc: Implement hashst and hashchk")
This should be
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1319
Quoted 5 lines
Signed-off-by Vaibhav Jain <[email protected]>Reviewed-by Greg Kurz <[email protected]>Reviewed-by Philippe Mathieu-Daudé <[email protected]>Tested-by Kowshik Jois B S <[email protected]>
Signature · 2 lines
Cheers ~ Vaibhav
Quoted 12 lines · Vaibhav Jain
Hi Daniel,
Thanks for quick turnaround on this,
Minor correction to the commit tags below:
Quoted 3 lines · Daniel Henrique Barboza
Queued in gitlab.com/danielhb/qemu/tree/ppc-next with the following tags:
Quoted 7 lines
Quoted 4 lines
Reported-by Kowshik Jois B S <[email protected]>Fixes 61bd1d2942 ("target/ppc: Convert to tcg_ops restore_state_to_opc")Fixes 670f1da374 ("target/ppc: Implement hashst and hashchk")This should be
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1319
Ops! Fixed in tree.
Daniel
Quoted 7 lines
Quoted 6 lines
Signed-off-by Vaibhav Jain <[email protected]>Reviewed-by Greg Kurz <[email protected]>Reviewed-by Philippe Mathieu-Daudé <[email protected]>Tested-by Kowshik Jois B S <[email protected]>
Quoted 2 lines · On Thu, 17 Nov 2022 07:11:51 -0300 Daniel Henrique Barboza…
Queued in gitlab.com/danielhb/qemu/tree/ppc-next with the following tags:
You are planning a PR before 7.2-rc2, right ?
Quoted 4 lines
Reported-by Kowshik Jois B S <[email protected]>Fixes 61bd1d2942 ("target/ppc: Convert to tcg_ops restore_state_to_opc")Fixes 670f1da374 ("target/ppc: Implement hashst and hashchk")
The guard macro also covers the following two, introduced by yet another commit.
HELPER_HASH(HASHSTP, env->spr[SPR_HASHPKEYR], true) HELPER_HASH(HASHCHKP, env->spr[SPR_HASHPKEYR], false)
Quoted 1 line
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/377
Err... I don't see any relation with this issue.
Cedric ?
But this resolves the issue created by Vaibhav for 7.2 :
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1319
Quoted 70 lines
Signed-off-by Vaibhav Jain <[email protected]>Reviewed-by Greg Kurz <[email protected]>Reviewed-by Philippe Mathieu-Daudé <[email protected]>Tested-by Kowshik Jois B S <[email protected]>Thanks,
Daniel
Quoted 58 lines · Vaibhav Jain
Kowshik reported that building qemu with GCC 12.2.1 for 'ppc64-softmmu' target is failing due to following build warnings:
<snip>
../target/ppc/cpu_init.c:7018:13: error: 'ppc_restore_state_to_opc' defined but not used [-Werror=unused-function] 7018 | static void ppc_restore_state_to_opc(CPUState *cs,
<snip>Fix this by wrapping these function definitions in 'ifdef
CONFIG_TCG' so that they are only defined if qemu is compiled with '--enable-tcg'Reported-by Kowshik Jois B S <[email protected]>Signed-off-by Vaibhav Jain <[email protected]>--- target/ppc/cpu_init.c | 2 ++ target/ppc/excp_helper.c | 2 ++ 2 files changed, 4 insertions(+)target/ppc/cpu_init.c +2
-0@@ -7015,6 +7015,7 @@ static vaddr ppc_cpu_get_pc(CPUState *cs)return cpu->env.nip; } +#ifdef CONFIG_TCG static void ppc_restore_state_to_opc (CPUState *cs,const TranslationBlock *tb,const uint64_t *data)@@ -7023,6 +7024,7 @@ static void ppc_restore_state_to_opc(CPUState *cs, cpu->env.nip = data[0]; } +#endif /* CONFIG_TCG */ static bool ppc_cpu_has_work (CPUState *cs) {target/ppc/excp_helper.c +2
-0@@ -2842,6 +2842,7 @@ void helper_td(CPUPPCState *env, target_ulong arg1, target_ulong arg2,#endif #endif +#ifdef CONFIG_TCG static uint32_t helper_SIMON_LIKE_32_64 (uint32_t x,uint64_t key,uint32_t lane) {const uint16_t c =0xfffc ;@@ -2924,6 +2925,7 @@ HELPER_HASH(HASHST, env->spr[SPR_HASHKEYR], true) HELPER_HASH(HASHCHK, env->spr[SPR_HASHKEYR], false) HELPER_HASH(HASHSTP, env->spr[SPR_HASHPKEYR], true) HELPER_HASH(HASHCHKP, env->spr[SPR_HASHPKEYR], false) +#endif /* CONFIG_TCG */ #if !defined(CONFIG_USER_ONLY )
Quoted 18 lines · Greg Kurz
Quoted 2 lines · On Thu, 17 Nov 2022 07:11:51 -0300 Daniel Henrique Barboza…
Queued in gitlab.com/danielhb/qemu/tree/ppc-next with the following tags:
You are planning a PR before 7.2-rc2, right ?
Quoted 4 lines
Reported-by Kowshik Jois B S <[email protected]>Fixes 61bd1d2942 ("target/ppc: Convert to tcg_ops restore_state_to_opc")Fixes 670f1da374 ("target/ppc: Implement hashst and hashchk")The guard macro also covers the following two, introduced by yet another commit.
HELPER_HASH(HASHSTP, env->spr[SPR_HASHPKEYR], true) HELPER_HASH(HASHCHKP, env->spr[SPR_HASHPKEYR], false)
Quoted 7 lines
Fixes 53ae2aeb9407 ("target/ppc: Implement hashstp and hashchkp")Quoted 1 line
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/377Err... I don't see any relation with this issue.
Cedric ?
bad copy paste. Sorry about that.
Quoted 3 lines
But this resolves the issue created by Vaibhav for 7.2 :
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1319
yes.
C.
Quoted 72 lines
Quoted 71 lines
Signed-off-by Vaibhav Jain <[email protected]>Reviewed-by Greg Kurz <[email protected]>Reviewed-by Philippe Mathieu-Daudé <[email protected]>Tested-by Kowshik Jois B S <[email protected]>Thanks,
Daniel
Quoted 58 lines · Vaibhav Jain
Kowshik reported that building qemu with GCC 12.2.1 for 'ppc64-softmmu' target is failing due to following build warnings:
<snip>
../target/ppc/cpu_init.c:7018:13: error: 'ppc_restore_state_to_opc' defined but not used [-Werror=unused-function] 7018 | static void ppc_restore_state_to_opc(CPUState *cs,
<snip>Fix this by wrapping these function definitions in 'ifdef
CONFIG_TCG' so that they are only defined if qemu is compiled with '--enable-tcg'Reported-by Kowshik Jois B S <[email protected]>Signed-off-by Vaibhav Jain <[email protected]>--- target/ppc/cpu_init.c | 2 ++ target/ppc/excp_helper.c | 2 ++ 2 files changed, 4 insertions(+)target/ppc/cpu_init.c +2
-0@@ -7015,6 +7015,7 @@ static vaddr ppc_cpu_get_pc(CPUState *cs)return cpu->env.nip; } +#ifdef CONFIG_TCG static void ppc_restore_state_to_opc (CPUState *cs,const TranslationBlock *tb,const uint64_t *data)@@ -7023,6 +7024,7 @@ static void ppc_restore_state_to_opc(CPUState *cs, cpu->env.nip = data[0]; } +#endif /* CONFIG_TCG */ static bool ppc_cpu_has_work (CPUState *cs) {target/ppc/excp_helper.c +2
-0@@ -2842,6 +2842,7 @@ void helper_td(CPUPPCState *env, target_ulong arg1, target_ulong arg2,#endif #endif +#ifdef CONFIG_TCG static uint32_t helper_SIMON_LIKE_32_64 (uint32_t x,uint64_t key,uint32_t lane) {const uint16_t c =0xfffc ;@@ -2924,6 +2925,7 @@ HELPER_HASH(HASHST, env->spr[SPR_HASHKEYR], true) HELPER_HASH(HASHCHK, env->spr[SPR_HASHKEYR], false) HELPER_HASH(HASHSTP, env->spr[SPR_HASHPKEYR], true) HELPER_HASH(HASHCHKP, env->spr[SPR_HASHPKEYR], false) +#endif /* CONFIG_TCG */ #if !defined(CONFIG_USER_ONLY )
Daniel Henrique Barboza
Reviewed-by Greg Kurz Reviewed-by Philippe Mathieu-Daudé Tested-by Kowshik Jois B SQuoted 7 lines · Greg Kurz
Quoted 2 lines · On Thu, 17 Nov 2022 07:11:51 -0300 Daniel Henrique Barboza…
Queued in gitlab.com/danielhb/qemu/tree/ppc-next with the following tags:
You are planning a PR before 7.2-rc2, right ?
I'll send it today.
Quoted 6 lines
Quoted 5 lines
Reported-by Kowshik Jois B S <[email protected]>Fixes 61bd1d2942 ("target/ppc: Convert to tcg_ops restore_state_to_opc")Fixes 670f1da374 ("target/ppc: Implement hashst and hashchk")
Quoted 6 lines
The guard macro also covers the following two, introduced by yet another commit.
HELPER_HASH(HASHSTP, env->spr[SPR_HASHPKEYR], true) HELPER_HASH(HASHCHKP, env->spr[SPR_HASHPKEYR], false)Fixes 53ae2aeb9407 ("target/ppc: Implement hashstp and hashchkp")
Added this tag in-tree as well:
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1319
Daniel
Quoted 82 lines
Quoted 2 lines
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/377Err... I don't see any relation with this issue.
Cedric ?
But this resolves the issue created by Vaibhav for 7.2 :
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1319
Quoted 70 lines
Signed-off-by Vaibhav Jain <[email protected]>Reviewed-by Greg Kurz <[email protected]>Reviewed-by Philippe Mathieu-Daudé <[email protected]>Tested-by Kowshik Jois B S <[email protected]>Thanks,
Daniel
Quoted 58 lines · Vaibhav Jain
Kowshik reported that building qemu with GCC 12.2.1 for 'ppc64-softmmu' target is failing due to following build warnings:
<snip>
../target/ppc/cpu_init.c:7018:13: error: 'ppc_restore_state_to_opc' defined but not used [-Werror=unused-function] 7018 | static void ppc_restore_state_to_opc(CPUState *cs,
<snip>Fix this by wrapping these function definitions in 'ifdef
CONFIG_TCG' so that they are only defined if qemu is compiled with '--enable-tcg'Reported-by Kowshik Jois B S <[email protected]>Signed-off-by Vaibhav Jain <[email protected]>--- target/ppc/cpu_init.c | 2 ++ target/ppc/excp_helper.c | 2 ++ 2 files changed, 4 insertions(+)target/ppc/cpu_init.c +2
-0@@ -7015,6 +7015,7 @@ static vaddr ppc_cpu_get_pc(CPUState *cs)return cpu->env.nip; } +#ifdef CONFIG_TCG static void ppc_restore_state_to_opc (CPUState *cs,const TranslationBlock *tb,const uint64_t *data)@@ -7023,6 +7024,7 @@ static void ppc_restore_state_to_opc(CPUState *cs, cpu->env.nip = data[0]; } +#endif /* CONFIG_TCG */ static bool ppc_cpu_has_work (CPUState *cs) {target/ppc/excp_helper.c +2
-0@@ -2842,6 +2842,7 @@ void helper_td(CPUPPCState *env, target_ulong arg1, target_ulong arg2,#endif #endif +#ifdef CONFIG_TCG static uint32_t helper_SIMON_LIKE_32_64 (uint32_t x,uint64_t key,uint32_t lane) {const uint16_t c =0xfffc ;@@ -2924,6 +2925,7 @@ HELPER_HASH(HASHST, env->spr[SPR_HASHKEYR], true) HELPER_HASH(HASHCHK, env->spr[SPR_HASHKEYR], false) HELPER_HASH(HASHSTP, env->spr[SPR_HASHPKEYR], true) HELPER_HASH(HASHCHKP, env->spr[SPR_HASHPKEYR], false) +#endif /* CONFIG_TCG */ #if !defined(CONFIG_USER_ONLY )
Hello Vaibhav,
Thanks for the quick resolution. I have applied and tested the patch. Everything is smooth. Thank you.
Regards,
Kowshik Jois
Quoted 58 lines · Vaibhav Jain
Kowshik reported that building qemu with GCC 12.2.1 for 'ppc64-softmmu' target is failing due to following build warnings:
<snip>
../target/ppc/cpu_init.c:7018:13: error: 'ppc_restore_state_to_opc' defined but not used [-Werror=unused-function] 7018 | static void ppc_restore_state_to_opc(CPUState *cs,
<snip>Fix this by wrapping these function definitions in 'ifdef
CONFIG_TCG' so that they are only defined if qemu is compiled with '--enable-tcg'Reported-by Kowshik Jois B S <[email protected]>Signed-off-by Vaibhav Jain <[email protected]>--- target/ppc/cpu_init.c | 2 ++ target/ppc/excp_helper.c | 2 ++ 2 files changed, 4 insertions(+)target/ppc/cpu_init.c +2
-0@@ -7015,6 +7015,7 @@ static vaddr ppc_cpu_get_pc(CPUState *cs)return cpu->env.nip; } +#ifdef CONFIG_TCG static void ppc_restore_state_to_opc (CPUState *cs,const TranslationBlock *tb,const uint64_t *data)@@ -7023,6 +7024,7 @@ static void ppc_restore_state_to_opc(CPUState *cs, cpu->env.nip = data[0]; } +#endif /* CONFIG_TCG */ static bool ppc_cpu_has_work (CPUState *cs) {target/ppc/excp_helper.c +2
-0@@ -2842,6 +2842,7 @@ void helper_td(CPUPPCState *env, target_ulong arg1, target_ulong arg2,#endif #endif +#ifdef CONFIG_TCG static uint32_t helper_SIMON_LIKE_32_64 (uint32_t x,uint64_t key,uint32_t lane) {const uint16_t c =0xfffc ;@@ -2924,6 +2925,7 @@ HELPER_HASH(HASHST, env->spr[SPR_HASHKEYR], true) HELPER_HASH(HASHCHK, env->spr[SPR_HASHKEYR], false) HELPER_HASH(HASHSTP, env->spr[SPR_HASHPKEYR], true) HELPER_HASH(HASHCHKP, env->spr[SPR_HASHPKEYR], false) +#endif /* CONFIG_TCG */ #if !defined(CONFIG_USER_ONLY )