qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Alistair Francis <alistair23@gmail.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	Konstanty Bialkowski <konstanty@ieee.org>
Subject: Re: [Qemu-devel] [PATCH v5 5/8] irq: Add a new irq device that allows the ORing of lines
Date: Tue, 26 Jul 2016 16:00:38 +0100	[thread overview]
Message-ID: <CAFEAcA8CQ-MioE3Sc051XugNS5WFBAyQ0w3K9UkCURvRDYHuvw@mail.gmail.com> (raw)
In-Reply-To: <42ce627289b3f8976eaba62951224233e4d1e5cf.1469514677.git.alistair@alistair23.me>

On 26 July 2016 at 15:37, Alistair Francis <alistair23@gmail.com> wrote:
> Signed-off-by: Alistair Francis <alistair@alistair23.me>
> ---
>
>  hw/core/irq.c    | 44 ++++++++++++++++++++++++++++++++++++++++++++
>  include/hw/irq.h | 13 +++++++++++++
>  2 files changed, 57 insertions(+)
>
> diff --git a/hw/core/irq.c b/hw/core/irq.c
> index 49ff2e6..73b18b4 100644
> --- a/hw/core/irq.c
> +++ b/hw/core/irq.c
> @@ -27,6 +27,7 @@
>  #include "qom/object.h"
>
>  #define IRQ(obj) OBJECT_CHECK(struct IRQState, (obj), TYPE_IRQ)
> +#define OR_IRQ(obj) OBJECT_CHECK(struct OrIRQState, (obj), TYPE_OR_IRQ)
>
>  struct IRQState {
>      Object parent_obj;
> @@ -36,6 +37,15 @@ struct IRQState {
>      int n;
>  };
>
> +struct OrIRQState {
> +    Object parent_obj;
> +
> +    qemu_irq in_irq;
> +    qemu_irq *out_irqs;
> +    int *levels;

The data in the memory pointed to by 'levels' is state, and you
need to migrate it somehow. (Otherwise you'll give the wrong
results the next time an input changes following a migration.)

thanks
-- PMM

  reply	other threads:[~2016-07-26 15:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26 14:37 [Qemu-devel] [PATCH v5 0/8] Update the Netduino 2 Machine Alistair Francis
2016-07-26 14:37 ` [Qemu-devel] [PATCH v5 1/8] STM32F205: Remove the individual device variables Alistair Francis
2016-07-26 14:37 ` [Qemu-devel] [PATCH v5 2/8] STM32F2xx: Display PWM duty cycle from timer Alistair Francis
2016-07-26 14:37 ` [Qemu-devel] [PATCH v5 3/8] STM32F2xx: Add the ADC device Alistair Francis
2016-07-26 14:37 ` [Qemu-devel] [PATCH v5 4/8] STM32F2xx: Add the SPI device Alistair Francis
2016-07-26 14:37 ` [Qemu-devel] [PATCH v5 5/8] irq: Add a new irq device that allows the ORing of lines Alistair Francis
2016-07-26 15:00   ` Peter Maydell [this message]
2016-08-01  2:21     ` Alistair Francis
2016-08-01  7:38       ` Peter Maydell
2016-07-26 14:38 ` [Qemu-devel] [PATCH v5 8/8] MAINTAINERS: Add Alistair to the maintainers list Alistair Francis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFEAcA8CQ-MioE3Sc051XugNS5WFBAyQ0w3K9UkCURvRDYHuvw@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=alistair23@gmail.com \
    --cc=konstanty@ieee.org \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).