From patchwork Sun Jun 30 01:27:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 255808 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0EA2D2C02C3 for ; Sun, 30 Jun 2013 11:27:56 +1000 (EST) Received: from localhost ([::1]:42336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ut6Qj-0007TU-PH for incoming@patchwork.ozlabs.org; Sat, 29 Jun 2013 21:27:53 -0400 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 Received: from cantor2.suse.de ([195.135.220.15]:36573 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ut6Q7-0000zG-7T; Sat, 29 Jun 2013 21:27:15 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E79B3A5359; Sun, 30 Jun 2013 03:27:13 +0200 (CEST) From: Alexander Graf To: qemu-ppc@nongnu.org Date: Sun, 30 Jun 2013 03:27:03 +0200 Message-Id: <1372555629-17976-10-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1372555629-17976-1-git-send-email-agraf@suse.de> References: <1372555629-17976-1-git-send-email-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: Kevin Wolf , programmingkidx@gmail.com, mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 09/15] PPC: dbdma: Introduce kick function X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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