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 2681EC433EF for ; Tue, 31 May 2022 15:46:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345865AbiEaPqt (ORCPT ); Tue, 31 May 2022 11:46:49 -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) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 D80A5C433F5 for ; Tue, 31 May 2022 15:46:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 808E560E29; Tue, 31 May 2022 15:46:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org 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 MUrR5fgYtO4X; Tue, 31 May 2022 15:46:45 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id 70CF460C21; Tue, 31 May 2022 15:46:45 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4291BC0032; Tue, 31 May 2022 15:46:45 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id BCAB3C002D for ; Tue, 31 May 2022 15:46:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id A4BBF60E29 for ; Tue, 31 May 2022 15:46:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org 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 j8sjUkvMekzV for ; Tue, 31 May 2022 15:46:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by smtp3.osuosl.org (Postfix) with ESMTPS id 4F15960C21 for ; Tue, 31 May 2022 15:46:43 +0000 (UTC) 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 ams.source.kernel.org (Postfix) with ESMTPS id 23DDEB8121D; 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 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-Disposition: inline In-Reply-To: <20220527212901.29268-2-konrad.dybcio@somainline.org> User-Agent: Mutt/1.10.1 (2018-07-13) Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, jamipkettunen@somainline.org, Rob Herring , iommu@lists.linux-foundation.org, Andy Gross , martin.botka@somainline.org, ~postmarketos/upstreaming@lists.sr.ht, Krzysztof Kozlowski , angelogioacchino.delregno@somainline.org, marijn.suijten@somainline.org, Robin Murphy , linux-arm-kernel@lists.infradead.org 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 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 _______________________________________________ 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 C1167C433F5 for ; Tue, 31 May 2022 15:48:02 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=P89HecQ2cG4fs5lV4Sg3Mjc9z7WvAPHXExflf5FBT6I=; b=ugIvbL7RJugCho KFPIyJSg8+2BC8RduVMIGWEE76Pavu0LYNp/cyFGY5CJBj5QF1EByRfIZ0iloLo3foA1J4msNepUV 6ngUSNreYqYenZFzht0XWdLvzyCE6YCOBl3YfOLMW3MGQShmEmGW8NlI7beCEF47+MW6LIlXwbLTn nNBS6d1lcEyeVpZjkp9cxDQjQoDTmRechwgP4sE5ZjFVMHjAaF5wlMwBMMuKfR8Muf9wkJDEg1hVH LXBPKJUfrRnfrxcUVmMTXPXyRV65pbTQ24zSodhxd8CInxSa6W5256YdW0B8Mx92mtdoseTKZQ/X5 SqhWHzjvodyPeuZ147PA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nw44z-00Bd0O-On; Tue, 31 May 2022 15:46:45 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nw44w-00BczQ-CW for linux-arm-kernel@lists.infradead.org; Tue, 31 May 2022 15:46:44 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id 23DDEB8121D; 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-Disposition: inline In-Reply-To: <20220527212901.29268-2-konrad.dybcio@somainline.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220531_084642_610710_B777FCFC X-CRM114-Status: GOOD ( 15.22 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel