From patchwork Mon Apr 29 11:39:37 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: 13646681 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 BD767C25B10 for ; Mon, 29 Apr 2024 11:43:50 +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=xf5BPJHR9zjhfCFD+vSMSrP1Px5QVX+JQ/Q+MZewVEc=; b=IHyN4CMUApLnPQ gCfvNraMfMEGfzW4r6GMgLR3rU/ez4a4cfPilraXKDZJEl9oQ60uMWwI9dWp4zPo57eQJbUX3QQY/ 4y59A9p2yo2aiRAspP0xGmnd0BZCygChpq3spWpN6B4fYw274CREMOUwSAYnmd7YJjY05ssHYx2vy 225tD/J/8I2XJ+DHrWIKBPYaoSRoiZ5qTijSykEX4YEdUghBD0tJME/FS1rnU6AXEYTLNvz9ufAAV FGbgFcjr1pX0oHByaYel4mYtoOGAsbWnVFfe2VtvIirXK4LBZ8NAiWU3AKYfHAMZZKPiUpzyJamPI kckuvNbWXLvwylCbkDAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1PQ2-00000002VCM-1Lnm; Mon, 29 Apr 2024 11:43:38 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1PPd-00000002UzX-2LT2 for linux-arm-kernel@lists.infradead.org; Mon, 29 Apr 2024 11:43:15 +0000 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2db6f5977e1so50343011fa.2 for ; Mon, 29 Apr 2024 04:43:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714390988; x=1714995788; 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=4AHu2GrYMZd5nsIxhghrANJzfEVXRFCsK+/iWXt8RrI=; b=dSr3meNDjfd1XYzxzpli5gIJ74dQqjI6mOzSOzHtAu7sgkF8w1bxkq/FZoRp5iOWY3 A47EBvMlXkrV0Bp3emWoVPxK7Y3y+yh2CLdVtzv9pWJPQcYYAPNHfAXkewBp5qk1jxbe xMmB7Khy/SXWaHeRNAsRU5W7E8b/aP388HqhN+yt9AyZJSUYQn1/9o8/szh4nO+zL+Yk 1FsvNaTFO3uvoeLZBP5x9riZSWW0Y+5HA1z41QUWaJOxq5c9qeLelODn534oaDESfZ1+ yL7LAmnxnRuX3EwNXptP19rOMop09dSJI9vrMIxtmFH3+8nlTqw+ii2YYTYsdX7w8iXu GP+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714390988; x=1714995788; 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=4AHu2GrYMZd5nsIxhghrANJzfEVXRFCsK+/iWXt8RrI=; b=uVU3VSkEHblCom64EVdPxSrOGDEmWcUGvoHpMDLZ9kYC/BQZ/pMGH23BxsR4idaATU +MgLIrLEIvk8tYEFSqFVCYORUtXaiC6Mq6d31dlbRK+C0LFgz6HpPqp4RN/3TPgamkFP C+hX981U6eT101khmYAjWmY/Nb0L9z/3HKIl+UuPEMvVttGR16WvbscKca99huNBlwoo QTHc5pDaQ9u3LXM18PG4gValbENsK1CsbCPWCEY304nJVdizqOJnYtwEFbVOLdeY4Klg jSDPJMjZfFtHM5ILICdyUAw9+GWynji4aQfe6n7MOT0BZhvXPj860Su2FbyZqZ8oML6X wExw== X-Forwarded-Encrypted: i=1; AJvYcCU9IXnoaTt34mToYz8ImkRBiYNynnv36SfQEhHw7P784T7f+MCly3L+Kq0jsOBbYVObrch19kePUT0ExK4oA08F4dzcO389i+J6EJUHPpJm7Z//9dM= X-Gm-Message-State: AOJu0YxH5g99Ko7ScNvO50jjECum7Gh76Vt4f1MgKn6rKywP6Oc4ukf6 j95CK6uaiqtjNrrK/EQrKUzxyL1Kcj0CTY4l1+R27TvTH8b6pYnbYDDtuYu5JRU= X-Google-Smtp-Source: AGHT+IEM/SX8JWy3onOefygk1LTTCZaAW7PQ3Tj7tXR9aiLyU2Z/2Z/HvLOTcE/H0E6Xb96t5e5h8A== X-Received: by 2002:a2e:901a:0:b0:2d8:4169:3a58 with SMTP id h26-20020a2e901a000000b002d841693a58mr6273268ljg.41.1714390987975; Mon, 29 Apr 2024 04:43:07 -0700 (PDT) Received: from localhost.localdomain ([2.221.137.100]) by smtp.gmail.com with ESMTPSA id j28-20020a05600c1c1c00b0041bfb176a87sm7006611wms.27.2024.04.29.04.43.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 04:43:07 -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 1/3] dt-bindings: PCI: generic: Add ats-supported property Date: Mon, 29 Apr 2024 12:39:37 +0100 Message-ID: <20240429113938.192706-3-jean-philippe@linaro.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240429113938.192706-2-jean-philippe@linaro.org> References: <20240429113938.192706-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-20240429_044313_619672_66712E86 X-CRM114-Status: GOOD ( 10.96 ) 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. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Rob Herring Reviewed-by: Liviu Dudau --- From a while ago: https://lore.kernel.org/all/20200219222454.GA16221@bogus/ --- 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 d25423aa71674..94d4a4914a483 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 From patchwork Mon Apr 29 11:39:38 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: 13646678 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 A52E6C4345F for ; Mon, 29 Apr 2024 11:43:24 +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=btRB0avc4mV494hv8XdGc2Y1GYoW2fvvsua5/RxBiIc=; b=B6HjDVveUrSY6s C2oLbPqJa9k5g/WGM/w/7OB3VpAIjen6kMH92gBXKvCy5HwHiNHx2uUqTeFIBJSidFWeI7rOvx2T4 Cl+ThADxLGrDQJXTBbLczDAneGzB1QRF9BceOyCVpBL+0m2maJEhatMRhUVXlikuXC7yhzFG+INIG MMIjXe0gxzf4FOzjFnkDSyRJh0XHQWVmhL6Q0KltSkr2zy2MNQNS7n6T9xSUed+p52/Wn7NpCpWZd tfQXABll2r24UfQFkw+8cYje9tDMAFp1yHjH65xRyP9+NY+zPPX3HdIyuPNNkeLpx//5Mure+ae2p K6eUrzfQRSlPQl49omkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1PPe-00000002V0o-3CfM; Mon, 29 Apr 2024 11:43:14 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1PPa-00000002Uza-3rUa for linux-arm-kernel@lists.infradead.org; Mon, 29 Apr 2024 11:43:13 +0000 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2dd6c160eaaso53280441fa.1 for ; Mon, 29 Apr 2024 04:43:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714390989; x=1714995789; 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=+iobJUdKPnLVIb4EdGa85F44GNjBoMRFbMt/Rt6vNcE=; b=gvtchyX+q36DkUmRNOq5vk7SU3WbTKHyjbhJvUJLRhq5OFPfRtpioFnGbX35xw5Eal gYGPzu9kceQouXGvX43bsriQOEBW2DWpzmlxmrgVFtJCePWAMsujEb1FFbQi33k71Yp6 ZBYqfdrvhX8odwppUjqO3DLBOzZnFb38+/dBbBW2xYV6HiEfhriaxJXSAPRsBFA2VPIp 3FilCvyPN75ER9Z19cGT3KuBWpmEDV3pC9k/6T9Q8yi98OK9PFh56tYILxRh4V0fM3EN y2uZMjYDNZYjUNaqpkJ0p2nA+z6xajslchEaCrQxCApnLVOeNTsuGA4oPfSyaZ0D9WwM 8qyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714390989; x=1714995789; 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=+iobJUdKPnLVIb4EdGa85F44GNjBoMRFbMt/Rt6vNcE=; b=SYZgVCTmPD70NLuxxVm+N9/KPx5XugYsQ8DC0PZkcgt85RZTAOZDPK53ep6NQCLMwR D67xyeewXcucLMohgtIOSQSHANGESKebfYuu9BTpOFFiZqe92Q9V9O+axXvv0HP7jYYv rhScwDtOstpj/NZxAn5ZIyqyblzr2isJo/GZvBQw0pXrS9ZqaOrYvAn56U53a5Qq9xhX BgQMvw2sF2CJaGkg8k6Elw+TNq9cUqA7aNHTG7xMDIVFJx8MS2DSz4sosnbMeNUwD2hy LsAzzLWdZhZtwKcjQlnrtGWa0W5o6O+nk5d60PmSLhnUynl0OuWwoURQ0VdB8QoHOJfF zxUw== X-Forwarded-Encrypted: i=1; AJvYcCVkbr1eGpKL6AozVEbUyU3GOi0rzhEg7hYcZOw2PyFSmmsepYdSOFyiRpWjszRM/gaTgSL5CpsJ/L9ukwacqlWbgCc07p1EBnbb1BfAkjymCxAjnME= X-Gm-Message-State: AOJu0YweJoJfJL5HGKc4M5AroOd6zN1vjkb5YmXJn8CuwwnHezGBvXYa omlwh/hsLd/2Ra2FADFnhLkOYhJ9n/fFF+ALtZb4lz4cGrsz73W5AkhrdDdrDkI= X-Google-Smtp-Source: AGHT+IEq/BVzW1OsfvO81EUURO73iK1PlTqRjZgwsgNcExdaG/QA6hqLUNgRw7WtOV6ZCZAJNddz7g== X-Received: by 2002:a05:651c:1a13:b0:2df:7d44:d784 with SMTP id by19-20020a05651c1a1300b002df7d44d784mr8398632ljb.3.1714390988764; Mon, 29 Apr 2024 04:43:08 -0700 (PDT) Received: from localhost.localdomain ([2.221.137.100]) by smtp.gmail.com with ESMTPSA id j28-20020a05600c1c1c00b0041bfb176a87sm7006611wms.27.2024.04.29.04.43.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 04:43:08 -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 2/3] iommu/of: Support ats-supported device-tree property Date: Mon, 29 Apr 2024 12:39:38 +0100 Message-ID: <20240429113938.192706-4-jean-philippe@linaro.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240429113938.192706-2-jean-philippe@linaro.org> References: <20240429113938.192706-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-20240429_044310_983516_1929DDE9 X-CRM114-Status: GOOD ( 10.89 ) 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 Device-tree declares whether a PCI root-complex supports ATS by setting the "ats-supported" property. Copy this flag into device fwspec to let IOMMU drivers quickly check if they can enable ATS for a device. Signed-off-by: Jean-Philippe Brucker Tested-by: Ketan Patil Reviewed-by: Jason Gunthorpe Reviewed-by: Liviu Dudau Reviewed-by: Robin Murphy Reviewed-by: Nicolin Chen --- drivers/iommu/of_iommu.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c index 3afe0b48a48db..082b94c2b3291 100644 --- a/drivers/iommu/of_iommu.c +++ b/drivers/iommu/of_iommu.c @@ -105,6 +105,14 @@ static int of_iommu_configure_device(struct device_node *master_np, of_iommu_configure_dev(master_np, dev); } +static void of_pci_check_device_ats(struct device *dev, struct device_node *np) +{ + struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); + + if (fwspec && of_property_read_bool(np, "ats-supported")) + fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS; +} + /* * Returns: * 0 on success, an iommu was configured @@ -147,6 +155,7 @@ int of_iommu_configure(struct device *dev, struct device_node *master_np, pci_request_acs(); err = pci_for_each_dma_alias(to_pci_dev(dev), of_pci_iommu_init, &info); + of_pci_check_device_ats(dev, master_np); } else { err = of_iommu_configure_device(master_np, dev, id); } From patchwork Mon Apr 29 11:39:39 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: 13646680 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 A6BC5C4345F for ; Mon, 29 Apr 2024 11:43:48 +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=sd/7HN4/RJ2pc/sMLHN+lkjg/LdnjfZpz/MWZfs4a3k=; b=CyfPWo+H4lwsnE o18mk25At/EIzbZMqpqUljS++st/lDrPI9OCUAwGBl/VrfwSsKqkUg3f/W4p9MwIVMhRfOL8Ogtut Yf3x3TbnqnYVD6aTBPNYsWEj+LPGQwqCyV2vXFNP/RBDHgo7eVrZa7k4Vbs2UD6qfhPPWP81zafwJ Cud4MNdtIm+itS2z8+TZAL47BO+nftvLhHPP+fsZ4ugYYddITdDnYZSN+c5iKwzdk5syzuw1OPUFT YDIJ/tPCyb9D0O2uBIdj5+YJ0/p/IihxHCiEO+UUxM3hrPsZ/bMLto42Y8zg4bQ0eppUpZi4Ih5Jp 6C+hxQJrW6N/axpGyZ0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1PQ1-00000002VBv-0vGB; Mon, 29 Apr 2024 11:43:37 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1PPb-00000002Uzc-1snb for linux-arm-kernel@lists.infradead.org; Mon, 29 Apr 2024 11:43:15 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-41ba1ba55ffso14740915e9.1 for ; Mon, 29 Apr 2024 04:43:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714390989; x=1714995789; 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=i14vi0uS6yalE2yHHE98+WWyzuINERvn0mRjSQcogLE=; b=gn6U3aAS4dO3fyXZyF91Fu6oXlqqBAXQ+ssw8/zkP+nV4qiHwOePeQQYa6vIehTN0M AvdzTvKOnhC8qKeHlCT+z7QW6bm4J9BgKxC4wqb+HAh8eiaw2GpBT5b4a0GvM+swYtx1 C5Heh1TBZWweKIZJSVlKClpnYqUsJduTSjOMgwCan01/+f9ITVK5UnB6B5RubvcmhbBE u34KIdZ8OS5idmL9az4v5xMlNO1vRsLf4mogUOd6turHB1zTxH4X67c2XQuOeUcLY1YX MZpuB0PZZxrQRF7X1T2ul23DKHQ+oaFHHYdYb1pWn3es4aySD7lEaOKLBYysPHbGIKSY CwNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714390989; x=1714995789; 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=i14vi0uS6yalE2yHHE98+WWyzuINERvn0mRjSQcogLE=; b=DRKvWRu9ip7llbAm4yvf/slfi3JnNf5O0OflgKh4Ez40GpkqggxeHaW8sAbsKlNB7Q 7juxVjElc3AmUuJsSjEnDh+2q9XvbVumXEgpa+lYdklJoZYhux/8bO6GKIkvhU2l4rwr JBf2+D3jTO53S5E/S1TJgqmexDc26ov/OyvmIRLqOkElnxzJ9xh4EUGBINa+a/xd780P bUi7jw+iat+6I56RZmwZuqW4k5k2s47fXAJyIHAd2pv52FY3ZIN2qyaCxQO3TUpuzwUf lR2EXORJ0E2VShz9NlLASAChJ8lS96cMhiD3b+NCWHXx3y6wzyV4bNVASchuTY8nL8CC Ctsw== X-Forwarded-Encrypted: i=1; AJvYcCWNpErqhVCtSGMPXIBjBs3JWCKA5BzOBxcKfC01iyUt0WiL/1f6aW2bULMsaLUivfcVoHwrs2y0japHdzZjJ1+mhatUvwn/WPvJGsFpCh6jeFinLII= X-Gm-Message-State: AOJu0Ywwzt5/vEACLhEndc6/h6fG4eUmzEZOkK1KrCI8gkJri7PummF2 OfqWIsFPAAovkpPItGhpXghswRcIAL1gaCyYpbQuzgQptmDAoDgEZHM13S7+x4U= X-Google-Smtp-Source: AGHT+IEI1UVkZOMPYRMSz4HtjyDrrZTWNzj/RlriUs5QHmYdGK5xHJYWjf4nbA7zpSf33ACYcYdQ4A== X-Received: by 2002:a05:600c:3587:b0:41b:8c5c:31b9 with SMTP id p7-20020a05600c358700b0041b8c5c31b9mr7553097wmq.14.1714390989553; Mon, 29 Apr 2024 04:43:09 -0700 (PDT) Received: from localhost.localdomain ([2.221.137.100]) by smtp.gmail.com with ESMTPSA id j28-20020a05600c1c1c00b0041bfb176a87sm7006611wms.27.2024.04.29.04.43.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 04:43:09 -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 3/3] arm64: dts: fvp: Enable PCIe ATS for Base RevC FVP Date: Mon, 29 Apr 2024 12:39:39 +0100 Message-ID: <20240429113938.192706-5-jean-philippe@linaro.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240429113938.192706-2-jean-philippe@linaro.org> References: <20240429113938.192706-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-20240429_044311_522941_A73BB58D X-CRM114-Status: UNSURE ( 9.66 ) X-CRM114-Notice: Please train this message. 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 Declare that the host controller supports ATS, so the OS can enable it for ATS-capable PCIe endpoints. Signed-off-by: Jean-Philippe Brucker Acked-by: Sudeep Holla --- arch/arm64/boot/dts/arm/fvp-base-revc.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/arm/fvp-base-revc.dts b/arch/arm64/boot/dts/arm/fvp-base-revc.dts index 60472d65a3557..85f1c15cc65d0 100644 --- a/arch/arm64/boot/dts/arm/fvp-base-revc.dts +++ b/arch/arm64/boot/dts/arm/fvp-base-revc.dts @@ -243,6 +243,7 @@ pci: pci@40000000 { iommu-map = <0x0 &smmu 0x0 0x10000>; dma-coherent; + ats-supported; }; smmu: iommu@2b400000 {