qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] smc91x irq patch
Date: Wed, 19 Jul 2006 19:15:59 +0100	[thread overview]
Message-ID: <200607191916.00635.paul@codesourcery.com> (raw)
In-Reply-To: <44BE719A.2000708@bellard.org>

> > There's no point passing round both a pic callback and an object when we
> > can embed the callback in the object.
>
> I don't think that adding a callback is bad. It can be useful to use the
> device with another CPU or IRQ controller for example.

It means all the device emulation code has got to keep track of three bits of 
information rather than two, which seems silly when the callback and the 
object are inherently linked. I can't think of any cases where the callback 
is not be implied by the object.

> In fact, I would like to go further by adding a type such as
> "QEMUSignal" which could be used for IRQs or any other I/Os. Then you
> can pass it to devices. You can used qemu_signal_set(QEMUSignal *signal,
> int level) to set the level and add listeners to get notified on the
> changes with something like: qemu_add_signal_cb(QEMUSignal *signal, void
> (*cb)(void *opaque), void *opaque).

Extending the arm_pic code to work with all targets on my list of things to 
do.

Paul

      reply	other threads:[~2006-07-19 18:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-18 12:54 [Qemu-devel] Small note about qemu/target-sh4/op.c Pablo Virolainen
2006-07-18 17:03 ` [Qemu-devel] smc91x irq patch Thorsten Zitterell
2006-07-19  3:29   ` Paul Brook
2006-07-19 17:53     ` Fabrice Bellard
2006-07-19 18:15       ` Paul Brook [this message]

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=200607191916.00635.paul@codesourcery.com \
    --to=paul@codesourcery.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).