From patchwork Tue Mar 21 14:27:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 741569 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3vnZtG0nXTz9s7l for ; Wed, 22 Mar 2017 01:28:22 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id CD1C1C21D3C; Tue, 21 Mar 2017 14:28:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id C767AC21CA6; Tue, 21 Mar 2017 14:28:09 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E202BC21C38; Tue, 21 Mar 2017 14:28:07 +0000 (UTC) Received: from mx1.mailbox.org (mx1.mailbox.org [80.241.60.212]) by lists.denx.de (Postfix) with ESMTPS id 9C021C21C30 for ; Tue, 21 Mar 2017 14:28:07 +0000 (UTC) Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 2932745EA3; Tue, 21 Mar 2017 15:28:06 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id HkKIEmmmBSGY; Tue, 21 Mar 2017 15:28:04 +0100 (CET) From: Stefan Roese To: u-boot@lists.denx.de Date: Tue, 21 Mar 2017 15:27:23 +0100 Message-Id: <20170321142802.24276-3-sr@denx.de> In-Reply-To: <20170321142802.24276-1-sr@denx.de> References: <20170321142802.24276-1-sr@denx.de> Cc: Nadav Haklai , Stefan Chulski , Joe Hershberger , Thomas Petazzoni Subject: [U-Boot] [PATCH v1 02/41] net: mvpp2: Round up top tx buffer boundaries for dcache ops X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" check_cache_range() warns that the top boundaries are not properly aligned when flushing or invalidating the buffers and make these operations fail. This gets rid of the warnings: CACHE: Misaligned operation at range ... Signed-off-by: Stefan Roese Cc: Joe Hershberger Acked-by: Joe Hershberger --- drivers/net/mvpp2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c index 88e88b903b..93eb1f2dd4 100644 --- a/drivers/net/mvpp2.c +++ b/drivers/net/mvpp2.c @@ -3972,7 +3972,8 @@ static int mvpp2_send(struct udevice *dev, void *packet, int length) | MVPP2_TXD_F_DESC | MVPP2_TXD_L_DESC; /* Flush tx data */ - flush_dcache_range((u32)packet, (u32)packet + length); + flush_dcache_range((unsigned long)packet, + (unsigned long)packet + ALIGN(length, PKTALIGN)); /* Enable transmit */ mb();