diff options
author | Peter Maydell | 2021-02-19 15:45:34 +0100 |
---|---|---|
committer | Peter Maydell | 2021-03-08 18:20:01 +0100 |
commit | 5ee0abed51231949ef91d7f8e1115be69ed91e93 (patch) | |
tree | b2c5ff7c17430270d3b03213eb668dd207bd4665 /target/mips | |
parent | Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into ... (diff) | |
download | qemu-5ee0abed51231949ef91d7f8e1115be69ed91e93.tar.gz qemu-5ee0abed51231949ef91d7f8e1115be69ed91e93.tar.xz qemu-5ee0abed51231949ef91d7f8e1115be69ed91e93.zip |
clock: Add ClockEvent parameter to callbacks
The Clock framework allows users to specify a callback which is
called after the clock's period has been updated. Some users need to
also have a callback which is called before the clock period is
updated.
As the first step in adding support for notifying Clock users on
pre-update events, add an argument to the ClockCallback to specify
what event is being notified, and add an argument to the various
functions for registering a callback to specify which events are
of interest to that callback.
Note that the documentation update renders correct the previously
incorrect claim in 'Adding a new clock' that callbacks "will be
explained in a following section".
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Luc Michel <luc@lmichel.fr>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210219144617.4782-2-peter.maydell@linaro.org
Diffstat (limited to 'target/mips')
-rw-r--r-- | target/mips/cpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/mips/cpu.c b/target/mips/cpu.c index bf70c77295..f6ef09c9e2 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -653,7 +653,7 @@ static void mips_cpu_initfn(Object *obj) MIPSCPUClass *mcc = MIPS_CPU_GET_CLASS(obj); cpu_set_cpustate_pointers(cpu); - cpu->clock = qdev_init_clock_in(DEVICE(obj), "clk-in", NULL, cpu); + cpu->clock = qdev_init_clock_in(DEVICE(obj), "clk-in", NULL, cpu, 0); env->cpu_model = mcc->cpu_def; } |