From patchwork Fri Jun 7 10:54:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 13689686 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EF1B1C27C5F for ; Fri, 7 Jun 2024 10:58:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hPswh3XwliozN8qbGcnwNGFAxvoRzi1fIOCRpwzNfm0=; b=Z3MKMdNbkRJ9Y6 hxXqLv0lt2sv6roKNeLEtCnBD3nByyfGL3k+i9W1/1l1CtxOSJn3HeCfdInitZh56a1dvGzD7Z1vQ +zDh1u/HHiZnvfuQ0QlXkN1Y0roRmATlnXz0sMThsS++H/TNMOM6apBmlYGcMMYNDgiH9kyacMXRh fvW2hiFbEHflDb7FQxNEAuRZvUg0QohXAmnbW/FWdHvKWHua8gluTq+wDSCZMebjdVgunxBKww8r3 bMmtujvX5n7JAgliZy74+/keyS80NzA+3EeyYoRFF3RSw3koVmassgZatqveZv6kgxcbnzOXSieHf FeWSpReRezn78Mkve+2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFXIa-0000000DcVQ-1l3E; Fri, 07 Jun 2024 10:58:20 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFXIX-0000000DcTz-2KBx for linux-arm-kernel@lists.infradead.org; Fri, 07 Jun 2024 10:58:19 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4210aa012e5so21061045e9.0 for ; Fri, 07 Jun 2024 03:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717757894; x=1718362694; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E23ckA0xadlytKJal2qSBXEtmljMi1zr8ZXYYtdmN4A=; b=FEF5M9mgtPyEbzImxU11eXFnxuhJRGDx7InGoTi4Dh8hsJaATtw/SD2aD34T7QzO0k 3YA+27utl5Va7VfJG8RDDrVBeWHkIz0R86V/8L5MB7+n7SDtWGdqJdbv9hLpBQI7Tyr9 pAe8rUfWJXcn8pykMTxnY9ArAmmpkAiHTAneNgRfjtCGyPXq7NVS5BUGdnsZddFPOCak urbrp7Mpa7Ajbng942i9ywvDPQIZ/bBVKdHyWFor+ZM730eFWeldV629tZJXNMKwhomj WC7Zbe51jkEsXmG9yQiE5Slv0BNI3Gl1B2TbzNSC/ETT50lvPSPIo0LvJHRy223WQAWg 45xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717757894; x=1718362694; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E23ckA0xadlytKJal2qSBXEtmljMi1zr8ZXYYtdmN4A=; b=GO7OJ3h1AEoh0RhONPM55xTdpfSFTBjXgYxxKP91fuq7tOxsO6+TpjWXA+vuqi/nEH MzxwejDLh02r+YVJ75KhnUqRf29wy48X9sYNql2LSEY+jLZdHvFnN24GBin1350sW04r p0ezkTr3n7V//TyzJN5ip8WEAUT5V5oHMg22Hffqe9w0VX6AaOJRRA9a0UkoEwEgajfL 3dalBYOG6JtI3aeI+kqxsni9EsZ63MpViI6fHsponGU21JhXVHSSIRFjom9v5KZVNJQK EB5feQOssNdBdCYWPgcegOpFSJd7kPo/9mZNd5IXrf50hA2Vv2GyAjJ3eF6tzrjgWEVI 26lg== X-Forwarded-Encrypted: i=1; AJvYcCVK/Tb0ybjK9ZnGyXFJpdt/ERivGxUZUSG1qyGnGrWnfjYIafZc600qUEGQQoUk1/TPb2U4vzY8qYeYUHsKjs4SxnHkYWyWhTwZy7AMrFOafuNRGUc= X-Gm-Message-State: AOJu0YwRN5HRSshPsnNGMVqypv6Hdjfs64NOe68Rx+YNgc59xvoS/9nJ l9dpBeLa65C3Glzn3FvNpP3rYKfG9hhCUaxiJlcQQhEBIWVGZaFGaaBg7alUwhg= X-Google-Smtp-Source: AGHT+IGRk39n3pVihAfcUidolbx9s1isjujkvF2fjkdGKFvNrj6NpUKCDBYYeIDpXOQ0xz5Q/dJp6A== X-Received: by 2002:a05:600c:1d03:b0:421:54f7:c294 with SMTP id 5b1f17b1804b1-42164a20c82mr19745275e9.29.1717757893769; Fri, 07 Jun 2024 03:58:13 -0700 (PDT) Received: from localhost.localdomain ([2.221.137.100]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35ef5fd1c5fsm3739485f8f.113.2024.06.07.03.58.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 03:58:13 -0700 (PDT) From: Jean-Philippe Brucker To: will@kernel.org, lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzk+dt@kernel.org, conor+dt@kernel.org, liviu.dudau@arm.com, sudeep.holla@arm.com, joro@8bytes.org Cc: robin.murphy@arm.com, nicolinc@nvidia.com, ketanp@nvidia.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Jean-Philippe Brucker Subject: [PATCH v2 1/3] dt-bindings: PCI: generic: Add ats-supported property Date: Fri, 7 Jun 2024 11:54:14 +0100 Message-ID: <20240607105415.2501934-3-jean-philippe@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240607105415.2501934-2-jean-philippe@linaro.org> References: <20240607105415.2501934-2-jean-philippe@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240607_035817_832415_C6B1CC22 X-CRM114-Status: GOOD ( 11.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a way for firmware to tell the OS that ATS is supported by the PCI root complex. An endpoint with ATS enabled may send Translation Requests and Translated Memory Requests, which look just like Normal Memory Requests with a non-zero AT field. So a root controller that ignores the AT field may simply forward the request to the IOMMU as a Normal Memory Request, which could end badly. In any case, the endpoint will be unusable. The ats-supported property allows the OS to only enable ATS in endpoints if the root controller can handle ATS requests. Only add the property to pcie-host-ecam-generic for the moment. For non-generic root controllers, availability of ATS can be inferred from the compatible string. Reviewed-by: Rob Herring Reviewed-by: Liviu Dudau Signed-off-by: Jean-Philippe Brucker --- Documentation/devicetree/bindings/pci/host-generic-pci.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/host-generic-pci.yaml b/Documentation/devicetree/bindings/pci/host-generic-pci.yaml index 3484e0b4b412e..bcfbaf5582cc9 100644 --- a/Documentation/devicetree/bindings/pci/host-generic-pci.yaml +++ b/Documentation/devicetree/bindings/pci/host-generic-pci.yaml @@ -110,6 +110,12 @@ properties: iommu-map-mask: true msi-parent: true + ats-supported: + description: + Indicates that a PCIe host controller supports ATS, and can handle Memory + Requests with Address Type (AT). + type: boolean + required: - compatible - reg