[PATCH-for-9.1 6/7] hw/core: Move reset.c to hwcore_ss[] source set

Philippe Mathieu-Daudé posted 7 patches 1 year, 10 months ago
Maintainers: Jason Wang <jasowang@redhat.com>, Andrew Melnychenko <andrew@daynix.com>, Yuri Benditovich <yuri.benditovich@daynix.com>, Peter Maydell <peter.maydell@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Thomas Huth <thuth@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
There is a newer version of this series
[PATCH-for-9.1 6/7] hw/core: Move reset.c to hwcore_ss[] source set
Posted by Philippe Mathieu-Daudé 1 year, 10 months ago
reset.c contains core code used by any CPU, required
by user emulation. Move it to hwcore_ss[] where it
belongs.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/core/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/core/meson.build b/hw/core/meson.build
index e26f2e088c..1389f1b339 100644
--- a/hw/core/meson.build
+++ b/hw/core/meson.build
@@ -3,7 +3,6 @@ hwcore_ss.add(files(
   'bus.c',
   'qdev-properties.c',
   'qdev.c',
-  'reset.c',
   'resetcontainer.c',
   'resettable.c',
   'vmstate-if.c',
@@ -16,6 +15,7 @@ if have_system
   hwcore_ss.add(files(
     'hotplug.c',
     'qdev-hotplug.c',
+    'reset.c',
   ))
 else
   hwcore_ss.add(files(
-- 
2.41.0


Re: [PATCH-for-9.1 6/7] hw/core: Move reset.c to hwcore_ss[] source set
Posted by Richard Henderson 1 year, 10 months ago
On 4/4/24 09:47, Philippe Mathieu-Daudé wrote:
> reset.c contains core code used by any CPU, required
> by user emulation. Move it to hwcore_ss[] where it
> belongs.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/core/meson.build | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/core/meson.build b/hw/core/meson.build
> index e26f2e088c..1389f1b339 100644
> --- a/hw/core/meson.build
> +++ b/hw/core/meson.build
> @@ -3,7 +3,6 @@ hwcore_ss.add(files(
>     'bus.c',
>     'qdev-properties.c',
>     'qdev.c',
> -  'reset.c',
>     'resetcontainer.c',
>     'resettable.c',
>     'vmstate-if.c',
> @@ -16,6 +15,7 @@ if have_system
>     hwcore_ss.add(files(
>       'hotplug.c',
>       'qdev-hotplug.c',
> +    'reset.c',

This patch would seem to obviate the previous?

r~


Re: [PATCH-for-9.1 6/7] hw/core: Move reset.c to hwcore_ss[] source set
Posted by Philippe Mathieu-Daudé 1 year, 10 months ago
On 6/4/24 00:44, Richard Henderson wrote:
> On 4/4/24 09:47, Philippe Mathieu-Daudé wrote:
>> reset.c contains core code used by any CPU, required
>> by user emulation. Move it to hwcore_ss[] where it
>> belongs.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   hw/core/meson.build | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/core/meson.build b/hw/core/meson.build
>> index e26f2e088c..1389f1b339 100644
>> --- a/hw/core/meson.build
>> +++ b/hw/core/meson.build
>> @@ -3,7 +3,6 @@ hwcore_ss.add(files(
>>     'bus.c',
>>     'qdev-properties.c',
>>     'qdev.c',
>> -  'reset.c',
>>     'resetcontainer.c',
>>     'resettable.c',
>>     'vmstate-if.c',
>> @@ -16,6 +15,7 @@ if have_system
>>     hwcore_ss.add(files(
>>       'hotplug.c',
>>       'qdev-hotplug.c',
>> +    'reset.c',
> 
> This patch would seem to obviate the previous?

No, hwcore_ss[] is used for both system/user.

As its name suggests, "sysemu/reset.h" is system specific.
We don't want to compile its definitions and link them to
a user-only build.

I can squash both if it makes it more obvious.

Regards,

Phil.