Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5079451ybv; Tue, 11 Feb 2020 08:48:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwdAhG98P7terXPXdrxh6UeUA28/BX3MAB9vuXwCDgNBpTLeunQDq60tm2ldrFqULI9Ot8U X-Received: by 2002:aca:5248:: with SMTP id g69mr3326518oib.106.1581439695948; Tue, 11 Feb 2020 08:48:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581439695; cv=none; d=google.com; s=arc-20160816; b=yL2pEecALaJlag/TnBdEI+/os+DSu81nvMSQJSO/2NWsi5fQvG0y8KRkt7XepCx6/k piDXAKVn03YDycsBHtVc3Ket531idKJU+HnBICiGuSOmHec3PhaEtpLAiMhdIZifVdgt Fl6k9R+Iz7u0KewsAk2Scyf18NpF359Q/KpdoZOw0pXCnfDoIyGbpt/t0jd0I3FnwODs 6BSUFQ1zGcEgiWJtz/FH08KvXqw9YOC5gBTnROp2D2SayQUlVta7mLFMbNtOM5VqfjMO jLz+vZAs/Dat3deKPcFbhp/P3R9CH4eLrHiocEpHXemSDd5zJqkOTpVqGqWw+s3gHTNN 8Yfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=v+pLeKHNc80Td51F5FW28IMFZU66wu+UJlU6jTA+b20=; b=w/7fYW32CwYzakuNDk+2g+DmfGKFSRqRZ9fXyPdd3dMn9ed0Nv2R7SXH2Z3YsLHcfx iphgtAdmBd1wmBtaDvSnMle/FhZZbGpqdY4SEkWOsfQhmTRY1mEamMS4Xj94qPa/2nmj xK5YKWby+KBrcoiNtIg3cFJg0KgogomAfKHTdmHqUq5gUrXRSPZ+hVv1b2JjYQ1kOfnI gFGJU3qbNv/y46p6TYeavYFPiKFwfscUxspFpLbGA4HFaZDbog8HuH74Ofq0fh15ZbiH I6RpzmRl+2HjjXY8LHNyYYxsgnv4HjUfVnqZOLBTA/JTtMs3cC17j4z/108hUcvH3jrS U8LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lixom-net.20150623.gappssmtp.com header.s=20150623 header.b=y7YXlnma; 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 r1si2158462ota.259.2020.02.11.08.47.58; Tue, 11 Feb 2020 08:48:15 -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; dkim=pass header.i=@lixom-net.20150623.gappssmtp.com header.s=20150623 header.b=y7YXlnma; 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 S1730261AbgBKOsn (ORCPT + 99 others); Tue, 11 Feb 2020 09:48:43 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:41232 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729041AbgBKOsn (ORCPT ); Tue, 11 Feb 2020 09:48:43 -0500 Received: by mail-io1-f68.google.com with SMTP id m25so11997571ioo.8 for ; Tue, 11 Feb 2020 06:48:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lixom-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=v+pLeKHNc80Td51F5FW28IMFZU66wu+UJlU6jTA+b20=; b=y7YXlnma2BOJT3nhEPn9Qsz9bwFH4bvsgNaF09IFU6kIx/USIOMBqguQnWUcHKv3Vr iIMR4qekXeCU1c6vj5OUBoEwuBOU7fA/lPUXfD4NhkhKu26TcJegQZp3BQYIKSsHbCyD UFfbq9JnIieNNsfJTVOq2vQHuDY74ZU3t0PHrseD+5PH5yIk0BHS5lrGMNBiuWrnOpby v9/imyprT0WSefrIF1Ezi9+Mern+xeMocTygoKQhw2cWL46fgqetyoLoGBLKqgSpeVpk tyJ4sOfny8gP1MX71ywMIqCCF1toCDoesXqxm9fmEgeL+Nyn3UsodDpwR2p23aW+tqkL GOog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=v+pLeKHNc80Td51F5FW28IMFZU66wu+UJlU6jTA+b20=; b=T/Ljx+rqurUvR/0/RyqMF1FVGPhQ7WQt0xBd9WkyiJy2VI7MQMsH53ddLArT7lrBMu X1j9Lny2tu7ydeGk0gLsHEoP3ADWsxDfTaouYtEsVsTwPtvwMT1uV59YUK8siVurd5WS APfhU1LsaODqKMQPJ409fWcvNyE7Cld1sMoErEm0vOYi/ACSdrIuKzkn5k8r9k0gXAZO QjZpWSwQyH/l5jGRBWVPd4pD2jHsDbu4xSMyE/dKv6PwG9fIFrRpU1bY7pyrdhOSfcHT AjzDDh2op6rlBAMsVSmfQ6ivH4DcmfHlePHp473JWDGszhzoEHd9Lr+cuPo4aTcByDEz tu5Q== X-Gm-Message-State: APjAAAUzebtcJnLZo0Z6nZeiczUJUtgZS1WeU+KwDSHxs19ucuBz7uH5 i+6u1QpadalkzDJRU1AbaVot8dipnuSyeW06bRs+Cw== X-Received: by 2002:a02:7fd0:: with SMTP id r199mr15038510jac.126.1581432522140; Tue, 11 Feb 2020 06:48:42 -0800 (PST) MIME-Version: 1.0 References: <20191120034451.30102-1-Zhiqiang.Hou@nxp.com> <20200110153347.GA29372@e121166-lin.cambridge.arm.com> <20200210152257.GD25745@shell.armlinux.org.uk> In-Reply-To: From: Olof Johansson Date: Tue, 11 Feb 2020 06:48:30 -0800 Message-ID: Subject: Re: [PATCHv9 00/12] PCI: Recode Mobiveil driver and add PCIe Gen4 driver for NXP Layerscape SoCs To: Robin Murphy Cc: Laurentiu Tudor , Li Yang , "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" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 11, 2020 at 5:04 AM Robin Murphy wrote: > > 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) :) That's a real problem that nees a solution, but that's not what's happening here, since cold boots works fine. Isn't it a whole lot more likely that something isn't reset/reinitialized properly in u-boot, such that there is lingering state in the setup, causing this? > 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). This is more likely a live stream that's left behind from the previous kernel (there are some error messages about being unable to detach domains, but the errors make it hard to tell what driver didn't unbind enough). *BUT*, even with that bug, the system should reboot reliably and come up clean. So, something isn't clearing up the state *on boot*. > > 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. For the generic user, definitely. I'll give it a go later this week when I have a bit more spare time with the device physically present. -Olof