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: 249117 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp1530274ilg; Fri, 4 Sep 2020 08:55:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhkN8jBL+e+YpwrF1NNr74hg1/vpqFkc+HSJR5BHLWPMebJRm4dLRwaXf4vGzAohB5mGn9 X-Received: by 2002:aa7:c98d:: with SMTP id c13mr9550739edt.199.1599234936629; Fri, 04 Sep 2020 08:55:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599234936; cv=none; d=google.com; s=arc-20160816; b=ecWabnKvr0/bEIfoUmujEVJjhFnpO+4XR8wEsMkqhIhfGd7PesUlHAZMzHXvNjRNQ5 ngUIv79hWE3EiOLLfZEhp3yjlmKqMmhqaqUaYKcIzj7EZonDAcLJzZkk82zRAFwuwMz9 71R8l3VOgpTuxYHVbW4N5ZDTyIaleVEF59+E5oqnwpDr2KGComb5Wj1zFNetYo5m8TF4 QPa63LNTXKBecCTJebHL2/5p+JHL4ZGiCORNoigBDqquB7SCPV3zU/gKtHtMUhQK7DKU PS4X/yMJN6LU3cqWD0QVtmKHiKP3NfdMiwyudmV0VaBR1FyPvKMciCdy0wS6dVHpCpGP Bt9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=4q/8n4d9Oz9Vv/K5aJK8Mp8Y2lRkWj0qSrttp/CroxE=; b=Gy7rpNqqoJzgyjTCK8MZDndDi7yTzWsNUKyNWCjUgTdT9FUDfPg4yo94Zvk6KdrKN4 glxK3/pxmAfdJU3dFkKxlAXKww3pIm/W23HUm6xh3x8kDKhS1nr95DeciYnHIBtzvvHK eOXbO7IKrQKhFd7XZGBoy6qw3yd+U/IrpRpA5qVGH+g2EOE4HAMUs+uIegV+/y+wqyhs HzVMQhPBKnix+UTnoK6bFBL1tf68NjWu434n2aMzoY1xyjYlGN3hAS5tdZ+AqkRc5Dzo 4KVVaIXidSK5kbuaRuVonJvSR6PYQg0+WzyQ3UgG2m5np/7gFoAzABN3Lf4NlsZwnEFC 4lyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oZadVWzK; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c33si1101845edf.530.2020.09.04.08.55.36; Fri, 04 Sep 2020 08:55:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oZadVWzK; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726726AbgIDPza (ORCPT + 15 others); Fri, 4 Sep 2020 11:55:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726655AbgIDPzR (ORCPT ); Fri, 4 Sep 2020 11:55:17 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4611C061247 for ; Fri, 4 Sep 2020 08:55:16 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id g72so6691252qke.8 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=WGjDZe6xaNnGhMKt39/KJl/0jnYcT5MZUudaQHucdE29Ngw+nmgW2Y9OGHx3TJy8VG bQS9EjEE3TCVnWT8U0FK7knbzDAyV7w19hAxA/O3dnqSYBOHk5HoGhttdWjpzrpAh2KJ Dvx1tv9ONpJ2MrVzqEfg1m0SlLOkEUC6FGtG9dmF2eLE91/SXVdzNfovNh90JOEHVPEH CDadcBlTVi45WyKSP5wyh3XnCOfS5CrgNGbGWDh4NAWR37WHq/3i1iXW4/F2JZ2izs1i NewZjFb9P/2WPvxSvScW/XO64awqw6/FjjDc3eGWEaNlN+bUlATOO6HVuk3fS2Fanr5j mNQA== X-Gm-Message-State: AOAM532Fc/kenFiophRmUbTdCuFOHfpQnQk7Gk72hTCg3KRdeU6WNfan jID2DDtaw0EAW0nTvQ5FVYZYj9980YTtrQ== 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 Cc: Sibi Sankar , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org 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 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.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(-) -- 2.28.0 Reviewed-by: Rob Clark Tested-by: Rob Clark Tested-by: John Stultz Tested-by: Amit Pundir Tested-by: Laurentiu Tudor