From patchwork Mon Oct 19 18:23:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 292372 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16CA9C433DF for ; Mon, 19 Oct 2020 18:22:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B92E7223B0 for ; Mon, 19 Oct 2020 18:22:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zs9NWLNI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730454AbgJSSWr (ORCPT ); Mon, 19 Oct 2020 14:22:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730464AbgJSSWr (ORCPT ); Mon, 19 Oct 2020 14:22:47 -0400 Received: from mail-oo1-xc43.google.com (mail-oo1-xc43.google.com [IPv6:2607:f8b0:4864:20::c43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88582C0613CE for ; Mon, 19 Oct 2020 11:22:45 -0700 (PDT) Received: by mail-oo1-xc43.google.com with SMTP id v123so98865ooa.5 for ; Mon, 19 Oct 2020 11:22:45 -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=VpsiELiguu+j+d75TlHy7UatTKslEhtvU0VNkiyQTHE=; b=zs9NWLNI035QlA/VBI7c1W2y029/5QTx9et8nFbd2vTWzWmoW13w6gut5QKiSLyOcv /iVj0TrBKUDnDE5OOK6vn+u60m6BrHtX1IRsXHLSviusPu5cfGfTElzcPftNUTIyqb+5 E+su2boKZjvNwFFmNS8aqEDOo0Jjbtg1gtVyM2FL7Ms+J9RzDLhxfGSWfp834QlaIY1m ijmyO8/Y7KSAJINJ4woLIJF1CDp4YRJ16sEY7erjyyciGpT1sF22495HxPKYwvnZZs7I +KkR94uCA3tX2dGV2S1EAS/MB6Zq605p5Z8vOgZ8QAa8Vw1VqM/BsgZyAnHlOwoamCvs nngg== 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=VpsiELiguu+j+d75TlHy7UatTKslEhtvU0VNkiyQTHE=; b=Mspz/jyzp/OkG/Abgp8y6eejlN6jiO2GGuS7dhVcyEKqQrs6xbQicCQSyiWswhfDWJ TV7TvIJ4dB1wokX8PeBems7k+DkRrk0e5LpLhxRsbJpKOBhiE49pb02tvLW93J78Uat3 No4jbwazJ3Tr1AEOXCSCfGRemAULWYy52LVWWEd5w8p8dmkhsj99pcq5GZ3GUnyWhroi kmPOkpZH+K4S4mGcnqIRyO7UbNf//K3LOiQQakcq3T1UkWvIDjKZD/7DuIKoP0Xm9HEY uDmBw9/11Gjyvq5JoI3sc5nULFClCsDz3hqdBIqIaR/J99+JnEpUaZNhfkrmNIpNWTH7 AK/A== X-Gm-Message-State: AOAM5328PN2t0yPz8eI8035piN0S3ueiyngSRC6k0DN6efYNCe3GmLGv nD9+nNY0H1Gm6uNkx/ROL0LfJg== X-Google-Smtp-Source: ABdhPJxsCpy/TBGLYx5Vl3+4B9L49mmC4/H7jkek9a/kPGO0kiKyGGtmak7p5gL4UV1db2SW7QYkbA== X-Received: by 2002:a4a:972c:: with SMTP id u41mr931370ooi.10.1603131764686; Mon, 19 Oct 2020 11:22:44 -0700 (PDT) Received: from localhost.localdomain (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id o8sm175296oog.47.2020.10.19.11.22.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 11:22:44 -0700 (PDT) From: Bjorn Andersson To: Will Deacon , Robin Murphy , Joerg Roedel , Sai Prakash Ranjan , Jordan Crouse , Thierry Reding , Rob Clark Cc: linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v5 0/3] iommu/arm-smmu-qcom: Support maintaining bootloader mappings Date: Mon, 19 Oct 2020 11:23:20 -0700 Message-Id: <20201019182323.3162386-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This is the revised fourth attempt of inheriting the stream mapping for the framebuffer on many Qualcomm platforms, in order to not hit catastrophic faults during arm-smmu initialization. The new approach does, based on Robin's suggestion, take a much more direct approach with the allocation of a context bank for bypass emulation and use of this context bank pretty much isolated to the Qualcomm specific implementation. The patchset has been tested to boot DB845c and RB5 (with splash screen) and Lenovo Yoga C630 (with EFI framebuffer). Bjorn Andersson (3): iommu/arm-smmu: Allow implementation specific write_s2cr iommu/arm-smmu-qcom: Read back stream mappings iommu/arm-smmu-qcom: Implement S2CR quirk drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 90 ++++++++++++++++++++++ drivers/iommu/arm/arm-smmu/arm-smmu.c | 13 +++- drivers/iommu/arm/arm-smmu/arm-smmu.h | 1 + 3 files changed, 101 insertions(+), 3 deletions(-) Tested-by: Steev Klimaszewski