qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/timer: Compile devices not target-dependent as common objects
@ 2019-05-05 18:07 Philippe Mathieu-Daudé
  2019-05-05 18:07 ` Philippe Mathieu-Daudé
  2019-05-06  4:10 ` Thomas Huth
  0 siblings, 2 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-05-05 18:07 UTC (permalink / raw)
  To: qemu-trivial, Thomas Huth, qemu-devel
  Cc: Peter Maydell, Andrzej Zaborowski, Magnus Damm, Aleksandar Rikalo,
	Aurelien Jarno, Aleksandar Markovic, Igor Mitsyanko, qemu-arm,
	Beniamino Galvani, Antony Pavlov, Philippe Mathieu-Daudé

All these devices do not contain any target-specific code. While
most of them are arch-specific, they are shared between different
targets of the same arch family (ARM and AArch64, MIPS32/MIPS64,
multiple endianess, ...).
Put them into common-obj-y to compile them once for all targets.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/timer/Makefile.objs | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/hw/timer/Makefile.objs b/hw/timer/Makefile.objs
index 0e9a4530f84..a92e22938cb 100644
--- a/hw/timer/Makefile.objs
+++ b/hw/timer/Makefile.objs
@@ -25,20 +25,20 @@ common-obj-$(CONFIG_MILKYMIST) += milkymist-sysctl.o
 common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-rtc.o
 common-obj-$(CONFIG_NRF51_SOC) += nrf51_timer.o
 
-obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o
-obj-$(CONFIG_EXYNOS4) += exynos4210_mct.o
-obj-$(CONFIG_EXYNOS4) += exynos4210_pwm.o
-obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o
-obj-$(CONFIG_OMAP) += omap_gptimer.o
-obj-$(CONFIG_OMAP) += omap_synctimer.o
-obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o
-obj-$(CONFIG_SH4) += sh_timer.o
-obj-$(CONFIG_DIGIC) += digic-timer.o
-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o
+common-obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o
+common-obj-$(CONFIG_EXYNOS4) += exynos4210_mct.o
+common-obj-$(CONFIG_EXYNOS4) += exynos4210_pwm.o
+common-obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o
+common-obj-$(CONFIG_OMAP) += omap_gptimer.o
+common-obj-$(CONFIG_OMAP) += omap_synctimer.o
+common-obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o
+common-obj-$(CONFIG_SH4) += sh_timer.o
+common-obj-$(CONFIG_DIGIC) += digic-timer.o
+common-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o
 
 obj-$(CONFIG_MC146818RTC) += mc146818rtc.o
 
-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o
+common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o
 
 common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o
 common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH] hw/timer: Compile devices not target-dependent as common objects
  2019-05-05 18:07 [Qemu-devel] [PATCH] hw/timer: Compile devices not target-dependent as common objects Philippe Mathieu-Daudé
@ 2019-05-05 18:07 ` Philippe Mathieu-Daudé
  2019-05-06  4:10 ` Thomas Huth
  1 sibling, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-05-05 18:07 UTC (permalink / raw)
  To: qemu-trivial, Thomas Huth, qemu-devel
  Cc: Peter Maydell, Aleksandar Rikalo, Philippe Mathieu-Daudé,
	Magnus Damm, Beniamino Galvani, Igor Mitsyanko, qemu-arm,
	Antony Pavlov, Aleksandar Markovic, Aurelien Jarno

All these devices do not contain any target-specific code. While
most of them are arch-specific, they are shared between different
targets of the same arch family (ARM and AArch64, MIPS32/MIPS64,
multiple endianess, ...).
Put them into common-obj-y to compile them once for all targets.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/timer/Makefile.objs | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/hw/timer/Makefile.objs b/hw/timer/Makefile.objs
index 0e9a4530f84..a92e22938cb 100644
--- a/hw/timer/Makefile.objs
+++ b/hw/timer/Makefile.objs
@@ -25,20 +25,20 @@ common-obj-$(CONFIG_MILKYMIST) += milkymist-sysctl.o
 common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-rtc.o
 common-obj-$(CONFIG_NRF51_SOC) += nrf51_timer.o
 
-obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o
-obj-$(CONFIG_EXYNOS4) += exynos4210_mct.o
-obj-$(CONFIG_EXYNOS4) += exynos4210_pwm.o
-obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o
-obj-$(CONFIG_OMAP) += omap_gptimer.o
-obj-$(CONFIG_OMAP) += omap_synctimer.o
-obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o
-obj-$(CONFIG_SH4) += sh_timer.o
-obj-$(CONFIG_DIGIC) += digic-timer.o
-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o
+common-obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o
+common-obj-$(CONFIG_EXYNOS4) += exynos4210_mct.o
+common-obj-$(CONFIG_EXYNOS4) += exynos4210_pwm.o
+common-obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o
+common-obj-$(CONFIG_OMAP) += omap_gptimer.o
+common-obj-$(CONFIG_OMAP) += omap_synctimer.o
+common-obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o
+common-obj-$(CONFIG_SH4) += sh_timer.o
+common-obj-$(CONFIG_DIGIC) += digic-timer.o
+common-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o
 
 obj-$(CONFIG_MC146818RTC) += mc146818rtc.o
 
-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o
+common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o
 
 common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o
 common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/timer: Compile devices not target-dependent as common objects
  2019-05-05 18:07 [Qemu-devel] [PATCH] hw/timer: Compile devices not target-dependent as common objects Philippe Mathieu-Daudé
  2019-05-05 18:07 ` Philippe Mathieu-Daudé
@ 2019-05-06  4:10 ` Thomas Huth
  2019-05-06  8:06   ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2019-05-06  4:10 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-trivial, qemu-devel
  Cc: Peter Maydell, Stefan Hajnoczi, Aleksandar Rikalo, Magnus Damm,
	Beniamino Galvani, Igor Mitsyanko, qemu-arm, Antony Pavlov,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

On 05/05/2019 20.07, Philippe Mathieu-Daudé wrote:
> All these devices do not contain any target-specific code. While
> most of them are arch-specific, they are shared between different
> targets of the same arch family (ARM and AArch64, MIPS32/MIPS64,
> multiple endianess, ...).
> Put them into common-obj-y to compile them once for all targets.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/timer/Makefile.objs | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/hw/timer/Makefile.objs b/hw/timer/Makefile.objs
> index 0e9a4530f84..a92e22938cb 100644
> --- a/hw/timer/Makefile.objs
> +++ b/hw/timer/Makefile.objs
> @@ -25,20 +25,20 @@ common-obj-$(CONFIG_MILKYMIST) += milkymist-sysctl.o
>  common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-rtc.o
>  common-obj-$(CONFIG_NRF51_SOC) += nrf51_timer.o
>  
> -obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o
> -obj-$(CONFIG_EXYNOS4) += exynos4210_mct.o
> -obj-$(CONFIG_EXYNOS4) += exynos4210_pwm.o
> -obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o
> -obj-$(CONFIG_OMAP) += omap_gptimer.o
> -obj-$(CONFIG_OMAP) += omap_synctimer.o
> -obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o
> -obj-$(CONFIG_SH4) += sh_timer.o
> -obj-$(CONFIG_DIGIC) += digic-timer.o
> -obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o
> +common-obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o
> +common-obj-$(CONFIG_EXYNOS4) += exynos4210_mct.o
> +common-obj-$(CONFIG_EXYNOS4) += exynos4210_pwm.o
> +common-obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o
> +common-obj-$(CONFIG_OMAP) += omap_gptimer.o
> +common-obj-$(CONFIG_OMAP) += omap_synctimer.o
> +common-obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o
> +common-obj-$(CONFIG_SH4) += sh_timer.o
> +common-obj-$(CONFIG_DIGIC) += digic-timer.o
> +common-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o
>  
>  obj-$(CONFIG_MC146818RTC) += mc146818rtc.o
>  
> -obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o
> +common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o
>  
>  common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o
>  common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o

I've checked

 grep -r TARGET hw/timer/

and this looks good to me, so:

Reviewed-by: Thomas Huth <thuth@redhat.com>

By the way, I was surprised to see TARGET_FMT_plx there, since I first
thought that this would be a target-specific define, too. But apparently
it is not. Very confusing. I'd suggest to rename that to HWADDR_FMT_plx
instead, what do you think?

 Thomas


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/timer: Compile devices not target-dependent as common objects
  2019-05-06  4:10 ` Thomas Huth
@ 2019-05-06  8:06   ` Philippe Mathieu-Daudé
  2019-05-08 12:29     ` Paolo Bonzini
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-05-06  8:06 UTC (permalink / raw)
  To: Thomas Huth, qemu-trivial, qemu-devel
  Cc: Peter Maydell, Stefan Hajnoczi, Aleksandar Rikalo, Magnus Damm,
	Beniamino Galvani, Igor Mitsyanko, qemu-arm, Antony Pavlov,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

On 5/6/19 6:10 AM, Thomas Huth wrote:
> On 05/05/2019 20.07, Philippe Mathieu-Daudé wrote:
>> All these devices do not contain any target-specific code. While
>> most of them are arch-specific, they are shared between different
>> targets of the same arch family (ARM and AArch64, MIPS32/MIPS64,
>> multiple endianess, ...).
>> Put them into common-obj-y to compile them once for all targets.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>  hw/timer/Makefile.objs | 22 +++++++++++-----------
>>  1 file changed, 11 insertions(+), 11 deletions(-)
>>
>> diff --git a/hw/timer/Makefile.objs b/hw/timer/Makefile.objs
>> index 0e9a4530f84..a92e22938cb 100644
>> --- a/hw/timer/Makefile.objs
>> +++ b/hw/timer/Makefile.objs
>> @@ -25,20 +25,20 @@ common-obj-$(CONFIG_MILKYMIST) += milkymist-sysctl.o
>>  common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-rtc.o
>>  common-obj-$(CONFIG_NRF51_SOC) += nrf51_timer.o
>>  
>> -obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o
>> -obj-$(CONFIG_EXYNOS4) += exynos4210_mct.o
>> -obj-$(CONFIG_EXYNOS4) += exynos4210_pwm.o
>> -obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o
>> -obj-$(CONFIG_OMAP) += omap_gptimer.o
>> -obj-$(CONFIG_OMAP) += omap_synctimer.o
>> -obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o
>> -obj-$(CONFIG_SH4) += sh_timer.o
>> -obj-$(CONFIG_DIGIC) += digic-timer.o
>> -obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o
>> +common-obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o
>> +common-obj-$(CONFIG_EXYNOS4) += exynos4210_mct.o
>> +common-obj-$(CONFIG_EXYNOS4) += exynos4210_pwm.o
>> +common-obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o
>> +common-obj-$(CONFIG_OMAP) += omap_gptimer.o
>> +common-obj-$(CONFIG_OMAP) += omap_synctimer.o
>> +common-obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o
>> +common-obj-$(CONFIG_SH4) += sh_timer.o
>> +common-obj-$(CONFIG_DIGIC) += digic-timer.o
>> +common-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o
>>  
>>  obj-$(CONFIG_MC146818RTC) += mc146818rtc.o
>>  
>> -obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o
>> +common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o
>>  
>>  common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o
>>  common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o
> 
> I've checked
> 
>  grep -r TARGET hw/timer/
> 
> and this looks good to me, so:
> 
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 
> By the way, I was surprised to see TARGET_FMT_plx there, since I first
> thought that this would be a target-specific define, too. But apparently
> it is not. Very confusing. I'd suggest to rename that to HWADDR_FMT_plx
> instead, what do you think?

I'd rather use HWADDR_PRIx and slowly kill TARGET_FMT_plx...


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/timer: Compile devices not target-dependent as common objects
  2019-05-06  8:06   ` Philippe Mathieu-Daudé
@ 2019-05-08 12:29     ` Paolo Bonzini
  0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2019-05-08 12:29 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Thomas Huth, qemu-trivial,
	qemu-devel
  Cc: Peter Maydell, Stefan Hajnoczi, Aleksandar Rikalo, Magnus Damm,
	Beniamino Galvani, Igor Mitsyanko, qemu-arm, Antony Pavlov,
	Aleksandar Markovic, Aurelien Jarno

On 06/05/19 03:06, Philippe Mathieu-Daudé wrote:
>> By the way, I was surprised to see TARGET_FMT_plx there, since I first
>> thought that this would be a target-specific define, too. But apparently
>> it is not. Very confusing. I'd suggest to rename that to HWADDR_FMT_plx
>> instead, what do you think?
> I'd rather use HWADDR_PRIx and slowly kill TARGET_FMT_plx...

Right, either that or rename it to HWADDR_PRI0x.

Paolo


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-05-08 12:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-05 18:07 [Qemu-devel] [PATCH] hw/timer: Compile devices not target-dependent as common objects Philippe Mathieu-Daudé
2019-05-05 18:07 ` Philippe Mathieu-Daudé
2019-05-06  4:10 ` Thomas Huth
2019-05-06  8:06   ` Philippe Mathieu-Daudé
2019-05-08 12:29     ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).