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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27D76C433FE for ; Tue, 31 May 2022 20:57:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347788AbiEaU5j (ORCPT ); Tue, 31 May 2022 16:57:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344273AbiEaU5i (ORCPT ); Tue, 31 May 2022 16:57:38 -0400 Received: from mail-yb1-xb2c.google.com (mail-yb1-xb2c.google.com [IPv6:2607:f8b0:4864:20::b2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BBE52180A; Tue, 31 May 2022 13:57:37 -0700 (PDT) Received: by mail-yb1-xb2c.google.com with SMTP id v106so19017104ybi.0; Tue, 31 May 2022 13:57:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=40PFJ0KLH49o2a7cmdjfg2UDZMZZdNplRaKSZa0P70Q=; b=LBlxs6gYEgXpIHzbh/d2m73G/hVo58iw9hM6LSB/n8UZVrLtWmWJcf/Kcknu7MJ9vm VSem7YSJt0MJpSwq27DrpYfJs87MeGMiD8s1bGVpRcg7ChM/HxOIEmrCouq8t3T4GkLy qRPBLVQk+Y8Nmh9lcPFusObbG7vzv07rFgyazbunNxfOYZ7ZpCAgsycDEnDP/TYzMZc2 0Y04REpfMJ1rBdirpsJZ8obMwZJXp67ko/TkIn/YxOaZhlzPR+TRulxC0Iv6bpR4301M mGEp2JR8EDIg7LqW/OzT3eyNzutKNAZBp+VUQuOepprYS6fQLo+ZjaO4z/MDjkqkqLyT B8+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=40PFJ0KLH49o2a7cmdjfg2UDZMZZdNplRaKSZa0P70Q=; b=6r6C2y3MWbMvJKlaf90OdMXdv2GmSGLZR7dfQrGgdCT0Ha1mLZ0XKE2fxiOAThbxFQ xk+D/pGsX/REw1tREJirpL+g6+bIlFLCzVHvYdCONLcjIZ4Sbwgu19OCScA8c1kHixaD TrjBJe3GcXUDNJM8lgjXtA/P3hi8cDoldqR743Uu7VFfV9sTkQkq9rqp1k1datbN6ZdZ mVD8nXxUymQLWSD+U974Z9NDW1Gf6P7EYD6MvhdV7RfUztrW52NIrCihb62/ca+D7rRz b0a1KcodqEw87GfQ+eyR9/07MfqRHx4jvTLW79PwSfAT62XQ8icpxqf4+IDfZiNmG5PX DZ9A== X-Gm-Message-State: AOAM530Mik3Mcm17ivFExQLWYike46z92Go5JSgDpm9RLHmNUJ2X5++m YmIfprikvWQDuNVoumkC2WCXSH8B68y9lmSaYuMSRZ5J X-Google-Smtp-Source: ABdhPJzQE7CiGqybeME8r7CuvSaMGGUpdihIcHV4tk3SkMKBdECTjWnhek2dsW+WK3DiuQFC0Ll3kcDD08GIokCy2FA= X-Received: by 2002:a05:6902:1003:b0:64f:2e69:c97d with SMTP id w3-20020a056902100300b0064f2e69c97dmr59688647ybt.605.1654030656439; Tue, 31 May 2022 13:57:36 -0700 (PDT) MIME-Version: 1.0 References: <20220527212901.29268-1-konrad.dybcio@somainline.org> <20220527212901.29268-2-konrad.dybcio@somainline.org> <20220531154631.GA25502@willie-the-truck> <20220531161910.GE25502@willie-the-truck> In-Reply-To: <20220531161910.GE25502@willie-the-truck> From: Rob Clark Date: Tue, 31 May 2022 13:57:37 -0700 Message-ID: Subject: Re: [PATCH 1/6] iommu/qcom: Use the asid read from device-tree if specified To: Will Deacon Cc: Konrad Dybcio , ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm , Bjorn Andersson , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , Martin Botka , AngeloGioacchino Del Regno , Marijn Suijten , jamipkettunen@somainline.org, Andy Gross , Joerg Roedel , Rob Herring , Krzysztof Kozlowski , Robin Murphy , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Tue, May 31, 2022 at 9:19 AM Will Deacon wrote: > > On Tue, May 31, 2022 at 09:15:22AM -0700, Rob Clark wrote: > > On Tue, May 31, 2022 at 8:46 AM Will Deacon wrote: > > > > > > 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. > > > > I think the connection is that mapping from ctx bank to ASID is 1:1 > > But in what sense? How is the ASID used beyond a tag in the TLB? The commit > message hints at "TZ commands" being a problem. > > I'm not doubting that this is needed to make the thing work, I just don't > understand why. (disclaimer, it has been quite a while since I've looked at the smmu setup with earlier tz, ie. things that use qcom_iommu, but from memory...) We cannot actually assign the context banks ourselves, so in the dt bindings the "ASID" is actually the context bank index. I don't remember exactly if this was a limitation of the tz interface, or result of not being able to program the smmu's global registers ourselves. BR, -R 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 Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 49EF5C433EF for ; Tue, 31 May 2022 20:57:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id ED2E340439; Tue, 31 May 2022 20:57:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id spabr8NHJPfm; Tue, 31 May 2022 20:57:40 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id CA4C84014B; Tue, 31 May 2022 20:57:39 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id B0746C0039; Tue, 31 May 2022 20:57:39 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 76B81C002D for ; Tue, 31 May 2022 20:57:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 5693960C02 for ; Tue, 31 May 2022 20:57:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yh70-zcYuXx1 for ; Tue, 31 May 2022 20:57:37 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by smtp3.osuosl.org (Postfix) with ESMTPS id 9113B60BFE for ; Tue, 31 May 2022 20:57:37 +0000 (UTC) Received: by mail-yb1-xb2f.google.com with SMTP id r82so16093282ybc.13 for ; Tue, 31 May 2022 13:57:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=40PFJ0KLH49o2a7cmdjfg2UDZMZZdNplRaKSZa0P70Q=; b=LBlxs6gYEgXpIHzbh/d2m73G/hVo58iw9hM6LSB/n8UZVrLtWmWJcf/Kcknu7MJ9vm VSem7YSJt0MJpSwq27DrpYfJs87MeGMiD8s1bGVpRcg7ChM/HxOIEmrCouq8t3T4GkLy qRPBLVQk+Y8Nmh9lcPFusObbG7vzv07rFgyazbunNxfOYZ7ZpCAgsycDEnDP/TYzMZc2 0Y04REpfMJ1rBdirpsJZ8obMwZJXp67ko/TkIn/YxOaZhlzPR+TRulxC0Iv6bpR4301M mGEp2JR8EDIg7LqW/OzT3eyNzutKNAZBp+VUQuOepprYS6fQLo+ZjaO4z/MDjkqkqLyT B8+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=40PFJ0KLH49o2a7cmdjfg2UDZMZZdNplRaKSZa0P70Q=; b=sB2w2Qfk3yXzwZGtCxddkF2pCrVqy/hcAZ9xLkqGMeWeWvoEpM412gfTRDsyDedx4L 6+YQJcEGu0WzgxUsDTrchNtps6wUvtnMTHgXZu7tO9uvZUmoe4OVnA5W32Q04y0mxUMR ltbPOYnNmvteTtmWrUsCPDBvxKMtGXuy29HCWSajV9GnDveMOAYeG9yiHzIkq2j0DsSs igyKxNUgc1QY05txSklX4lzfJReQeloK6FI26XqFC23MGHFbbh4vpXRFyvTSnEqYD4Ko C0yONVcfJ9d4BYlcYMb34kEJSWaqPnzlo+1IMjvzDZPsuxkV/ap47Emk3BUJZQNefgJd 4wkQ== X-Gm-Message-State: AOAM531vkey+OXPK94gODHgAv+5r+Sr9eBxcCLkCydan5WB2DcV+pG2r rDB8GkWRJYiuBcCrl5ZFSBrGuW7LNxTZXnxFiI4= X-Google-Smtp-Source: ABdhPJzQE7CiGqybeME8r7CuvSaMGGUpdihIcHV4tk3SkMKBdECTjWnhek2dsW+WK3DiuQFC0Ll3kcDD08GIokCy2FA= X-Received: by 2002:a05:6902:1003:b0:64f:2e69:c97d with SMTP id w3-20020a056902100300b0064f2e69c97dmr59688647ybt.605.1654030656439; Tue, 31 May 2022 13:57:36 -0700 (PDT) MIME-Version: 1.0 References: <20220527212901.29268-1-konrad.dybcio@somainline.org> <20220527212901.29268-2-konrad.dybcio@somainline.org> <20220531154631.GA25502@willie-the-truck> <20220531161910.GE25502@willie-the-truck> In-Reply-To: <20220531161910.GE25502@willie-the-truck> From: Rob Clark Date: Tue, 31 May 2022 13:57:37 -0700 Message-ID: Subject: Re: [PATCH 1/6] iommu/qcom: Use the asid read from device-tree if specified To: Will Deacon Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-arm-msm , Konrad Dybcio , Linux Kernel Mailing List , jamipkettunen@somainline.org, Rob Herring , "list@263.net:IOMMU DRIVERS , Joerg Roedel , " , Andy Gross , Martin Botka , ~postmarketos/upstreaming@lists.sr.ht, Krzysztof Kozlowski , AngeloGioacchino Del Regno , Marijn Suijten , Robin Murphy , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Tue, May 31, 2022 at 9:19 AM Will Deacon wrote: > > On Tue, May 31, 2022 at 09:15:22AM -0700, Rob Clark wrote: > > On Tue, May 31, 2022 at 8:46 AM Will Deacon wrote: > > > > > > 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. > > > > I think the connection is that mapping from ctx bank to ASID is 1:1 > > But in what sense? How is the ASID used beyond a tag in the TLB? The commit > message hints at "TZ commands" being a problem. > > I'm not doubting that this is needed to make the thing work, I just don't > understand why. (disclaimer, it has been quite a while since I've looked at the smmu setup with earlier tz, ie. things that use qcom_iommu, but from memory...) We cannot actually assign the context banks ourselves, so in the dt bindings the "ASID" is actually the context bank index. I don't remember exactly if this was a limitation of the tz interface, or result of not being able to program the smmu's global registers ourselves. BR, -R _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BB85FC433EF for ; Tue, 31 May 2022 20:58:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/QU0io2HtY15s1Jv0t9hQ063Qw71+NASQPyxyyLVPvU=; b=xhQVIOmnEuV8wE q0ovEmOcztnzgx0aAexppkHmdEZ9AqOF7jd2nez4xsWZpO6FaCORCKsTYirTRs4SRrxCufK9wpsBr za4xNeSbGJ6AES+qJxNN89ieAnliyYMgRaaexRDgVwzxAGmVGvq5mLzZIiLUUjl3ogMBwC2iw+gz2 THl7+2glKo5AMuzFpwky/rCRLjAM0Aj9uz6H3x7SyNiwuN7lIaCx7AlWMR41nPZdtvV6nIfcP+8hi 4B+rraFAFsGc5+pZgBVXI4rhqcWzs60dgXL6VVg2AVXBcVfZaKH4AR+Cw46OC/rphV2G12lW+C2PA xjWjGFcUjZDcUAR526Lg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nw8vu-00Cevr-2Q; Tue, 31 May 2022 20:57:42 +0000 Received: from mail-yb1-xb31.google.com ([2607:f8b0:4864:20::b31]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nw8vr-00Cev5-48 for linux-arm-kernel@lists.infradead.org; Tue, 31 May 2022 20:57:40 +0000 Received: by mail-yb1-xb31.google.com with SMTP id f34so12944369ybj.6 for ; Tue, 31 May 2022 13:57:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=40PFJ0KLH49o2a7cmdjfg2UDZMZZdNplRaKSZa0P70Q=; b=LBlxs6gYEgXpIHzbh/d2m73G/hVo58iw9hM6LSB/n8UZVrLtWmWJcf/Kcknu7MJ9vm VSem7YSJt0MJpSwq27DrpYfJs87MeGMiD8s1bGVpRcg7ChM/HxOIEmrCouq8t3T4GkLy qRPBLVQk+Y8Nmh9lcPFusObbG7vzv07rFgyazbunNxfOYZ7ZpCAgsycDEnDP/TYzMZc2 0Y04REpfMJ1rBdirpsJZ8obMwZJXp67ko/TkIn/YxOaZhlzPR+TRulxC0Iv6bpR4301M mGEp2JR8EDIg7LqW/OzT3eyNzutKNAZBp+VUQuOepprYS6fQLo+ZjaO4z/MDjkqkqLyT B8+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=40PFJ0KLH49o2a7cmdjfg2UDZMZZdNplRaKSZa0P70Q=; b=2vzXHSCXDuht6WS4icgUMGjgu4qcoD3o5PBGRhsogATUYjWSD/mXcf6lWnsCCJCc7p hVIejWaFICucYu+zWA2oWp8mPA7in/IsmtgN+OTpv58rxghO/PHYg+kuvrJH7pthRlpO ilNJVWOaE4L7hJ3yZ3VQD8FixuW8GlbvLfXocaoSmKwqKBDSxep6DxmHBxJAp20ztlQw IuMZlMEHqGNcf2REK+a04XbMF0U6oQ7Tu33olQ0rbWx67Z2kgEnWo9WEbXHKz4T2Kzht ODC/pE1eOlhfkcDYJQp/FWXRrDKk40B1tbjy5uty7g1FB1LyZpGZ/tUENCAB3QU5/hwM EpEA== X-Gm-Message-State: AOAM5318nSXV5SwKTbfhG/qNbCttphFTu/jdQm5IaMrVDarTGpTC4WVC msbb17aAtN/kTKpFxS0obSZSE5nhHmbFGWfeEvY= X-Google-Smtp-Source: ABdhPJzQE7CiGqybeME8r7CuvSaMGGUpdihIcHV4tk3SkMKBdECTjWnhek2dsW+WK3DiuQFC0Ll3kcDD08GIokCy2FA= X-Received: by 2002:a05:6902:1003:b0:64f:2e69:c97d with SMTP id w3-20020a056902100300b0064f2e69c97dmr59688647ybt.605.1654030656439; Tue, 31 May 2022 13:57:36 -0700 (PDT) MIME-Version: 1.0 References: <20220527212901.29268-1-konrad.dybcio@somainline.org> <20220527212901.29268-2-konrad.dybcio@somainline.org> <20220531154631.GA25502@willie-the-truck> <20220531161910.GE25502@willie-the-truck> In-Reply-To: <20220531161910.GE25502@willie-the-truck> From: Rob Clark Date: Tue, 31 May 2022 13:57:37 -0700 Message-ID: Subject: Re: [PATCH 1/6] iommu/qcom: Use the asid read from device-tree if specified To: Will Deacon Cc: Konrad Dybcio , ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm , Bjorn Andersson , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , Martin Botka , AngeloGioacchino Del Regno , Marijn Suijten , jamipkettunen@somainline.org, Andy Gross , Joerg Roedel , Rob Herring , Krzysztof Kozlowski , Robin Murphy , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220531_135739_223508_395290FF X-CRM114-Status: GOOD ( 28.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 31, 2022 at 9:19 AM Will Deacon wrote: > > On Tue, May 31, 2022 at 09:15:22AM -0700, Rob Clark wrote: > > On Tue, May 31, 2022 at 8:46 AM Will Deacon wrote: > > > > > > 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. > > > > I think the connection is that mapping from ctx bank to ASID is 1:1 > > But in what sense? How is the ASID used beyond a tag in the TLB? The commit > message hints at "TZ commands" being a problem. > > I'm not doubting that this is needed to make the thing work, I just don't > understand why. (disclaimer, it has been quite a while since I've looked at the smmu setup with earlier tz, ie. things that use qcom_iommu, but from memory...) We cannot actually assign the context banks ourselves, so in the dt bindings the "ASID" is actually the context bank index. I don't remember exactly if this was a limitation of the tz interface, or result of not being able to program the smmu's global registers ourselves. BR, -R _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel