| f3c7d038 | 18-Jun-2014 |
Andreas Färber <afaerber@suse.de> |
hw: Fix qemu_allocate_irqs() leaks
Replace qemu_allocate_irqs(foo, bar, 1)[0] with qemu_allocate_irq(foo, bar, 0).
This avoids leaking the dereferenced qemu_irq *.
Cc: Markus Armbruster <armbru@re
hw: Fix qemu_allocate_irqs() leaks
Replace qemu_allocate_irqs(foo, bar, 1)[0] with qemu_allocate_irq(foo, bar, 0).
This avoids leaking the dereferenced qemu_irq *.
Cc: Markus Armbruster <armbru@redhat.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de> [PC Changes: * Applied change to instance in sh4/sh7750.c ] Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Kirill Batuzov <batuzovk@ispras.ru> [AF: Fix IRQ index in sh4/sh7750.c] Cc: qemu-stable@nongnu.org Signed-off-by: Andreas Färber <afaerber@suse.de>
show more ...
|
| 297a3646 | 07-May-2014 |
Markus Armbruster <armbru@redhat.com> |
qapi: Replace uncommon use of the error API by the common one
We commonly use the error API like this:
err = NULL; foo(..., &err); if (err) { goto out; } bar(..., &err);
qapi: Replace uncommon use of the error API by the common one
We commonly use the error API like this:
err = NULL; foo(..., &err); if (err) { goto out; } bar(..., &err);
Every error source is checked separately. The second function is only called when the first one succeeds. Both functions are free to pass their argument to error_set(). Because error_set() asserts no error has been set, this effectively means they must not be called with an error set.
The qapi-generated code uses the error API differently:
// *errp was initialized to NULL somewhere up the call chain frob(..., errp); gnat(..., errp);
Errors accumulate in *errp: first error wins, subsequent errors get dropped. To make this work, the second function does nothing when called with an error set. Requires non-null errp, or else the second function can't see the first one fail.
This usage has also bled into visitor tests, and two device model object property getters rtc_get_date() and balloon_stats_get_all().
With the "accumulate" technique, you need fewer error checks in callers, and buy that with an error check in every callee. Can be nice.
However, mixing the two techniques is confusing. You can't use the "accumulate" technique with functions designed for the "check separately" technique. You can use the "check separately" technique with functions designed for the "accumulate" technique, but then error_set() can't catch you setting an error more than once.
Standardize on the "check separately" technique for now, because it's overwhelmingly prevalent.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
show more ...
|
| 286226a4 | 25-Mar-2014 |
Beniamino Galvani <b.galvani@gmail.com> |
allwinner-a10-pit: implement prescaler and source selection
This implements the prescaler and source fields of the timer control register. The source for each timer can be selected among 4 clock inp
allwinner-a10-pit: implement prescaler and source selection
This implements the prescaler and source fields of the timer control register. The source for each timer can be selected among 4 clock inputs whose frequencies are set through model properties.
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1395771730-16882-6-git-send-email-b.galvani@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| a63f9f85 | 25-Mar-2014 |
Beniamino Galvani <b.galvani@gmail.com> |
allwinner-a10-pit: use level triggered interrupts
Convert the interrupt generation logic to the use of level triggered interrupts.
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by
allwinner-a10-pit: use level triggered interrupts
Convert the interrupt generation logic to the use of level triggered interrupts.
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1395771730-16882-5-git-send-email-b.galvani@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| 323a8771 | 25-Mar-2014 |
Beniamino Galvani <b.galvani@gmail.com> |
allwinner-a10-pit: avoid generation of spurious interrupts
The model was generating interrupts for all enabled timers after the expiration of one of them. Avoid this by passing explicitly the timer
allwinner-a10-pit: avoid generation of spurious interrupts
The model was generating interrupts for all enabled timers after the expiration of one of them. Avoid this by passing explicitly the timer index to the callback function.
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by: Li Guang <lig.fnst@cn.fujitsu.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1395771730-16882-4-git-send-email-b.galvani@gmail.com [PMM: avoid duplicate typedef of AwA10PITState] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| 3b6144bd | 28-Mar-2014 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
acpi,pc,build bug fixes
Here are some bugfixes for 2.0.
A bugfix for acpi for pci bridges, and a build fix for old systems
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
acpi,pc,build bug fixes
Here are some bugfixes for 2.0.
A bugfix for acpi for pci bridges, and a build fix for old systems without pthread_setname_np: both fix regressions so we definitely want to include them. HPET fix is not for a regression but looks very safe, fixes a nasty bug and has been on list for a while.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Fri 28 Mar 2014 12:00:12 GMT using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>"
* remotes/mst/tags/for_upstream: acpi: fix ACPI generation for pci bridges Don't enable a HPET timer if HPET is disabled Detect pthread_setname_np at configure time
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|