All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: "Damien Hedde" <damien.hedde@greensocs.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Luc Michel" <luc@lmichel.fr>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org, "Markus Armbruster" <armbru@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v2 1/2] hw/timer/etraxfs_timer: Convert to 3-phase reset (Resettable interface)
Date: Sun, 2 May 2021 17:04:16 +0200	[thread overview]
Message-ID: <7a08604f-5154-66e2-5bd4-b7aaf7908367@amsat.org> (raw)
In-Reply-To: <20210502062131.GB477672@toto>

Hi Edgar,

+Damien/Luc/Markus

On 5/2/21 8:21 AM, Edgar E. Iglesias wrote:
> On Sun, May 02, 2021 at 12:13:49AM +0200, Philippe Mathieu-Daudé wrote:
>> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>
>> TYPE_ETRAX_FS_TIMER is a sysbus device, so its DeviceClass::reset()
>> handler is called automatically when its qbus parent is reset
>> (we don't need to register it manually).
>>
>> Convert the generic reset to a enter/exit resettable ones, and
>> remove the qemu_register_reset() call.
> 
> Hi Philippe,
> 
> The interrupt should be updated in the reset_hold phase, otherwise
> interrupts stay asserted while the device is in reset.

OK. I took some time to understand in which handler the IRQ call had
to go, so I think to documentation is not clear enough:

 * @phases.hold: This phase is called for entry into reset, once every
object
 * in the system which is being reset has had its @phases.enter method
called.
 * At this point devices can do actions that affect other objects.
 *
 * @phases.exit: This phase is called when the object leaves the reset
state.
 * Actions affecting other objects are permitted.

Do you mind sending a patch to clarify? Personally I find listing what
can be done where easier to understand (explicit list) rather than
being generic and letting the developer choose.

> 
> Otherwise this looks good to me.
> 
> Cheers,
> Edgar


  reply	other threads:[~2021-05-02 15:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-01 22:13 [PATCH v2 0/2] hw: Convert mc146818rtc & etraxfs_timer to 3-phase reset interface Philippe Mathieu-Daudé
2021-05-01 22:13 ` [PATCH v2 1/2] hw/timer/etraxfs_timer: Convert to 3-phase reset (Resettable interface) Philippe Mathieu-Daudé
2021-05-02  6:21   ` Edgar E. Iglesias
2021-05-02 15:04     ` Philippe Mathieu-Daudé [this message]
2021-05-02  6:22   ` Edgar E. Iglesias
2021-05-01 22:13 ` [PATCH v2 2/2] hw/rtc/mc146818rtc: " Philippe Mathieu-Daudé

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=7a08604f-5154-66e2-5bd4-b7aaf7908367@amsat.org \
    --to=f4bug@amsat.org \
    --cc=armbru@redhat.com \
    --cc=damien.hedde@greensocs.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=laurent@vivier.eu \
    --cc=luc@lmichel.fr \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.