Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5870351ioo; Wed, 1 Jun 2022 14:33:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsStbbmNzhXianijMGosKLJeRpyhfNFNGePQDZNYwUMXKBXIF2UASfGiLKJcLayvJ4BUrG X-Received: by 2002:a17:903:32c4:b0:163:e765:5071 with SMTP id i4-20020a17090332c400b00163e7655071mr1391868plr.153.1654119182456; Wed, 01 Jun 2022 14:33:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654119182; cv=none; d=google.com; s=arc-20160816; b=YxpJCJ03ksLO0wO/BgwtzCQa9pFEAaa+fdw+4EslxYcxRHKqMgHrgJbaMlQX4yBB/l 5qtNcDVu8abcP61aOJcnXMVq8Evhfxvb1Nz5jljVcTBSRCpdcSttZj5trua17bO+jWhS Hv9qWud0+gNAW/tR/Nuk1n8nQFrWY9kawekko5CAd/DeZa6/JQIO3rtlLNrp49j3B7Qr 8ea5/ze0tqhA1/OGN2T9P4LMhzYYZEsEZjzUQLdl0ufFHS2YtjceIVAA85rx2gO4/mJZ WwKk6/kZVQ8q43RY6qhKvWedgrfGSiRk69qWzCm8j9Fjvb1Nd51FWadVfSrKwinBlZz3 Fc9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=/6ddxbVZGt1FLCnEaCZBDAqT5z26e6gYrQnSHxodaJ8=; b=TQIFQaYL/brX+2btuenFzHprrzoXab0rhS5wFBJ9Z1X4YBJ3Hwu5vvCsC9pShFiJJG dcuhG8fEHAv2b64JvzYgbmBVdIWFKwO1vDBoEhKaJ3puFD08WhMQaifgy9+iYS4ijqzS wXFcKssi7mLYLPzD1YF061BFXSisqcSNOc6ZZz2nhIlogA4DcO1T6StK7PKN6x8+/H+P YuJNERB3p8Pld9wd6Mse3uPLvvX+e0WovjII1/hsVVy4EPg8Zf4EN9JYSuIx8yCVe3ZC 9jRIyYJCy58UTToVmWSpdtSmv9YcRgM9Wb/vyXTelA/yE63NX2N9TASimbwgEZpTGlFE IbDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aNYFRHks; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u69-20020a638548000000b003fa0263081csi3535625pgd.726.2022.06.01.14.33.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 14:33:02 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aNYFRHks; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8654131CC95; Wed, 1 Jun 2022 13:21:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239122AbiEaPqu (ORCPT + 99 others); Tue, 31 May 2022 11:46:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345837AbiEaPqr (ORCPT ); Tue, 31 May 2022 11:46:47 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF8631132; Tue, 31 May 2022 08:46:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 8D085CE16A2; Tue, 31 May 2022 15:46:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BA6AC385A9; Tue, 31 May 2022 15:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654011998; bh=28hNyHGSDpZHs0jrlZm4DevaiKS1Dgov9Cghpq4OuQU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aNYFRHksLYtUcCAcZ7Buwq9ttW4S4yXcIn65uSfG/yW7ZUq04CMK8dwJoYjmXP2Dy rXfdQhC5MvbakIbjSye0D4OfqBhFz0k0NR/zTliFhCGaMqiy3MXwkUixzciVR56ag0 mgO3/6kt6UHQ4Rnw5GnMOw7m1UBe0zJ6z+pmNro2OjVpor9BwZIV6ovTEbfP0wy7eE B7y9Bm2zHTBfEM3gvdPrtkDwQfdJv1Zz8VnYK/WEHqwb9D87bY1QR0uPAZc9vNbMRw G5CjSrSef4K/vaTzdrxxlVW82I6yhQ8vqEymj5K+2sLUgnLpmy9Mxf97Ie/yOQ5NgL CNQsT4KLKq9cg== Date: Tue, 31 May 2022 16:46:31 +0100 From: Will Deacon To: Konrad Dybcio Cc: ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, martin.botka@somainline.org, angelogioacchino.delregno@somainline.org, marijn.suijten@somainline.org, jamipkettunen@somainline.org, Andy Gross , Joerg Roedel , Rob Herring , Krzysztof Kozlowski , Rob Clark , Robin Murphy , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/6] iommu/qcom: Use the asid read from device-tree if specified Message-ID: <20220531154631.GA25502@willie-the-truck> References: <20220527212901.29268-1-konrad.dybcio@somainline.org> <20220527212901.29268-2-konrad.dybcio@somainline.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220527212901.29268-2-konrad.dybcio@somainline.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 27, 2022 at 11:28:56PM +0200, Konrad Dybcio wrote: > From: AngeloGioacchino Del Regno > > As specified in this driver, the context banks are 0x1000 apart. > Problem is that sometimes the context number (our asid) does not > match this logic and we end up using the wrong one: this starts > being a problem in the case that we need to send TZ commands > to do anything on a specific context. I don't understand this. The ASID is a software construct, so it shouldn't matter what we use. If it does matter, then please can you explain why? The fact that the context banks are 0x1000 apart seems unrelated. Will