From patchwork Wed Nov 19 16:01:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 5339171 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8523B9F2ED for ; Wed, 19 Nov 2014 16:07:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 872CE201EF for ; Wed, 19 Nov 2014 16:07:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4FF7520176 for ; Wed, 19 Nov 2014 16:07:24 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xr7jR-0008I1-AP; Wed, 19 Nov 2014 16:03:49 +0000 Received: from mr002msb.fastweb.it ([85.18.95.86]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xr7hN-0005jJ-Td for linux-arm-kernel@lists.infradead.org; Wed, 19 Nov 2014 16:01:43 +0000 Received: from gaggiata.pivistrello.it (93.50.145.180) by mr002msb.fastweb.it (8.5.140.03) id 53CE787E07D2A08B; Wed, 19 Nov 2014 17:01:09 +0100 Received: from dev0.local (unknown [192.168.111.2]) by gaggiata.pivistrello.it (Postfix) with ESMTP id 6E0E8188CDB; Wed, 19 Nov 2014 17:01:09 +0100 (CET) Received: by dev0.local (Postfix, from userid 1000) id 0C59C620DB; Wed, 19 Nov 2014 17:01:09 +0100 (CET) Date: Wed, 19 Nov 2014 17:01:08 +0100 From: Francesco Dolcini To: Thomas Petazzoni Subject: Re: ARM: mvebu: ethernet packets corruption and I/O coherency Message-ID: <20141119160108.GJ24819@dev0.local> References: <20141118142520.GD24819@dev0.local> <20141118153035.757fe0fc@free-electrons.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20141118153035.757fe0fc@free-electrons.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141119_080142_291311_49107E02 X-CRM114-Status: GOOD ( 13.71 ) X-Spam-Score: -0.0 (/) Cc: Lior Amsalem , Andrew Lunn , Francesco Dolcini , Tawfik Bayouk , Nadav Haklai , Ezequiel Garcia , Gregory =?iso-8859-1?Q?Cl=E9ment?= , Sebastian Hesselbarth , linux-arm-kernel@lists.infradead.org, Jason Cooper X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Thomas and all On Tue, Nov 18, 2014 at 03:30:35PM +0100, Thomas Petazzoni wrote: > It could indeed be related. I have marked the relevant patches in the > "ARM: mvebu: no I/O coherency on non-SMP and related updates" series as > to be backported to stable up to v3.8, so when they get accepted, I'll > take care of backporting them. I prepared and tested this small patch to fix the problem on kernel 3.13.11 and it seems to fix my ethernet packet corruption problem. Do you think it is fine? Do you think that this bug on I/O cache coherency could also trigger some sporadic random OOPS and kernel panic? I got an OOPS with a broken LR in skb_segment() and a kernel panic in put_page(), but I was never able to reproduce any of them. Thanks, Francesco --- a/arch/arm/mach-mvebu/coherency.c +++ b/arch/arm/mach-mvebu/coherency.c @@ -124,6 +124,12 @@ { struct device_node *np; + if (!is_smp()) + { + pr_info("Coherency fabric disabled\n"); + return 0; + } + np = of_find_matching_node(NULL, of_coherency_table); if (np) { struct resource res; @@ -150,6 +156,9 @@ { struct device_node *np; + if (!is_smp()) + return 0; + np = of_find_matching_node(NULL, of_coherency_table); if (np) { bus_register_notifier(&platform_bus_type,