[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v9 1/9] hw/core/clock: introduce clock object
From: |
Peter Maydell |
Subject: |
Re: [PATCH v9 1/9] hw/core/clock: introduce clock object |
Date: |
Fri, 17 Apr 2020 15:39:29 +0100 |
On Mon, 6 Apr 2020 at 14:53, Damien Hedde <address@hidden> wrote:
>
> This object may be used to represent a clock inside a clock tree.
>
> A clock may be connected to another clock so that it receives update,
> through a callback, whenever the source/parent clock is updated.
> --- a/hw/core/trace-events
> +++ b/hw/core/trace-events
> @@ -27,3 +27,10 @@ resettable_phase_exit_begin(void *obj, const char
> *objtype, unsigned count, int
> resettable_phase_exit_exec(void *obj, const char *objtype, int has_method)
> "obj=%p(%s) method=%d"
> resettable_phase_exit_end(void *obj, const char *objtype, unsigned count)
> "obj=%p(%s) count=%d"
> resettable_transitional_function(void *obj, const char *objtype) "obj=%p(%s)"
> +
> +# clock.c
> +clock_set_source(const char *clk, const char *src) "'%s', src='%s'"
> +clock_disconnect(const char *clk) "'%s'"
> +clock_set(const char *clk, unsigned long long old, unsigned long long new)
> "'%s', ns=%llu->%llu"
> +clock_propagate(const char *clk) "'%s'"
> +clock_update(const char *clk, const char *src, unsigned long long val, int
> cb) "'%s', src='%s', ns=%llu, cb=%d"
"unsigned long long" isn't a valid type to use in a trace event,
it seems: a build with --enable-trace-backends=dtrace will
produce the following warning:
Warning: /usr/bin/dtrace:hw/core/trace-dtrace.dtrace:54: syntax error near:
probe clock_disconnect
Warning: Proceeding as if --no-pyparsing was given.
Using fixed-width types is preferable anyway; squashing in
this fixes it:
diff --git a/hw/core/trace-events b/hw/core/trace-events
index 39301621ce8..1ac60ede6b7 100644
--- a/hw/core/trace-events
+++ b/hw/core/trace-events
@@ -31,6 +31,6 @@ resettable_transitional_function(void *obj, const
char *objtype) "obj=%p(%s)"
# clock.c
clock_set_source(const char *clk, const char *src) "'%s', src='%s'"
clock_disconnect(const char *clk) "'%s'"
-clock_set(const char *clk, unsigned long long old, unsigned long long
new) "'%s', ns=%llu->%llu"
+clock_set(const char *clk, uint64_t old, uint64_t new) "'%s',
ns=%"PRIu64"->%"PRIu64
clock_propagate(const char *clk) "'%s'"
-clock_update(const char *clk, const char *src, unsigned long long
val, int cb) "'%s', src='%s', ns=%llu, cb=%d"
+clock_update(const char *clk, const char *src, uint64_t val, int cb)
"'%s', src='%s', ns=%"PRIu64", cb=%d"
thanks
-- PMM
- [PATCH v9 8/9] hw/arm/xilinx_zynq: connect uart clocks to slcr, (continued)
- [PATCH v9 8/9] hw/arm/xilinx_zynq: connect uart clocks to slcr, Damien Hedde, 2020/04/06
- [PATCH v9 3/9] qdev: add clock input&output support to devices., Damien Hedde, 2020/04/06
- [PATCH v9 7/9] hw/char/cadence_uart: add clock support, Damien Hedde, 2020/04/06
- [PATCH v9 5/9] docs/clocks: add device's clock documentation, Damien Hedde, 2020/04/06
- Re: [PATCH v9 5/9] docs/clocks: add device's clock documentation, Peter Maydell, 2020/04/17
- [PATCH v9 1/9] hw/core/clock: introduce clock object, Damien Hedde, 2020/04/06
- Re: [PATCH v9 1/9] hw/core/clock: introduce clock object,
Peter Maydell <=
- Re: [PATCH v9 0/9] Clock framework API, Peter Maydell, 2020/04/17