From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 900D8C433E0 for ; Mon, 20 Jul 2020 09:03:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 65D222080D for ; Mon, 20 Jul 2020 09:03:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595235825; bh=KcQt2EOigF1ebrTQ7hvGmXwS8Ro1HrFCMeZYHFhnS7o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=O7IYsg2P+ZTpDfvV7bfFIACLd1tqmDB2oyZMIK507l0Zg1PfHBSwCcwHuIa3FxDY4 RPpnKPPBqIt0u2YjSss7160SDyynf040kxX0VR4OfpSUaNykV7d2up3SkMqgmUYKPd 2XyNjCvsFwP1OfieGlOuEc4RbG6K8ulYEAceEdgs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728083AbgGTJDo (ORCPT ); Mon, 20 Jul 2020 05:03:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:51010 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726030AbgGTJDo (ORCPT ); Mon, 20 Jul 2020 05:03:44 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AC263208E4; Mon, 20 Jul 2020 09:03:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595235823; bh=KcQt2EOigF1ebrTQ7hvGmXwS8Ro1HrFCMeZYHFhnS7o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2MQ1krqOi3hi5kU835rdrlryHLYqM1P79nmjhvl/68c5WzpyyCv+6MttAMk7f8ulC YeFKtEdgbAcBW1900hLCi6R7J7eTvWGEVT8fSsekUCI9pgNtzklh3LRlfN5Yzz1rlp QzmMdqjcenT2oFxV7+Mb/zf/kuE5sm2d2fy1q2pQ= Date: Mon, 20 Jul 2020 10:03:38 +0100 From: Will Deacon To: Bjorn Andersson Cc: Robin Murphy , Joerg Roedel , Thierry Reding , Laurentiu Tudor , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Jonathan Marek , linux-arm-msm@vger.kernel.org, John Stultz , Vinod Koul , jcrouse@codeaurora.org Subject: Re: [PATCH v2 5/5] iommu/arm-smmu: Setup identity domain for boot mappings Message-ID: <20200720090338.GB11189@willie-the-truck> References: <20200717001619.325317-1-bjorn.andersson@linaro.org> <20200717001619.325317-6-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200717001619.325317-6-bjorn.andersson@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 16, 2020 at 05:16:19PM -0700, Bjorn Andersson wrote: > With many Qualcomm platforms not having functional S2CR BYPASS a > temporary IOMMU domain, without translation, needs to be allocated in > order to allow these memory transactions. > > Unfortunately the boot loader uses the first few context banks, so > rather than overwriting a active bank the last context bank is used and > streams are diverted here during initialization. > > This also performs the readback of SMR registers for the Qualcomm > platform, to trigger the mechanism. > > This is based on prior work by Thierry Reding and Laurentiu Tudor. > > Tested-by: John Stultz > Tested-by: Vinod Koul > Signed-off-by: Bjorn Andersson > --- > > Changes since v1: > - Rebased to avoid conflict > - Picked up tested-by > > drivers/iommu/arm-smmu-qcom.c | 11 +++++ > drivers/iommu/arm-smmu.c | 79 +++++++++++++++++++++++++++++++++-- Perhaps the CB allocator callback can help to reduce the changes to the core driver here. What do you think? Will