Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9523010ybi; Wed, 24 Jul 2019 05:39:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzhteQdn6OF+UfvZlGxJBpzbu7VT/joo/8pUl/T0btizH2DMTgYrNBVFDvR56aZslKNRRuw X-Received: by 2002:a65:584f:: with SMTP id s15mr64838065pgr.175.1563971954407; Wed, 24 Jul 2019 05:39:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563971954; cv=none; d=google.com; s=arc-20160816; b=vMctntjU1D1yvZ6de0Ec0tGSt9ZVSI/yAGRhShM1zbDLdq7tfNh3LfhOh/o84XB2v0 /Zj6tLBvk7BKJxP2HGv9C9vPnWVOTtubC+pvcLKxPVdKPz3DRnA7XDdrnf1Q0nw59E8j ilkW91ZWU57FltZndmY/vraJzDbs1KWC48lYiyEJYACZ3D5auv1QG1wWv0XnOfuCvBQ5 X9ncrsIjBfBKQ/6Sy6Bdhi7LJOa1gp+AxhINavysv46NQaU7UjKeRLAfF5SV8Yhi6w/1 YG1TTsivXAbw3XnqUtaa0yLHLlBqJ1/ciEYk25ZEcUi3yHSq1EZqdmtyc7RPCIKSM2xC OYug== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=rE4Db0mhABLuOWX3Ae7ZYda32EdWSXE1F/wQwWhiOd0=; b=HIpBMhPL1vRbvOBjDR5ApOXKTdrebYlmhfHNFxBQMgWJKAYw2+HwanJFnOo2AAxsZ8 YwKmEeDOZuEnKwuI2Gyd35yqaxmtdxPgE1ZraCa3sK7t4cFzFtmuOCB27r/7k0WItN9H jARt/QhCtMJ1Vjv5Va/kNCoaxWG59vjoAi3VBe45CrdXB/1p4qZSJKrcuE/f1omhwvAS DOW5tTHZ4hoVg4CH2MdRL6dbUgJfwbVPYU0/FJ/n5rZFGp8st5lN7ZpGsz4mmbco9Xc/ pHl5CYpJYzq4buk1aSYk0oJiphtOG9PGmq0gsSf6dT2jys5CnHCtZ7B8rCFfp4DkXzkC z9kw== 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 z26si14119095pgl.562.2019.07.24.05.38.58; Wed, 24 Jul 2019 05:39:14 -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 S1727211AbfGXKDR (ORCPT + 99 others); Wed, 24 Jul 2019 06:03:17 -0400 Received: from foss.arm.com ([217.140.110.172]:38126 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726070AbfGXKDQ (ORCPT ); Wed, 24 Jul 2019 06:03:16 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8EBAD337; Wed, 24 Jul 2019 03:03:15 -0700 (PDT) Received: from [10.1.197.57] (e110467-lin.cambridge.arm.com [10.1.197.57]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A29953F71F; Wed, 24 Jul 2019 03:03:13 -0700 (PDT) Subject: Re: [PATCH net-next 3/3] net: stmmac: Introducing support for Page Pool To: Jon Hunter , Jose Abreu , Lars Persson , Ilias Apalodimas Cc: Joao Pinto , Alexandre Torgue , Maxime Ripard , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , Chen-Yu Tsai , Maxime Coquelin , linux-tegra , Giuseppe Cavallaro , "David S . Miller" , "linux-arm-kernel@lists.infradead.org" References: <1b254bb7fc6044c5e6e2fdd9e00088d1d13a808b.1562149883.git.joabreu@synopsys.com> <29dcc161-f7c8-026e-c3cc-5adb04df128c@nvidia.com> <20190722101830.GA24948@apalos> <11557fe0-0cba-cb49-0fb6-ad24792d4a53@nvidia.com> <6c769226-bdd9-6fe0-b96b-5a0d800fed24@arm.com> <8756d681-e167-fe4a-c6f0-47ae2dcbb100@nvidia.com> <3255edfa-4465-204b-4751-8d40c8fb1382@arm.com> From: Robin Murphy Message-ID: Date: Wed, 24 Jul 2019 11:03:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/07/2019 22:39, Jon Hunter wrote: > > On 23/07/2019 14:19, Robin Murphy wrote: > > ... > >>>> Do you know if the SMMU interrupts are working correctly? If not, it's >>>> possible that an incorrect address or mapping direction could lead to >>>> the DMA transaction just being silently terminated without any fault >>>> indication, which generally presents as inexplicable weirdness (I've >>>> certainly seen that on another platform with the mix of an unsupported >>>> interrupt controller and an 'imperfect' ethernet driver). >>> >>> If I simply remove the iommu node for the ethernet controller, then I >>> see lots of ... >>> >>> [    6.296121] arm-smmu 12000000.iommu: Unexpected global fault, this >>> could be serious >>> [    6.296125] arm-smmu 12000000.iommu:         GFSR 0x00000002, >>> GFSYNR0 0x00000000, GFSYNR1 0x00000014, GFSYNR2 0x00000000 >>> >>> So I assume that this is triggering the SMMU interrupt correctly. >> >> According to tegra186.dtsi it appears you're using the MMU-500 combined >> interrupt, so if global faults are being delivered then context faults >> *should* also, but I'd be inclined to try a quick hack of the relevant >> stmmac_desc_ops::set_addr callback to write some bogus unmapped address >> just to make sure arm_smmu_context_fault() then screams as expected, and >> we're not missing anything else. > > I hacked the driver and forced the address to zero for a test and > in doing so I see ... > > [ 10.440072] arm-smmu 12000000.iommu: Unhandled context fault: fsr=0x402, iova=0x00000000, fsynr=0x1c0011, cbfrsynra=0x14, cb=0 > > So looks like the interrupts are working AFAICT. OK, that's good, thanks for confirming. Unfortunately that now leaves us with the challenge of figuring out how things are managing to go wrong *without* ever faulting... :) I wonder if we can provoke the failure on non-IOMMU platforms with "swiotlb=force" - I have a few boxes I could potentially test that on, but sadly forgot my plan to bring one with me this morning. Robin.