Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp618446imm; Sat, 7 Jul 2018 04:56:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdMXqIhkXxXksxhuBoOCiK0fRyug60zyZZ/UwSyFNSz4vTjeg7HOlabp+3qB0JNG8AOWzlj X-Received: by 2002:a65:450a:: with SMTP id n10-v6mr12079614pgq.392.1530964582613; Sat, 07 Jul 2018 04:56:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530964582; cv=none; d=google.com; s=arc-20160816; b=n07Icm0aBmQVKOFcGuKRSG5Nm0Vms58XUMCU93QY/wfnUedrtW/A7iJWij+MwMPBU0 aFW8D6Q/YEN12uz7DE0q+6Bm1kXo9I42Qr5DOOH3Gm0zpX8oVTbgQs+tVvBpOocSUpua 2Wt8StOF2OP5qEBd3U64LoYd0IGu144AuAGaDWmwj9eOXg62T8Flgy4BjPmkfbY++byI dqAU9PsNhtSAyEr2LA6H173NwrqJg5A/Q+XIU/isOujwkIH+qefuoB4WLPkAZGZIpq7k bFbXZ5jHJ+bfmB1Iqviumd6iA41mi3+qGBSBDQITohGFgpNwfk2I4o6xbtiwbrvdIckk mP7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=gCmi1guH+mCSuXk0UiPhlc4hK3s3v19lgmxR2jDZ0Mc=; b=A5yHnVGLYz5fNORfJt1JsupaVlEWkUxZxG1osa4SeC9Yzkwa1gRXNPv4C18R3hAma8 dG2ec+KDQaW882iWqLTdV42TU4wY/d4P4ei9tibzDVpCI18iNj/C3b1Y5cM3QyFD8swU nADGQ9ZXV1qom4z/JdIf40OzrND/9t1SLgyLPtARWjIm0RW5CjWZRYgOOBDLhqfUAJ0L h4pS/GTSC4NKoGiKgYTt4FzbvB5FXuZejdU8OUa8Y41R6AfqHHvrlet+viaUf7mCPMSX 8GIdOP1lXYmERX0Rd3RLmrjfvlmNZ7XeA6PlJ98KejEqpzd5HQquHhtwmXe1WSLe4y/m eOuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b8-v6si10015073plr.156.2018.07.07.04.56.08; Sat, 07 Jul 2018 04:56:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932782AbeGGLz0 (ORCPT + 99 others); Sat, 7 Jul 2018 07:55:26 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:52174 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753687AbeGGLzZ (ORCPT ); Sat, 7 Jul 2018 07:55:25 -0400 Received: from localhost (unknown [211.196.191.92]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 589E912107593; Sat, 7 Jul 2018 04:55:23 -0700 (PDT) Date: Sat, 07 Jul 2018 20:55:21 +0900 (KST) Message-Id: <20180707.205521.189537026947491605.davem@davemloft.net> To: harini.katakam@xilinx.com Cc: nicolas.ferre@microchip.com, claudiu.beznea@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, harinikatakamlinux@gmail.com Subject: Re: [PATCH v2 2/2] net: macb: Allocate valid memory for TX and RX BD prefetch From: David Miller In-Reply-To: <1530859738-11802-2-git-send-email-harini.katakam@xilinx.com> References: <1530859738-11802-1-git-send-email-harini.katakam@xilinx.com> <1530859738-11802-2-git-send-email-harini.katakam@xilinx.com> X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sat, 07 Jul 2018 04:55:25 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Harini Katakam Date: Fri, 6 Jul 2018 12:18:58 +0530 > GEM version in ZynqMP and most versions greater than r1p07 supports > TX and RX BD prefetch. The number of BDs that can be prefetched is a > HW configurable parameter. For ZynqMP, this parameter is 4. > > When GEM DMA is accessing the last BD in the ring, even before the > BD is processed and the WRAP bit is noticed, it will have prefetched > BDs outside the BD ring. These will not be processed but it is > necessary to have accessible memory after the last BD. Especially > in cases where SMMU is used, memory locations immediately after the > last BD may not have translation tables triggering HRESP errors. Hence > always allocate extra BDs to accommodate for prefetch. > The value of tx/rx bd prefetch for any given SoC version is: > 2 ^ (corresponding field in design config 10 register). > (value of this field >= 1) > > Added a capability flag so that older IP versions that do not have > DCFG10 or this prefetch capability are not affected. > > Signed-off-by: Harini Katakam > Reviewed-by: Claudiu Beznea Applied.