* [PATCH] hw/misc/bcm2835_cprman: Make cprman_internals an included source file
@ 2020-10-19 11:26 Philippe Mathieu-Daudé
2020-10-19 15:53 ` Peter Maydell
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-19 11:26 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, qemu-arm, Luc Michel, Philippe Mathieu-Daudé,
Andrew Baumann
bcm2835_cprman_internals.h is only include by bcm2835_cprman.c
and contains various static array definitions. Make it an
included source file (using the .c.inc extension).
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
I'm sending this on top of:
[PATCH v3 00/15] raspi: add the bcm2835 cprman clock manager
to avoid a respin before soft freeze.
This patch can be queued or squashed on top of patch #08/15:
"bcm2835_cprman: add a PLL channel skeleton implementation"
Based-on: <20201010135759.437903-1-luc@lmichel.fr>
---
hw/misc/bcm2835_cprman.c | 2 +-
.../misc/bcm2835_cprman_internals.c.inc | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename include/hw/misc/bcm2835_cprman_internals.h => hw/misc/bcm2835_cprman_internals.c.inc (100%)
diff --git a/hw/misc/bcm2835_cprman.c b/hw/misc/bcm2835_cprman.c
index 7e415a017c9..9d4c0ee6c73 100644
--- a/hw/misc/bcm2835_cprman.c
+++ b/hw/misc/bcm2835_cprman.c
@@ -48,7 +48,7 @@
#include "migration/vmstate.h"
#include "hw/qdev-properties.h"
#include "hw/misc/bcm2835_cprman.h"
-#include "hw/misc/bcm2835_cprman_internals.h"
+#include "bcm2835_cprman_internals.c.inc"
#include "trace.h"
/* PLL */
diff --git a/include/hw/misc/bcm2835_cprman_internals.h b/hw/misc/bcm2835_cprman_internals.c.inc
similarity index 100%
rename from include/hw/misc/bcm2835_cprman_internals.h
rename to hw/misc/bcm2835_cprman_internals.c.inc
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] hw/misc/bcm2835_cprman: Make cprman_internals an included source file
2020-10-19 11:26 [PATCH] hw/misc/bcm2835_cprman: Make cprman_internals an included source file Philippe Mathieu-Daudé
@ 2020-10-19 15:53 ` Peter Maydell
2020-10-19 15:55 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2020-10-19 15:53 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-arm, Luc Michel, QEMU Developers, Andrew Baumann
On Mon, 19 Oct 2020 at 12:26, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> bcm2835_cprman_internals.h is only include by bcm2835_cprman.c
> and contains various static array definitions. Make it an
> included source file (using the .c.inc extension).
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> I'm sending this on top of:
> [PATCH v3 00/15] raspi: add the bcm2835 cprman clock manager
> to avoid a respin before soft freeze.
>
> This patch can be queued or squashed on top of patch #08/15:
> "bcm2835_cprman: add a PLL channel skeleton implementation"
>
> Based-on: <20201010135759.437903-1-luc@lmichel.fr>
> ---
> hw/misc/bcm2835_cprman.c | 2 +-
> .../misc/bcm2835_cprman_internals.c.inc | 0
> 2 files changed, 1 insertion(+), 1 deletion(-)
> rename include/hw/misc/bcm2835_cprman_internals.h => hw/misc/bcm2835_cprman_internals.c.inc (100%)
>
> diff --git a/hw/misc/bcm2835_cprman.c b/hw/misc/bcm2835_cprman.c
> index 7e415a017c9..9d4c0ee6c73 100644
> --- a/hw/misc/bcm2835_cprman.c
> +++ b/hw/misc/bcm2835_cprman.c
> @@ -48,7 +48,7 @@
> #include "migration/vmstate.h"
> #include "hw/qdev-properties.h"
> #include "hw/misc/bcm2835_cprman.h"
> -#include "hw/misc/bcm2835_cprman_internals.h"
> +#include "bcm2835_cprman_internals.c.inc"
> #include "trace.h"
I guess so, though usually we only use .c.inc files
where we actually need to multiply-include them (eg
with different #defines to control how they expand).
I suppose there's softfloat-specialize.c.inc which
only gets included once.
Applied to target-arm.next (not going to try to
squash it as it would make applying the following
patches in the series a bit awkward).
I am going to move the #include line down so it's
not in with all the includes for the .h files.
thanks
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] hw/misc/bcm2835_cprman: Make cprman_internals an included source file
2020-10-19 15:53 ` Peter Maydell
@ 2020-10-19 15:55 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-19 15:55 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-arm, Luc Michel, QEMU Developers, Andrew Baumann
On 10/19/20 5:53 PM, Peter Maydell wrote:
> On Mon, 19 Oct 2020 at 12:26, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>
>> bcm2835_cprman_internals.h is only include by bcm2835_cprman.c
>> and contains various static array definitions. Make it an
>> included source file (using the .c.inc extension).
>>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>> I'm sending this on top of:
>> [PATCH v3 00/15] raspi: add the bcm2835 cprman clock manager
>> to avoid a respin before soft freeze.
>>
>> This patch can be queued or squashed on top of patch #08/15:
>> "bcm2835_cprman: add a PLL channel skeleton implementation"
>>
>> Based-on: <20201010135759.437903-1-luc@lmichel.fr>
>> ---
>> hw/misc/bcm2835_cprman.c | 2 +-
>> .../misc/bcm2835_cprman_internals.c.inc | 0
>> 2 files changed, 1 insertion(+), 1 deletion(-)
>> rename include/hw/misc/bcm2835_cprman_internals.h => hw/misc/bcm2835_cprman_internals.c.inc (100%)
>>
>> diff --git a/hw/misc/bcm2835_cprman.c b/hw/misc/bcm2835_cprman.c
>> index 7e415a017c9..9d4c0ee6c73 100644
>> --- a/hw/misc/bcm2835_cprman.c
>> +++ b/hw/misc/bcm2835_cprman.c
>> @@ -48,7 +48,7 @@
>> #include "migration/vmstate.h"
>> #include "hw/qdev-properties.h"
>> #include "hw/misc/bcm2835_cprman.h"
>> -#include "hw/misc/bcm2835_cprman_internals.h"
>> +#include "bcm2835_cprman_internals.c.inc"
>> #include "trace.h"
>
> I guess so, though usually we only use .c.inc files
> where we actually need to multiply-include them (eg
> with different #defines to control how they expand).
> I suppose there's softfloat-specialize.c.inc which
> only gets included once.
>
> Applied to target-arm.next (not going to try to
> squash it as it would make applying the following
> patches in the series a bit awkward).
Indeed :)
>
> I am going to move the #include line down so it's
> not in with all the includes for the .h files.
Ah yes good idea it is cleaner, thanks.
>
> thanks
> -- PMM
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-19 15:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 11:26 [PATCH] hw/misc/bcm2835_cprman: Make cprman_internals an included source file Philippe Mathieu-Daudé
2020-10-19 15:53 ` Peter Maydell
2020-10-19 15:55 ` Philippe Mathieu-Daudé
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).