From patchwork Fri Jun 7 10:54:13 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: 13689685 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 DDE48C27C53 for ; Fri, 7 Jun 2024 10:58:33 +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: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:In-Reply-To:References: List-Owner; bh=JZHyN/RHQJJiaYOiFnQbngvUUfYDhUZRxB5SbxlXG0A=; b=QONahHtZD5ZDaV 7jEGZuCivLk3mJOe+A1X3WX455EdlodzooII41eYWL61/m1NPKGXDaN4UEhgSKVUteLmLypclHDPa aA9tE8lASJ9KtpA4IOXoH9N2oOdMI7eEHvl2kkUAMrZ4AnkSGI28IAflpzIxpZVDe5VZfUMBjyTn1 4evrFDSOYnhDO77c+5D+Mh9M2B+/79Sf0+bH2GZSLXYZ2xMfHyPBEIdXKLplFz6tCivWxAyrsdBZj skRNM2CHBJsmCWn8OqOhMMRREa4qfExYfJf2JqAeFEct/2yvmqUfbYlCMd/5tp41HGBaWlFYhpnBi SO38re6Ubu7ED06iH+9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFXIb-0000000DcVz-2Jl3; Fri, 07 Jun 2024 10:58:21 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFXIX-0000000DcTt-0RIv for linux-arm-kernel@lists.infradead.org; Fri, 07 Jun 2024 10:58:19 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4217136a74dso2727735e9.2 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=1717757893; x=1718362693; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=AGKUPLlaqu34zNkRMuwZus3nvKRpkYIBrcHRGCQDW/8=; b=ZL/Vhzq1uEF4kBonH1cPdtz869F8TT8IIjFaW5hn+BtgrTLfPl0MbXq/CRS9IxQVWb XidaCPYA7MithGkhcFiaz3GGs1Iqe/aIi18+nFfePjYKTEUNmAbIN0xVDStpAqdS1r2T 89729KpA7XTSOgcTEo/7agAczeZEHZfp8+CADTt5XkB11kx47UriPMSi8JQSpq2lJOkB faH4j25xdxqUO4XaG45VwxgnUL6O2DQzw0LOYZmWe5HfvNHESXyAWwdrjuD7E7Nv9tt5 ypzlU5wwnrysewL3sjmciQl/IZ27mBx3k+TakcPk1g2UpOaa4Bz6ex7VFTMFf5DsJB/O HCPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717757893; x=1718362693; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AGKUPLlaqu34zNkRMuwZus3nvKRpkYIBrcHRGCQDW/8=; b=mSP0soA+iNaPb/vgMCUMepZR6krzXxP9Ym0pyaV+JHlNuk3iAI4TnVF7Nod+0g4Rgd fkjRqVSAHXHt+0zyqCjho2YTPFDgEHVsjWdg5EEOAJohjVcglMkAJVe/BdOrTKSkhUCm sViwPzJ81dFZKPMcQr3z2/DN427PPtAE4OpmfRphoZWlZuD5Jxi5t9JdvD957u0wy1Ij YZvXU0XPLbuUqVcGR/5k0423j6A0dg8CSUZzsGc4gnu47p5hXp1qh3naBFsDgi25PsDx cY3zPe5Vlvwh6+ptyHR7R6PraJKHv9yWd1Gdu3Z6z5V5ZTe0feRJa35x2p0+ztiaNcLm O9rg== X-Forwarded-Encrypted: i=1; AJvYcCWl1CQTI80UNyi9TLlcB8zyaAVzwMj5hiDDdiXrR/aqUnDwpAgJDMX8ycx1vSP8+1+JIwwlrMjEt9AcilTpaAmgmwIBBLqsGNfNpMN+V8gJQjgCQ30= X-Gm-Message-State: AOJu0YxDQPHD7dv3tJsdzv3HLEbshS7CeXYT95PDUlYG+2tAtacs/ZGr gmhgLgdY2PK7jLwwUHh4vVy11kd+ZZ2eu3Wyzgekoc52f5Ae7x93j3T+65wHUs0= X-Google-Smtp-Source: AGHT+IEq05dxkoUz5lyUwdXJILrFcWqbbvwqZompyFbB5WoQMQiG2JPbouhAI/2QDSQs2s1tVNVLaA== X-Received: by 2002:a5d:4bd0:0:b0:35e:7dc9:49d5 with SMTP id ffacd0b85a97d-35efedf2a1emr1381990f8f.43.1717757892978; Fri, 07 Jun 2024 03:58:12 -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.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 03:58:12 -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 0/3] Enable PCIe ATS for devicetree boot Date: Fri, 7 Jun 2024 11:54:13 +0100 Message-ID: <20240607105415.2501934-2-jean-philippe@linaro.org> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240607_035817_355723_3184F328 X-CRM114-Status: UNSURE ( 9.55 ) 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 Before enabling Address Translation Support (ATS) in endpoints, the OS needs to confirm that the Root Complex supports it. Obtain this information from the firmware description since there is no architected method. ACPI provides a bit via IORT tables, so add the devicetree equivalent. Since v1 [1] I added the review and ack tags, thanks all. This should be ready to go via the IOMMU tree. [1] https://lore.kernel.org/all/20240429113938.192706-2-jean-philippe@linaro.org/ Jean-Philippe Brucker (3): dt-bindings: PCI: generic: Add ats-supported property iommu/of: Support ats-supported device-tree property arm64: dts: fvp: Enable PCIe ATS for Base RevC FVP .../devicetree/bindings/pci/host-generic-pci.yaml | 6 ++++++ drivers/iommu/of_iommu.c | 9 +++++++++ arch/arm64/boot/dts/arm/fvp-base-revc.dts | 1 + 3 files changed, 16 insertions(+)