Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp104315pxk; Fri, 11 Sep 2020 01:27:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxU2GCOnqCgiOaxHWft/YZ0VngH09HRLhphxv9Q0l69x4T8Y1hYFgubK5rQoVEmoifRdEck X-Received: by 2002:a17:906:e87:: with SMTP id p7mr881977ejf.547.1599812831995; Fri, 11 Sep 2020 01:27:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599812831; cv=none; d=google.com; s=arc-20160816; b=rnz3L4G7RxSdUV9xQrWtIOwlfobGFMQR2/hBTpqmBMFvGQ5lGqyxUJNpGctEnkSHxQ OoOlrs4ABfMEoMWATPoCm6edgcJN4LYBbwJnZwR8/4WuFt3+Weuh35G9HrAVyVrrI1dL +/S/DWeL0txpIm8JbFIIaMESNjM5752GOSYIx+1Lti0ZWlGzT4Kmm6+uITxPQwu+lkc1 94ETq+yxi2rq0aiJI1S4v5cFY9Cury60uYIOeeoeYCaNlPPhAfyHPucPEbG7kVqymkrP fhF9rV03+Q6toeuB1R4lbBLePu7PelVkeGex9CcOtvBGugB7SM/m2JhOZvAHwIxuKzep QImQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:user-agent:message-id :references:in-reply-to:subject:cc:to:from:date :content-transfer-encoding:mime-version:dkim-signature :dkim-signature; bh=LPTrHbhKIfja666It7Wic9sZxzAM0VK0nv2gn5bmf64=; b=YycR66wa0CdFcT3w6skrVmDV7ghfuRSa+smwEBPxIiY+E8OV3SY2+KcPelR8xYObcj DWylhJ6baJqKHhUIKWh0Dz1lKnEMxSV+6vSHWnrXydXnmjKuQbaazzMvAOM4I+hUXF0W 7T63WC970tJTSW3Ndl7covSMDQcSkvpoLB18MRoQbuwn3L2lM7z21abP+bp2bUyinxOk h4gTUuXTScMrjnCjnZhdb5qOX413SrV50VCyoqmrr42gb5XWW3m1C2dkmdKsY8n4h9+e KPJmXWHjw9tTEUVDxbP5wsUcc6qgIRboEKmhscg7jPDAihK8T3dOsC8Z7ZJLcHhmG0y6 ISfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=zsmsymrwgfyinv5wlfyidntwsjeeldzt header.b=DUSaScYi; dkim=pass header.i=@amazonses.com header.s=hsbnp7p3ensaochzwyq5wwmceodymuwv header.b="bMRG+z/e"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v21si870506ejg.656.2020.09.11.01.26.49; Fri, 11 Sep 2020 01:27:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@codeaurora.org header.s=zsmsymrwgfyinv5wlfyidntwsjeeldzt header.b=DUSaScYi; dkim=pass header.i=@amazonses.com header.s=hsbnp7p3ensaochzwyq5wwmceodymuwv header.b="bMRG+z/e"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725771AbgIKIYX (ORCPT + 99 others); Fri, 11 Sep 2020 04:24:23 -0400 Received: from a27-186.smtp-out.us-west-2.amazonses.com ([54.240.27.186]:37690 "EHLO a27-186.smtp-out.us-west-2.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725554AbgIKIYW (ORCPT ); Fri, 11 Sep 2020 04:24:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1599812662; h=MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:To:Cc:Subject:In-Reply-To:References:Message-ID; bh=YcrG/LuDfQatkkUvVrsoN1HVKrTFRH1ANNeQ0qNYkz8=; b=DUSaScYiCJ+raicYx6PC8kJo1NZWhtaOIhxZaqBLTQfRe266L96vZANC8RplN+ME Fvq3CRdWVJjfMCQIM7NSfeMadS8Qe2cFjhQxjOhPmqiPQRwmBF9CCHXxg+m5CYmIMPo 2zuKib071dm6UsLGGZJi+Qd4jBjbl2OaGpL8CJWQ= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=hsbnp7p3ensaochzwyq5wwmceodymuwv; d=amazonses.com; t=1599812662; h=MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:To:Cc:Subject:In-Reply-To:References:Message-ID:Feedback-ID; bh=YcrG/LuDfQatkkUvVrsoN1HVKrTFRH1ANNeQ0qNYkz8=; b=bMRG+z/eKKjD1h7AkzMrPGwmcU/lNl7oPBoiMqSgDXPBPDQmSTDZxtqmCpe3C2HB 6IwX9aTMUQSSvJ8H6+nNTJfStgdtTJuhEt7QMCRw445KYnmTXhqhhOxDpC3XCobFaSB 74L4A8XMfZ56PYY1erJWRGsBN9umrWbNtgSeGHeM= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 11 Sep 2020 08:24:22 +0000 From: Sai Prakash Ranjan To: Bjorn Andersson Cc: Will Deacon , Robin Murphy , Joerg Roedel , Jordan Crouse , Rob Clark , 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: Re: [PATCH v3 3/8] iommu/arm-smmu: Consult context bank allocator for identify domains In-Reply-To: <20200904155513.282067-4-bjorn.andersson@linaro.org> References: <20200904155513.282067-1-bjorn.andersson@linaro.org> <20200904155513.282067-4-bjorn.andersson@linaro.org> Message-ID: <010101747c43f329-e6376c08-27e9-4b2e-92cd-f2e0a28d9e3c-000000@us-west-2.amazonses.com> X-Sender: saiprakash.ranjan@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 X-SES-Outgoing: 2020.09.11-54.240.27.186 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-09-04 21:25, Bjorn Andersson wrote: > For implementations of the ARM SMMU where stream mappings of bypass > type > are prohibited identity domains can be implemented by using context > banks with translation disabled. > > Postpone the decision to skip allocating a context bank until the > implementation specific context bank allocator has been consulted and > if > it decides to use a context bank for the identity map, don't enable > translation (i.e. omit ARM_SMMU_SCTLR_M). > > Signed-off-by: Bjorn Andersson > --- > ... > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.h > b/drivers/iommu/arm/arm-smmu/arm-smmu.h > index ddf2ca4c923d..235d9a3a6ab6 100644 > --- a/drivers/iommu/arm/arm-smmu/arm-smmu.h > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.h > @@ -243,6 +243,8 @@ enum arm_smmu_cbar_type { > #define TLB_LOOP_TIMEOUT 1000000 /* 1s! */ > #define TLB_SPIN_COUNT 10 > > +#define ARM_SMMU_CBNDX_BYPASS 0xffff > + > /* Shared driver definitions */ > enum arm_smmu_arch_version { > ARM_SMMU_V1, > @@ -346,6 +348,7 @@ struct arm_smmu_cfg { > u32 sctlr_clr; /* bits to mask in SCTLR */ > enum arm_smmu_cbar_type cbar; > enum arm_smmu_context_fmt fmt; > + bool m; Can we use mmu_enable instead of m here to be more descriptive? Thanks, Sai -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation