From patchwork Wed Feb 26 18:02:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 25379 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A148B20636 for ; Wed, 26 Feb 2014 18:12:17 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id y20sf1876918ier.0 for ; Wed, 26 Feb 2014 10:12:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=c6fCZIwepKjobR+e2orwNnQlFfi2lRR/CA5vMkjKmJM=; b=JYRef7REfg9ODtHwe8basM+rc2Y0lV57ikOOnNPJNH9xf5JRR7YQVDVGRUCdsj3rEq DhCsd7Ez0UuZAwXdVTHkTb5KWL5ahRcOzpPPEfgCmifox8vfOe3FAbbIb9q+cdjAbPRW Gextm2Y1drzc6v5aF/jg9IG7k7S3cveKp3q3MPSJkoeB4AazFP58rOjqS1pTO2Vlp8a/ kjKZo+ptEPyoVmaFRebyAdVi25Wv06VR+0thdVo9CVOnnd8/lMrvZvaI4njN4CtBSc/K 7381vKNTNjRqEkuMpBJu9eexPN7zaPs2I4qww5SOPoIwvxbV++OSccXF1qa8wFwsXr8L 1cOA== X-Gm-Message-State: ALoCoQmryks6mebFVJxoaB5VjpKQd9Np/iasuIL8m3ZvSjr8i+uR0WOHNZo4Gt7IqBjZGJ298UNV X-Received: by 10.43.135.4 with SMTP id ie4mr331150icc.1.1393438337144; Wed, 26 Feb 2014 10:12:17 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.20.166 with SMTP id 35ls361831qgj.20.gmail; Wed, 26 Feb 2014 10:12:17 -0800 (PST) X-Received: by 10.58.123.70 with SMTP id ly6mr6878725veb.26.1393438336970; Wed, 26 Feb 2014 10:12:16 -0800 (PST) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id gq1si438918vec.23.2014.02.26.10.12.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Feb 2014 10:12:16 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id if11so1308217vcb.22 for ; Wed, 26 Feb 2014 10:12:16 -0800 (PST) X-Received: by 10.220.162.196 with SMTP id w4mr17943vcx.58.1393438336851; Wed, 26 Feb 2014 10:12:16 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp45040vcz; Wed, 26 Feb 2014 10:12:16 -0800 (PST) X-Received: by 10.140.48.165 with SMTP id o34mr1391919qga.16.1393438336346; Wed, 26 Feb 2014 10:12:16 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t6si468545qga.52.2014.02.26.10.12.16 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 26 Feb 2014 10:12:16 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:42220 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIixr-0004a1-SP for patch@linaro.org; Wed, 26 Feb 2014 13:12:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIiok-0000oI-Jo for qemu-devel@nongnu.org; Wed, 26 Feb 2014 13:02:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIiog-0007Ir-7x for qemu-devel@nongnu.org; Wed, 26 Feb 2014 13:02:50 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:46191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIiog-0007Eu-1t for qemu-devel@nongnu.org; Wed, 26 Feb 2014 13:02:46 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WIioY-0006E6-1p; Wed, 26 Feb 2014 18:02:38 +0000 From: Peter Maydell To: Anthony Liguori Date: Wed, 26 Feb 2014 18:02:34 +0000 Message-Id: <1393437755-23586-45-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1393437755-23586-1-git-send-email-peter.maydell@linaro.org> References: <1393437755-23586-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Blue Swirl , qemu-devel@nongnu.org, Aurelien Jarno Subject: [Qemu-devel] [PULL 44/45] dma/pl330: Fix buffer depth 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Peter Crosthwaite This is the product of the data-width and the depth arguments, I.e the depth of the FIFO is in terms of data entries and not bytes (which is what the original implementation was suggesting). Fix. Signed-off-by: Peter Crosthwaite Reviewed-by: Peter Maydell Message-id: c34de31031511538ccdb3164b48ee8a6a973ebd4.1393372019.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell --- hw/dma/pl330.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c index 303f8b8..b5d586b 100644 --- a/hw/dma/pl330.c +++ b/hw/dma/pl330.c @@ -1606,7 +1606,7 @@ static void pl330_realize(DeviceState *dev, Error **errp) pl330_queue_init(&s->read_queue, s->rd_q_dep, s); pl330_queue_init(&s->write_queue, s->wr_q_dep, s); - pl330_fifo_init(&s->fifo, s->data_buffer_dep); + pl330_fifo_init(&s->fifo, s->data_width / 4 * s->data_buffer_dep); } static Property pl330_properties[] = {