From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ILLp3-0000H5-Vo for qemu-devel@nongnu.org; Wed, 15 Aug 2007 12:34:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ILLp3-0000Gr-8v for qemu-devel@nongnu.org; Wed, 15 Aug 2007 12:34:17 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ILLp3-0000Go-4M for qemu-devel@nongnu.org; Wed, 15 Aug 2007 12:34:17 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ILLp2-00066q-LG for qemu-devel@nongnu.org; Wed, 15 Aug 2007 12:34:16 -0400 From: Paul Brook Date: Wed, 15 Aug 2007 17:34:09 +0100 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708151734.10040.paul@codesourcery.com> Subject: [Qemu-devel] Re: Extending qemu_irq for reset signals Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel On Wednesday 15 August 2007, Blue Swirl wrote: > Hi, > > I'd like to use similar mechanism as qemu_irq as reset signal for > devices. The difference is that the opaque data and callback are not > specified at the time of creating the signal at upstream device, but > when the receiving device is created. This does not fit current > qemu_irq model. Either your confused, or not expressing what you want very well. What you describe is how qemu_irq works. The "upstream device" and "receiving device" are the same thing. The whole point of qemu_irq is to be able to send a single-bit signal without having to know or care where it's going. ie. when creating the board/cpu, you create the qemu_irq object with appropriate parameters. Then the device initiating the reset uses that qemu_irq object. If the device initiating the reset needs to pass additional information, then you're no longer dealing with a single bit of state, so I don't think qemu_irq is really appropriate. Paul