Received: from eggs.gnu.org ([2001:4830:134:3::10]:57145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ut6Q9-0007ML-KC for qemu-devel@nongnu.org; Sat, 29 Jun 2013 21:27:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ut6Q7-0000zq-EL for qemu-devel@nongnu.org; Sat, 29 Jun 2013 21:27:17 -0400 From: Alexander Graf Date: Sun, 30 Jun 2013 03:27:03 +0200 Message-Id: <1372555629-17976-10-git-send-email-agraf@suse.de> In-Reply-To: <1372555629-17976-1-git-send-email-agraf@suse.de> References: <1372555629-17976-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 09/15] 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 c2f15d8..6830a85 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