qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, "Gerd Hoffmann" <kraxel@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Daniel Henrique Barboza" <danielhb413@gmail.com>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	qemu-ppc@nongnu.org
Subject: Re: [PATCH for-8.0 6/7] hw/intc/xics: Convert TYPE_ICS to 3-phase reset
Date: Fri, 25 Nov 2022 14:48:23 +0100	[thread overview]
Message-ID: <20221125144823.4ab5f378@bahia> (raw)
In-Reply-To: <20221125115240.3005559-7-peter.maydell@linaro.org>

On Fri, 25 Nov 2022 11:52:39 +0000
Peter Maydell <peter.maydell@linaro.org> wrote:

> Convert the TYPE_ICS class to 3-phase reset; this will allow us
> to convert the TYPE_PHB3_MSI class which inherits from it.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---

Reviewed-by: Greg Kurz <groug@kaod.org>

>  hw/intc/xics.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/intc/xics.c b/hw/intc/xics.c
> index dd130467ccc..c7f8abd71e4 100644
> --- a/hw/intc/xics.c
> +++ b/hw/intc/xics.c
> @@ -564,9 +564,9 @@ static void ics_reset_irq(ICSIRQState *irq)
>      irq->saved_priority = 0xff;
>  }
>  
> -static void ics_reset(DeviceState *dev)
> +static void ics_reset_hold(Object *obj)
>  {
> -    ICSState *ics = ICS(dev);
> +    ICSState *ics = ICS(obj);
>      g_autofree uint8_t *flags = g_malloc(ics->nr_irqs);
>      int i;
>  
> @@ -584,7 +584,7 @@ static void ics_reset(DeviceState *dev)
>      if (kvm_irqchip_in_kernel()) {
>          Error *local_err = NULL;
>  
> -        ics_set_kvm_state(ICS(dev), &local_err);
> +        ics_set_kvm_state(ics, &local_err);


>          if (local_err) {
>              error_report_err(local_err);
>          }
> @@ -688,16 +688,17 @@ static Property ics_properties[] = {
>  static void ics_class_init(ObjectClass *klass, void *data)
>  {
>      DeviceClass *dc = DEVICE_CLASS(klass);
> +    ResettableClass *rc = RESETTABLE_CLASS(klass);
>  
>      dc->realize = ics_realize;
>      device_class_set_props(dc, ics_properties);
> -    dc->reset = ics_reset;
>      dc->vmsd = &vmstate_ics;
>      /*
>       * Reason: part of XICS interrupt controller, needs to be wired up,
>       * e.g. by spapr_irq_init().
>       */
>      dc->user_creatable = false;
> +    rc->phases.hold = ics_reset_hold;
>  }
>  
>  static const TypeInfo ics_info = {



  parent reply	other threads:[~2022-11-25 13:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-25 11:52 [PATCH for-8.0 0/7] virtio, pci, xics: 3-phase reset conversions Peter Maydell
2022-11-25 11:52 ` [PATCH for-8.0 1/7] hw/virtio: Convert TYPE_VIRTIO_PCI to 3-phase reset Peter Maydell
2022-11-25 13:30   ` Philippe Mathieu-Daudé
2022-11-25 11:52 ` [PATCH for-8.0 2/7] hw/display/virtio-vga: Convert TYPE_VIRTIO_VGA_BASE " Peter Maydell
2022-11-30 10:46   ` Philippe Mathieu-Daudé
2022-11-25 11:52 ` [PATCH for-8.0 3/7] pci: Convert TYPE_PCIE_ROOT_PORT " Peter Maydell
2022-11-30 10:18   ` Philippe Mathieu-Daudé
2022-11-25 11:52 ` [PATCH for-8.0 4/7] pci: Convert child classes of " Peter Maydell
2022-11-30 10:45   ` Philippe Mathieu-Daudé
2022-11-25 11:52 ` [PATCH for-8.0 5/7] hw/intc/xics: Reset TYPE_ICS objects with device_cold_reset() Peter Maydell
2022-11-25 12:24   ` Cédric Le Goater
2022-11-25 13:45     ` Greg Kurz
2022-11-30 10:21       ` Philippe Mathieu-Daudé
2022-11-25 11:52 ` [PATCH for-8.0 6/7] hw/intc/xics: Convert TYPE_ICS to 3-phase reset Peter Maydell
2022-11-25 12:25   ` Cédric Le Goater
2022-11-25 13:48   ` Greg Kurz [this message]
2022-11-30 10:22   ` Philippe Mathieu-Daudé
2022-11-25 11:52 ` [PATCH for-8.0 7/7] hw/pci-host/pnv_phb3_msi: Convert TYPE_PHB3_MSI " Peter Maydell
2022-11-25 12:25   ` Cédric Le Goater
2022-11-30 10:23   ` Philippe Mathieu-Daudé
2022-11-30 12:20 ` [PATCH for-8.0 0/7] virtio, pci, xics: 3-phase reset conversions Daniel Henrique Barboza
2022-12-16 16:02 ` Peter Maydell

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=20221125144823.4ab5f378@bahia \
    --to=groug@kaod.org \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).