From patchwork Fri Sep 4 15:55:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 11757947 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2374114EB for ; Fri, 4 Sep 2020 15:55:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EEF282074D for ; Fri, 4 Sep 2020 15:55:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EXZxtCSA"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="oZadVWzK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EEF282074D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=S/sLwRrcRJ4E7Vu1aeqNjbCy28qStbwnG6m+CC2628g=; b=EXZxtCSAFWhbD4KnH83PGbyZ7Z yYAK5kev72An8hc/u/RWTlhCIWwXfFPRFcYsCBDQll5OGjOtimuajt0d+9u42IzMkzl9TPMxeXuo+ 5EgaPQq0IIh65fkAux17XRKduQW4i1Fl0r+T5mG/Uo9+Q+2EL8y7iXj0X65ilvpa+rg7G+E0oabxF uqR1g0auc3wtjX24STMR2PY3H6RFe4rWRre2AwQnhRinq4gZW7cR28CIy9EL+vhxtsqwSXZFMN6P+ LeB9uz5ud8E6Yk3w1UOu9MKPDIArO/DrGaTcR9fHkjo7Wz9wfnWAvuHzKj2f7A58ZtZ6UG3osz7tX wWmGjWLQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEE3d-00013P-9t; Fri, 04 Sep 2020 15:55:21 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEE3Z-00011n-FK for linux-arm-kernel@lists.infradead.org; Fri, 04 Sep 2020 15:55:18 +0000 Received: by mail-qk1-x742.google.com with SMTP id w186so6761389qkd.1 for ; Fri, 04 Sep 2020 08:55:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4q/8n4d9Oz9Vv/K5aJK8Mp8Y2lRkWj0qSrttp/CroxE=; b=oZadVWzKzjT6kVlQDdSaTMxHoRTYYXuhfeHAqu6JmmOp3XCU0blzfKn1tJhWzX2HeS sK1QUgw4eOALlLrqiIa5mJ5RjG5DDMC/GfAoKvUlju9deCt1Z1cQt3mFi6Jp8dh8eAcL b47lB644qnhBgKdHPTa65f3vcbqa8pR/OGmGhW1uCRNIq0IP9XUGZp7dua1GTQzH7pbj 3kOSW84l/lOtcT1dCSPEMna3Qn0g0ssFDfacD5B1snlLor1iC7Zmm6UoHviENlQKr4s3 lC89jtyARRDB8fr0n/NnuYQLdQ/YywQuWqkj40BnJg+qClOjhyEKiVWTZ/r3SCq8UT/u +arA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4q/8n4d9Oz9Vv/K5aJK8Mp8Y2lRkWj0qSrttp/CroxE=; b=Kprmkc87BxRQ4k5FeeScS7bnnI4t5sCJVj7+Q+CFL0ST0x7CmmDSS/vsPb/Z9plR+a oigO71tLNU97uS9OB42iG/8NTNYE1e3TGyXMn09GNiFUL4BYCcpomTRZae3IMJ8qh5Rc 7uEJFvMWfKQqiUlFgRNT1xqWXVi0aPkK38KEYMLMFSaRZ6cPlPPJkcs2WedZPl5HBiSS EaIrmZi1/P7eKMe1p0Tqtx3pv4WhaGfbfUDWrYlvk5lJ0LgJ3jHNCUC5ja4WRXaQqHYt Mj8+lV/JkrfdPSw8h1uVe+UL0eqGhbBkCpwYZozAcnSXMQx65R/c/n87o4S06U6r3YHS 1cWg== X-Gm-Message-State: AOAM532FgHQmIjjZtuHTPTy/kZetiFi9Z6lJvC2o5PO7XXzbYdCAXnBL TocmnrSNLL2+XWKriL16YKHzow== X-Google-Smtp-Source: ABdhPJxHXnDF5Yz7KMj3dP1Wot9aBwDE24PK5PObq0P6DKGWMzJC3jbF9SemUpoG0/uTgsf96ikT4Q== X-Received: by 2002:a37:314:: with SMTP id 20mr8208333qkd.274.1599234915063; Fri, 04 Sep 2020 08:55:15 -0700 (PDT) Received: from localhost.localdomain (ec2-34-197-84-77.compute-1.amazonaws.com. [34.197.84.77]) by smtp.gmail.com with ESMTPSA id v18sm4724473qtq.15.2020.09.04.08.55.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2020 08:55:14 -0700 (PDT) From: Bjorn Andersson To: Will Deacon , Robin Murphy , Joerg Roedel , Bjorn Andersson , Sai Prakash Ranjan , Jordan Crouse , Rob Clark Subject: [PATCH v3 0/8] iommu/arm-smmu: Support maintaining bootloader mappings Date: Fri, 4 Sep 2020 15:55:05 +0000 Message-Id: <20200904155513.282067-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200904_115517_786775_B567EB55 X-CRM114-Status: GOOD ( 10.03 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:742 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, iommu@lists.linux-foundation.org, Sibi Sankar , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Based on previous attempts and discussions this is the latest attempt at inheriting stream mappings set up by the bootloader, for e.g. boot splash or efifb. Per Will's request this builds on the work by Jordan and Rob for the Adreno SMMU support. It applies cleanly ontop of v16 of their series, which can be found at https://lore.kernel.org/linux-arm-msm/20200901164707.2645413-1-robdclark@gmail.com/ Bjorn Andersson (8): iommu/arm-smmu: Refactor context bank allocation iommu/arm-smmu: Delay modifying domain during init iommu/arm-smmu: Consult context bank allocator for identify domains iommu/arm-smmu-qcom: Emulate bypass by using context banks iommu/arm-smmu-qcom: Consistently initialize stream mappings iommu/arm-smmu: Add impl hook for inherit boot mappings iommu/arm-smmu: Provide helper for allocating identity domain iommu/arm-smmu-qcom: Setup identity domain for boot mappings drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 111 ++++++++++++++++++- drivers/iommu/arm/arm-smmu/arm-smmu.c | 122 ++++++++++++++------- drivers/iommu/arm/arm-smmu/arm-smmu.h | 14 ++- 3 files changed, 205 insertions(+), 42 deletions(-) Reviewed-by: Rob Clark Tested-by: Rob Clark Tested-by: John Stultz Tested-by: Amit Pundir Tested-by: Laurentiu Tudor