Received: by 2002:a17:90a:9307:0:0:0:0 with SMTP id p7csp5158949pjo; Tue, 11 Feb 2020 05:05:32 -0800 (PST) X-Google-Smtp-Source: APXvYqxL/YOi3ySYSTsXqlFq3rvQKWhVvQT1kzb3QBMZG0amtN1z+Lx0zDGwYMiwbdNqecPcse+s X-Received: by 2002:aca:3542:: with SMTP id c63mr2779407oia.135.1581426332513; Tue, 11 Feb 2020 05:05:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581426332; cv=none; d=google.com; s=arc-20160816; b=ca1KC1VcXSxuiaxWL+lZSc2A9Nv+zYl96hp2y7pcAUzV/7/pWRHFlv/5YcZEDa/IgD jhSNZLrqR8K8YF1E6UsMNn2nT/sPt/KqQzq5cHj4FOTb+tPtGct+MeUGZkcN3xn2lLaj z2TW73w68sVUMGPGVs2897hcLhewY5ozPr9FpI8JS8L2YCGM62FdGwqHDqHk6PMmd+aL oSOFvfNKb9AT5heqP3Liy7ag8VhUSUi5yFH9Wn34+HP8grgAY0rUXFPnQ/x5WLLw0/18 cf57vQ2lr3WEHvqpzr6HDHVzbJnXaok8ZjLjO2BDw5T+TWf6Zg+K4kQ4s/whc+GoClMH pAag== 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=J9ZuGCBPcJDjI73c9tKGBEIi+HKT0W/Ziuk2qllMPNs=; b=TPEr8CCtAHE6mBfHR52Q5uIpXrdQZwv+60aLxOqMwHqoIT5I6Ce4dH8Ry6hPksx+Rq GL7AxW9GdC7+YvDv1MI95h/MaR6zScZ2kIZMqaq3sppGZZ+W0zyd/STzY9x1eVZazVxn 5evfxxPSlp9dRtxj+0i6u44bNU53tRG4hN03uFwV3HpqGTiML1/y+p+Q/ZLj1N4ZP1Nm dHkZ+Kdc90CarVxtVapzLXu5/ctcm2DdXRhjj/nk6/kktZM3zWeFZkgj+soaPuEIIR/1 S/Ipz30fGkTJVVRNL2EXmBKgSNXAyyzcSZIEb4Ez4UKAThvIdPYCKnsyi0q8174cXl6R SDvg== 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 z25si1874502oid.275.2020.02.11.05.05.08; Tue, 11 Feb 2020 05:05:32 -0800 (PST) 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 S1728881AbgBKNET (ORCPT + 99 others); Tue, 11 Feb 2020 08:04:19 -0500 Received: from foss.arm.com ([217.140.110.172]:45682 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728521AbgBKNET (ORCPT ); Tue, 11 Feb 2020 08:04:19 -0500 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 D941130E; Tue, 11 Feb 2020 05:04:18 -0800 (PST) Received: from [192.168.1.123] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 583D83F6CF; Tue, 11 Feb 2020 05:04:13 -0800 (PST) Subject: Re: [PATCHv9 00/12] PCI: Recode Mobiveil driver and add PCIe Gen4 driver for NXP Layerscape SoCs To: Laurentiu Tudor , Li Yang , Olof Johansson Cc: "mark.rutland@arm.com" , "devicetree@vger.kernel.org" , Lorenzo Pieralisi , "arnd@arndb.de" , "m.karthikeyan@mobiveil.co.in" , "linux-pci@vger.kernel.org" , "Z.q. Hou" , "l.subrahmanya@mobiveil.co.in" , "will.deacon@arm.com" , Russell King - ARM Linux admin , "linux-kernel@vger.kernel.org" , "M.h. Lian" , "robh+dt@kernel.org" , Xiaowei Bao , "catalin.marinas@arm.com" , "bhelgaas@google.com" , "andrew.murray@arm.com" , "shawnguo@kernel.org" , Mingkai Hu , "linux-arm-kernel@lists.infradead.org" References: <20191120034451.30102-1-Zhiqiang.Hou@nxp.com> <20200110153347.GA29372@e121166-lin.cambridge.arm.com> <20200210152257.GD25745@shell.armlinux.org.uk> From: Robin Murphy Message-ID: Date: Tue, 11 Feb 2020 13:04:14 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 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 2020-02-11 12:13 pm, Laurentiu Tudor wrote: [...] >> This is a known issue about DPAA2 MC bus not working well with SMMU >> based IO mapping.  Adding Laurentiu to the chain who has been looking >> into this issue. > > Yes, I'm closely following the issue. I actually have a workaround > (attached) but haven't submitted as it will probably raise a lot of > eyebrows. In the mean time I'm following some discussions [1][2][3] on > the iommu list which seem to try to tackle what appears to be a similar > issue but with framebuffers. My hope is that we will be able to leverage > whatever turns out. Indeed it's more general than framebuffers - in fact there was a specific requirement from the IORT side to accommodate network/storage controllers with in-memory firmware/configuration data/whatever set up by the bootloader that want to be handed off 'live' to Linux because the overhead of stopping and restarting them is impractical. Thus this DPAA2 setup is very much within scope of the desired solution, so please feel free to join in (particularly on the DT parts) :) As for right now, note that your patch would only be a partial mitigation to slightly reduce the fault window but not remove it entirely. To be robust the SMMU driver *has* to know about live streams before the first arm_smmu_reset() - hence the need for generic firmware bindings - so doing anything from the MC driver is already too late (and indeed the current iommu_request_dm_for_dev() mechanism is itself a microcosm of the same problem). > In the mean time, can you try the workaround Leo suggested? Agreed, I'd imagine the command-line option is probably the best choice for these platforms, since it's likely to be easier to set that by default in the bootloader than faff with rebuilding generic kernel configs. Robin. > [1] https://patchwork.kernel.org/patch/11327667/ > [2] https://patchwork.kernel.org/patch/10967729/ > [3] https://patchwork.kernel.org/cover/11279577/ > > --- > Best Regards, Laurentiu > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >