Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1534971ybg; Thu, 11 Jun 2020 12:19:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqijLnKe1o8z1oadUhdyZTqN84nFkIIGQDGgOVmAOcQxuEfzzJSBVVmqcwED6z9zvo3pnU X-Received: by 2002:a17:906:d961:: with SMTP id rp1mr10043351ejb.118.1591903184316; Thu, 11 Jun 2020 12:19:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591903184; cv=none; d=google.com; s=arc-20160816; b=OP0G1fPEJ804VOyjX++GWOU7AnCtC83QAl/PIB7prIi3dvFMdbnbRjKXkdOJbL0i1L UCntcRLqn5SywzJQtBG9i2j/QRXp0vEjzL2dKLnnJ9qV9ACqgyNONaAkq6WrQt73n1DZ kKbgQwaba6S/QohtsW8o3FkXap3aAHGKrV8r57FU6hSO8bt/Gde4+3Br0haUAFmIyZE2 YBV5iMDrjubIeODt1E0lMF3QNwkFngB6gn5JM5UuExnOSlo1i1quBE0z1/yvlwukx83k WPGV99Iu149y8gFhrbAOLn2zNHgQ2MMf00dilWZO0o6wITAJmxnCjlQe2ZML5+SSTwAP kz0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=6zaJypt3i9AfIsLfol7BJ0G7x/oVOQFl8LJlat5O9u0=; b=O+PibQvo4L6O2LH2qF/n9239luWQYlEpKAoeewiz3fVbT904ZadnyqZIDkSXJbslcq wF8zhG4IAo7pw1tKDYP8LNFLHQBwcbv1GZ+g4oteGB0sCEhqcLrdG+koSVFpri7ZIE0Z y9cUx7I/bdSiXMP0AbbISfwaCeBo4GEGDKKOCWc13GFhtMDKmxK3XCiMfP+vzRbzvsrV QFhAVPAkkm/oHAGxu88s+O2Q7O5y/WTy3S7794Gl0/rgt5rbS2da6slP5F4UEdlQ74zY G8BntQpQqQ+lwWPKxbGYrALQP35VQ/9SFuWksOvYaU3thYcHjiAewV3NBnFCXqiUgO/S W7fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MHg8Bpth; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si2127483edr.463.2020.06.11.12.19.21; Thu, 11 Jun 2020 12:19:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MHg8Bpth; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727004AbgFKRlm (ORCPT + 99 others); Thu, 11 Jun 2020 13:41:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:35620 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726109AbgFKRlm (ORCPT ); Thu, 11 Jun 2020 13:41:42 -0400 Received: from localhost (mobile-166-170-222-206.mycingular.net [166.170.222.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A2776207ED; Thu, 11 Jun 2020 17:41:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591897302; bh=iz9QsGoSr098XOHWPxiA9eVbf8DtfdYDY9GCFCnNGZk=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=MHg8BpthG7w9da0+oc9YVpTh5RRyTCfJZQSkIb54QE25CICX8PqSRWv3wl8J7nflH 4Ecyg6KpoPeiZJ6LZPpwignVqlqyeAki4VK392kedJNhJ5hFHw6LXzzBUTu2gIw6Xj qwf3oKzb33tp9qd8op+CkOLz9eKb6VLzTP4V0kLI= Date: Thu, 11 Jun 2020 12:41:40 -0500 From: Bjorn Helgaas To: Zhangfei Gao Cc: Bjorn Helgaas , Greg Kroah-Hartman , Arnd Bergmann , jean-philippe , kenneth-lee-2012@foxmail.com, Wangzhou , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Sinan Kaya Subject: Re: [RFC PATCH] PCI: Remove End-End TLP as PASID dependency Message-ID: <20200611174140.GA1597601@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1591762694-9131-1-git-send-email-zhangfei.gao@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [+cc Sinan] On Wed, Jun 10, 2020 at 12:18:14PM +0800, Zhangfei Gao wrote: > Some platform devices appear as PCI and have PCI cfg space, > but are actually on the AMBA bus. > They can support PASID via smmu stall feature, but does not > support tlp since they are not real pci devices. > So remove tlp as a PASID dependency. When you iterate on this, pay attention to things like: - Wrap paragraphs to 75 columns or so, so they fill the whole line but don't overflow when "git show" adds 4 spaces. - Leave a blank line between paragraphs. - Capitalize consistently: "SMMU", "PCI", "TLP". - Provide references to relevant spec sections, e.g., for the SMMU stall feature. > Signed-off-by: Zhangfei Gao > --- > drivers/pci/ats.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/pci/ats.c b/drivers/pci/ats.c > index 390e92f..8e31278 100644 > --- a/drivers/pci/ats.c > +++ b/drivers/pci/ats.c > @@ -344,9 +344,6 @@ int pci_enable_pasid(struct pci_dev *pdev, int features) > if (WARN_ON(pdev->pasid_enabled)) > return -EBUSY; > > - if (!pdev->eetlp_prefix_path) > - return -EINVAL; No. This would mean we might enable PASID on actual PCIe devices when it is not safe to do so, as Jean-Philippe pointed out. You cannot break actual PCIe devices just to make your non-PCIe device work. These devices do not support PASID as defined in the PCIe spec. They might support something *like* PASID, and you might be able to make parts of the PCI core work with them, but you're going to have to deal with the parts that don't follow the PCIe spec on your own. That might be quirks, it might be some sort of AMBA adaptation shim, I don't know. But it's not the responsibility of the PCI core to adapt to them. > if (!pasid) > return -EINVAL; > > -- > 2.7.4 >