diff mbox series

[RFC,PATCH-for-10.1,11/19] accel/tcg: Replace CPU_RESOLVING_TYPE -> target_cpu_type()

Message ID 20250403234914.9154-12-philmd@linaro.org
State New
Headers show
Series qemu: Introduce TargetInfo API (for single binary) | expand

Commit Message

Philippe Mathieu-Daudé April 3, 2025, 11:49 p.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 accel/tcg/tcg-all.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Pierrick Bouvier April 4, 2025, 4:51 p.m. UTC | #1
On 4/3/25 16:49, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   accel/tcg/tcg-all.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c
> index bf27c5c0fb3..a13cb39644f 100644
> --- a/accel/tcg/tcg-all.c
> +++ b/accel/tcg/tcg-all.c
> @@ -35,6 +35,7 @@
>   #include "qapi/qapi-types-common.h"
>   #include "qapi/qapi-builtin-visit.h"
>   #include "qemu/units.h"
> +#include "qemu/target_info.h"
>   #if defined(CONFIG_USER_ONLY)
>   #include "hw/qdev-core.h"
>   #else
> @@ -44,7 +45,6 @@
>   #include "accel/tcg/cpu-ops.h"
>   #include "internal-common.h"
>   #include "cpu-param.h"
> -#include "cpu.h"
>   
>   
>   struct TCGState {
> @@ -73,7 +73,7 @@ bool qemu_tcg_mttcg_enabled(void)
>   
>   static void mttcg_init(TCGState *s)
>   {
> -    CPUClass *cc = CPU_CLASS(object_class_by_name(CPU_RESOLVING_TYPE));
> +    CPUClass *cc = CPU_CLASS(object_class_by_name(target_cpu_type()));
>       bool mttcg_supported = cc->tcg_ops->mttcg_supported;
>   
>       if (s->mttcg_enabled == ON_OFF_AUTO_AUTO) {

It can be squashed with previous commit.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Philippe Mathieu-Daudé April 4, 2025, 5:56 p.m. UTC | #2
On 4/4/25 18:51, Pierrick Bouvier wrote:
> On 4/3/25 16:49, Philippe Mathieu-Daudé wrote:
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   accel/tcg/tcg-all.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c
>> index bf27c5c0fb3..a13cb39644f 100644
>> --- a/accel/tcg/tcg-all.c
>> +++ b/accel/tcg/tcg-all.c
>> @@ -35,6 +35,7 @@
>>   #include "qapi/qapi-types-common.h"
>>   #include "qapi/qapi-builtin-visit.h"
>>   #include "qemu/units.h"
>> +#include "qemu/target_info.h"
>>   #if defined(CONFIG_USER_ONLY)
>>   #include "hw/qdev-core.h"
>>   #else
>> @@ -44,7 +45,6 @@
>>   #include "accel/tcg/cpu-ops.h"
>>   #include "internal-common.h"
>>   #include "cpu-param.h"
>> -#include "cpu.h"
>>   struct TCGState {
>> @@ -73,7 +73,7 @@ bool qemu_tcg_mttcg_enabled(void)
>>   static void mttcg_init(TCGState *s)
>>   {
>> -    CPUClass *cc = CPU_CLASS(object_class_by_name(CPU_RESOLVING_TYPE));
>> +    CPUClass *cc = CPU_CLASS(object_class_by_name(target_cpu_type()));
>>       bool mttcg_supported = cc->tcg_ops->mttcg_supported;
>>       if (s->mttcg_enabled == ON_OFF_AUTO_AUTO) {
> 
> It can be squashed with previous commit.

Not exactly the same set of maintainers, but can do.

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

Thanks!
Pierrick Bouvier April 4, 2025, 6:04 p.m. UTC | #3
On 4/4/25 10:56, Philippe Mathieu-Daudé wrote:
> On 4/4/25 18:51, Pierrick Bouvier wrote:
>> On 4/3/25 16:49, Philippe Mathieu-Daudé wrote:
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>> ---
>>>    accel/tcg/tcg-all.c | 4 ++--
>>>    1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c
>>> index bf27c5c0fb3..a13cb39644f 100644
>>> --- a/accel/tcg/tcg-all.c
>>> +++ b/accel/tcg/tcg-all.c
>>> @@ -35,6 +35,7 @@
>>>    #include "qapi/qapi-types-common.h"
>>>    #include "qapi/qapi-builtin-visit.h"
>>>    #include "qemu/units.h"
>>> +#include "qemu/target_info.h"
>>>    #if defined(CONFIG_USER_ONLY)
>>>    #include "hw/qdev-core.h"
>>>    #else
>>> @@ -44,7 +45,6 @@
>>>    #include "accel/tcg/cpu-ops.h"
>>>    #include "internal-common.h"
>>>    #include "cpu-param.h"
>>> -#include "cpu.h"
>>>    struct TCGState {
>>> @@ -73,7 +73,7 @@ bool qemu_tcg_mttcg_enabled(void)
>>>    static void mttcg_init(TCGState *s)
>>>    {
>>> -    CPUClass *cc = CPU_CLASS(object_class_by_name(CPU_RESOLVING_TYPE));
>>> +    CPUClass *cc = CPU_CLASS(object_class_by_name(target_cpu_type()));
>>>        bool mttcg_supported = cc->tcg_ops->mttcg_supported;
>>>        if (s->mttcg_enabled == ON_OFF_AUTO_AUTO) {
>>
>> It can be squashed with previous commit.
> 
> Not exactly the same set of maintainers, but can do.
> 

For mechanical changes like this, I guess it's less important than when 
really touching a specific subsystem.

>> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> 
> Thanks!
diff mbox series

Patch

diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c
index bf27c5c0fb3..a13cb39644f 100644
--- a/accel/tcg/tcg-all.c
+++ b/accel/tcg/tcg-all.c
@@ -35,6 +35,7 @@ 
 #include "qapi/qapi-types-common.h"
 #include "qapi/qapi-builtin-visit.h"
 #include "qemu/units.h"
+#include "qemu/target_info.h"
 #if defined(CONFIG_USER_ONLY)
 #include "hw/qdev-core.h"
 #else
@@ -44,7 +45,6 @@ 
 #include "accel/tcg/cpu-ops.h"
 #include "internal-common.h"
 #include "cpu-param.h"
-#include "cpu.h"
 
 
 struct TCGState {
@@ -73,7 +73,7 @@  bool qemu_tcg_mttcg_enabled(void)
 
 static void mttcg_init(TCGState *s)
 {
-    CPUClass *cc = CPU_CLASS(object_class_by_name(CPU_RESOLVING_TYPE));
+    CPUClass *cc = CPU_CLASS(object_class_by_name(target_cpu_type()));
     bool mttcg_supported = cc->tcg_ops->mttcg_supported;
 
     if (s->mttcg_enabled == ON_OFF_AUTO_AUTO) {