Received: from eggs.gnu.org ([2001:4830:134:3::10]:53499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtRkf-0002fP-1n for qemu-devel@nongnu.org; Sun, 30 Jun 2013 20:13:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UtRka-0004a7-ND for qemu-devel@nongnu.org; Sun, 30 Jun 2013 20:13:52 -0400 From: Alexander Graf Date: Mon, 1 Jul 2013 02:13:34 +0200 Message-Id: <1372637622-50697-10-git-send-email-agraf@suse.de> In-Reply-To: <1372637622-50697-1-git-send-email-agraf@suse.de> References: <1372637622-50697-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 09/17] PPC: dbdma: Introduce kick function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-ppc@nongnu.org Cc: Kevin Wolf , programmingkidx@gmail.com, mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org The DBDMA engine really is running all the time, waiting for input. However we don't want to waste cycles constantly polling. So introduce a kick function that data providers can call to notify the DBDMA controller of new input. Signed-off-by: Alexander Graf --- hw/misc/macio/mac_dbdma.c | 5 +++++ include/hw/ppc/mac_dbdma.h | 1 + 2 files changed, 6 insertions(+) diff --git a/hw/misc/macio/mac_dbdma.c b/hw/misc/macio/mac_dbdma.c index eff3368..8434e90 100644 --- a/hw/misc/macio/mac_dbdma.c +++ b/hw/misc/macio/mac_dbdma.c @@ -536,6 +536,11 @@ static void DBDMA_run_bh(void *opaque) DBDMA_run(s); } +void DBDMA_kick(DBDMAState *dbdma) +{ + qemu_bh_schedule(dbdma_bh); +} + void DBDMA_register_channel(void *dbdma, int nchan, qemu_irq irq, DBDMA_rw rw, DBDMA_flush flush, void *opaque) diff --git a/include/hw/ppc/mac_dbdma.h b/include/hw/ppc/mac_dbdma.h index 90be5d9..aaeab10 100644 --- a/include/hw/ppc/mac_dbdma.h +++ b/include/hw/ppc/mac_dbdma.h @@ -161,6 +161,7 @@ typedef struct { void DBDMA_register_channel(void *dbdma, int nchan, qemu_irq irq, DBDMA_rw rw, DBDMA_flush flush, void *opaque); +void DBDMA_kick(DBDMAState *dbdma); void* DBDMA_init (MemoryRegion **dbdma_mem); #endif -- 1.8.1.4