diff mbox series

[v2,5/6] hw/core: Restrict reset handlers API to system-mode

Message ID 20200118140619.26333-6-philmd@redhat.com (mailing list archive)
State New, archived
Headers show
Series buildsys: Build faster (mostly tools and linux-user) | expand

Commit Message

Philippe Mathieu-Daudé Jan. 18, 2020, 2:06 p.m. UTC
The user-mode code does not use this API, restrict it
to the system-mode.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/core/Makefile.objs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Thomas Huth Jan. 20, 2020, 5:27 a.m. UTC | #1
On 18/01/2020 15.06, Philippe Mathieu-Daudé wrote:
> The user-mode code does not use this API, restrict it
> to the system-mode.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/core/Makefile.objs | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
> index 0edd9e635d..2fea68ccf7 100644
> --- a/hw/core/Makefile.objs
> +++ b/hw/core/Makefile.objs
> @@ -1,6 +1,7 @@
>  # core qdev-related obj files, also used by *-user:
>  common-obj-y += qdev.o qdev-properties.o
> -common-obj-y += bus.o reset.o
> +common-obj-y += bus.o
> +common-obj-$(CONFIG_SOFTMMU) += reset.o
>  common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
>  common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
>  # irq.o needed for qdev GPIO handling:
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>
Alex Bennée Jan. 20, 2020, 11:07 a.m. UTC | #2
Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> The user-mode code does not use this API, restrict it
> to the system-mode.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/core/Makefile.objs | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
> index 0edd9e635d..2fea68ccf7 100644
> --- a/hw/core/Makefile.objs
> +++ b/hw/core/Makefile.objs
> @@ -1,6 +1,7 @@
>  # core qdev-related obj files, also used by *-user:
>  common-obj-y += qdev.o qdev-properties.o
> -common-obj-y += bus.o reset.o
> +common-obj-y += bus.o
> +common-obj-$(CONFIG_SOFTMMU) += reset.o

This seems a very minor tweaks as far as it goes. I though the only
thing needed in hw was hw/core/cpu and everything else was system
emulation?

However it at least moves the needle in the right direction:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

>  common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
>  common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
>  # irq.o needed for qdev GPIO handling:
Philippe Mathieu-Daudé Jan. 21, 2020, 10:59 a.m. UTC | #3
On 1/20/20 12:07 PM, Alex Bennée wrote:
> 
> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> 
>> The user-mode code does not use this API, restrict it
>> to the system-mode.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>   hw/core/Makefile.objs | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
>> index 0edd9e635d..2fea68ccf7 100644
>> --- a/hw/core/Makefile.objs
>> +++ b/hw/core/Makefile.objs
>> @@ -1,6 +1,7 @@
>>   # core qdev-related obj files, also used by *-user:
>>   common-obj-y += qdev.o qdev-properties.o
>> -common-obj-y += bus.o reset.o
>> +common-obj-y += bus.o
>> +common-obj-$(CONFIG_SOFTMMU) += reset.o
> 
> This seems a very minor tweaks as far as it goes. I though the only
> thing needed in hw was hw/core/cpu and everything else was system
> emulation?

Unfortunately qdev.o pulls in a lot of unnecessary code (qbus, machine 
properties...).

> 
> However it at least moves the needle in the right direction:
> 
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

Thanks!

>>   common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
>>   common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
>>   # irq.o needed for qdev GPIO handling:
> 
>
diff mbox series

Patch

diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
index 0edd9e635d..2fea68ccf7 100644
--- a/hw/core/Makefile.objs
+++ b/hw/core/Makefile.objs
@@ -1,6 +1,7 @@ 
 # core qdev-related obj files, also used by *-user:
 common-obj-y += qdev.o qdev-properties.o
-common-obj-y += bus.o reset.o
+common-obj-y += bus.o
+common-obj-$(CONFIG_SOFTMMU) += reset.o
 common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
 common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
 # irq.o needed for qdev GPIO handling: