Message ID | 20230620095127.96600-1-angelogioacchino.delregno@collabora.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3549093vqr; Tue, 20 Jun 2023 03:00:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6uv1J173ApYwNJ8AdWMvgJ74pMoPTczeUdugFu+1Kd0745YyfPX8g6cZAZs3pRwqx6C2ww X-Received: by 2002:a05:6a20:8e03:b0:121:3f8:2889 with SMTP id y3-20020a056a208e0300b0012103f82889mr9957244pzj.23.1687255257596; Tue, 20 Jun 2023 03:00:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687255257; cv=none; d=google.com; s=arc-20160816; b=nLLt1iedtCj+RnX78SuD9gST7aCxyUbge+OQH+R9eWgCixmM7l0gSCl+BQQl6KBRwz pM59BzEYOg0FKM8OheAK9nTgr0ArlRPnUMEHKyu/TfHRMhGKClj5UJu1xSX9UVzA5jiN b9dG3RxHh9mVmD/Nd0CVAK6gPNRwcIIQ3llemCH916WzYJhF20TcrrEhAdk8NnH+Pe07 yhzxftUe4W4AYj6djLpqZjQ5IBfdyF+unX5r+33KBNtIqvFgoIs9WrCsYjPsf1fhylva rdD+A47f7hoHkw8ZgyG5ZAhl6BF7D0O35G956QZhD1RTwpfq28aIQ/hOKdtNi5W1IWs8 oSCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=bc4euXJOj2OjjVwv6+G3pQmvZwjiJXIFk3sWxS96P84=; b=V+izMIzxFuk6WWE7F1VekXwbi8dyAY55MFPASk9Qk4sGwbpcvmpAyzHUKaNR1ok687 cflhnxtO32XwLFIbUnIybahZhHUKo1WtieDtk5iiPPc9hx35JHSqCwkv9aHaZLEu/5xj O2U0c5FIn4i0vWvvS2rvQURMvanC3g1CcA9HKmI8uz/yXYaoMC/yZT+vns8N2R9rbNkB AOqbTUgqmI/fx3JdwBjEIuSb/cg8ozMk4CDWo/zaZhm+5+2X9zexiHtzGlfDsAD5a8Ri A1RLoQWLhGCNR4EUqiaWjVcYFLyfFSdpDoLjGfcjTTrQVn4wj8sPiEey8Y8C6T3k6HtR x8dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=BPG4e43B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q7-20020aa79607000000b006688540e3d7si1392172pfg.181.2023.06.20.03.00.43; Tue, 20 Jun 2023 03:00:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=BPG4e43B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232582AbjFTJxu (ORCPT <rfc822;duw91626@gmail.com> + 99 others); Tue, 20 Jun 2023 05:53:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232520AbjFTJxQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 20 Jun 2023 05:53:16 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32C9A2112; Tue, 20 Jun 2023 02:51:33 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (unknown [IPv6:2001:b07:2ed:14ed:c5f8:7372:f042:90a2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 004026602242; Tue, 20 Jun 2023 10:51:30 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1687254691; bh=uwyXNF91v6sGa/spbsQK7wgAPR7kXwSg3iM/Za/E/Xk=; h=From:To:Cc:Subject:Date:From; b=BPG4e43Bc1WYfvc9ppgzIf3ZLFkS/kDzOrzHj1Bb+188214CDobn964KQShkW99jc gw+qld4zJq4vDmwoM0ett2hIaLJtNR752pRFX8amyiwdp5vdfcnitygfeHhxguPmkg sQ/pGm1BZNWMqb/MhkGo82mfhsQutaZE9HzQjTtkd3nVuuesxQWWfNZGF92ibeupnp hhyT91I6tubjw9X2/113WaghEqrhKaDumwaDgTuShtsAj/9UP9i/C9HdBG0rbmkEdh Q2LKk+j5VxWWHKQU4+zLIS7TKW079pox5c0Cu+CIk5TZ+hCSQGgG52C2qZeTWgx4oY f6lHArq+I2p+Q== From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> To: agross@kernel.org Cc: andersson@kernel.org, konrad.dybcio@linaro.org, dmitry.baryshkov@linaro.org, joro@8bytes.org, will@kernel.org, robin.murphy@arm.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, robdclark@gmail.com, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, kernel@collabora.com Subject: [PATCH v4 0/6] Add support for Qualcomm's legacy IOMMU v2 Date: Tue, 20 Jun 2023 11:51:21 +0200 Message-Id: <20230620095127.96600-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769215368928777201?= X-GMAIL-MSGID: =?utf-8?q?1769215368928777201?= |
Series |
Add support for Qualcomm's legacy IOMMU v2
|
|
Message
AngeloGioacchino Del Regno
June 20, 2023, 9:51 a.m. UTC
This series adds support for handling "v2" firmware's IOMMU, found on at least MSM8956 and MSM8976 (some other SoCs also need the same but I honestly don't remember which ones precisely). This is strictly required to get functional IOMMUs on these SoCs. I'm sorry for not performing a much needed schema conversion on qcom,iommu.txt, but I really didn't have time to do that :-( This series was tested on Sony Xperia X and X Compact (MSM8956): ADSP, LPASS, Venus, MSS, MDP and GPU are happy :-) Changes in v4: - Rebase over next-20230619 - Rewrite qcom,iommu.txt changes to qcom,iommu.yaml - Changed reset writes to only disable CB through CB_SCTLR and reset CB_FSR and CB_FAR - Addressed misc reviewer's comments Changes in v3: - Removed useless FSRRESTORE reset and definition as pointed out in Robin Murphy's review - Fixed qcom,iommu.txt changes: squashed MSM8976 compatible string addition with msm-iommu-v2 generics addition Changes in v2: - Added back Marijn's notes (sorry man!) - Added ARM_SMMU_CB_FSRRESTORE definition - Changed context bank reset to properly set FSR and FSRRESTORE AngeloGioacchino Del Regno (6): dt-bindings: iommu: qcom,iommu: Add qcom,ctx-num property iommu/qcom: Use the asid read from device-tree if specified iommu/qcom: Disable and reset context bank before programming iommu/qcom: Index contexts by asid number to allow asid 0 dt-bindings: iommu: qcom,iommu: Add QSMMUv2 and MSM8976 compatibles iommu/qcom: Add support for QSMMUv2 and QSMMU-500 secured contexts .../devicetree/bindings/iommu/qcom,iommu.yaml | 22 +++++-- drivers/iommu/arm/arm-smmu/qcom_iommu.c | 62 ++++++++++++++----- 2 files changed, 64 insertions(+), 20 deletions(-)