diff options
| author | Christian Svensson | 2019-07-01 18:26:17 +0200 |
|---|---|---|
| committer | Peter Maydell | 2019-07-01 18:28:59 +0200 |
| commit | 055762479be1575377ecf2d8fceb9d8df2703d0f (patch) | |
| tree | f93e04303fc7da74f8889a600dd358518849163f /tests/qapi-schema/enum-missing-data.err | |
| parent | aspeed/timer: Fix match calculations (diff) | |
| download | qemu-055762479be1575377ecf2d8fceb9d8df2703d0f.tar.gz qemu-055762479be1575377ecf2d8fceb9d8df2703d0f.tar.xz qemu-055762479be1575377ecf2d8fceb9d8df2703d0f.zip | |
aspeed/timer: Ensure positive muldiv delta
If the host decrements the counter register that results in a negative
delta. This is then passed to muldiv64 which only handles unsigned
numbers resulting in bogus results.
This fix ensures the delta being operated on is positive.
Test case: kexec a kernel using aspeed_timer and it will freeze on the
second bootup when the kernel initializes the timer. With this patch
that no longer happens and the timer appears to run OK.
Signed-off-by: Christian Svensson <bluecmd@google.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Message-id: 20190618165311.27066-12-clg@kaod.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/qapi-schema/enum-missing-data.err')
0 files changed, 0 insertions, 0 deletions
