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 136D1CD1284 for ; Tue, 9 Apr 2024 10:20:54 +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=3ENMe+ZHkkxYlIEddRvXU6AtySc47fWgxR8geRQ+eKY=; b=Fao7zSqx2fKrXU irfeqBkOSKhaj9nq/z0Lzmsc7qSHd/MBgEbprj5BMiOVZNE43FjywRVDc7dS6rgcnckl5mIpDaL2T AwhZhfxieLlxIUMFeH6a2clcciTZh77l+5uuEhnUC2cC/9gl7snpJUkH3GPwTntezd15yhGydOnIx dT+tIeqWUlrnJtSfdYBNelImr3liZyLJW0YC200zl8MAJHOUv+nQdxTvtjZg3RNqtl9v6wGxWTeSq M3uA0zk0nluCDlqs8eKi73zds5yD5v/RHSzjNE1CCEUpIHP0vzDTHzAzVVO4sQkg7JKxV0F4N4Otm ib6RpPoYdD0a5vr7skxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ru8ar-00000001QkW-1cTb; Tue, 09 Apr 2024 10:20:45 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ru8an-00000001Qj0-2sc1 for linux-arm-kernel@lists.infradead.org; Tue, 09 Apr 2024 10:20:43 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5EB5861682; Tue, 9 Apr 2024 10:20:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B258EC433B1; Tue, 9 Apr 2024 10:20:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712658040; bh=pzdCSbr5SHBon91syIJCTeDKf1rySdQBVpzt6jNEgQk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mBWiiQ6HYjrUnXh8pi5Y+nI2VufkIDxZO/XmS5JqHzIzKKCTFyV7b+JdB1J8eljk3 uY8uLDeRFlIO9Mf7//GhUc8688Q2OwdPcgwwYYl28hlq8nQ41g08WfBnB6QBbxdmkH 3Z570Zzg4S9m8kgE+sKCOw9kk6Hp+LC3g5QVd1AfXrgITn04uJvxjMPSWhcfr2as2X rYCNFvJgG3PWZrt2crQLnTvwakDXiQQT1Glsur+x5qO899l1UwfNjZiXmXq1hO6K0k H/FEtUgK+F7Hh3ALnjh3eW2REylKT0rje563SEAVGjrCEA2sFNwt7ygTwY9xdN/rOq +Dqbxn3Gq6Thg== Date: Tue, 9 Apr 2024 11:20:33 +0100 From: Will Deacon To: Georgi Djakov Cc: robin.murphy@arm.com, joro@8bytes.org, iommu@lists.linux.dev, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, devicetree@vger.kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, robdclark@gmail.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, quic_cgoldswo@quicinc.com, quic_sukadev@quicinc.com, quic_pdaly@quicinc.com, quic_sudaraja@quicinc.com, djakov@kernel.org Subject: Re: [PATCH v7 2/7] iommu/arm-smmu-qcom-tbu: Add Qualcomm TBU driver Message-ID: <20240409102033.GA22381@willie-the-truck> References: <20240329210638.3647523-1-quic_c_gdjako@quicinc.com> <20240329210638.3647523-3-quic_c_gdjako@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240329210638.3647523-3-quic_c_gdjako@quicinc.com> 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-20240409_032041_977143_7AC2F329 X-CRM114-Status: GOOD ( 21.75 ) 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, Mar 29, 2024 at 02:06:33PM -0700, Georgi Djakov wrote: > Operating the TBUs (Translation Buffer Units) from Linux on Qualcomm > platforms can help with debugging context faults. To help with that, > the TBUs can run ATOS (Address Translation Operations) to manually > trigger address translation of IOVA to physical address in hardware > and provide more details when a context fault happens. > > The driver will control the resources needed by the TBU to allow > running the debug operations such as ATOS, check for outstanding > transactions, do snapshot capture etc. > > Signed-off-by: Georgi Djakov > --- > drivers/iommu/Kconfig | 9 + > drivers/iommu/arm/arm-smmu/Makefile | 1 + > .../iommu/arm/arm-smmu/arm-smmu-qcom-tbu.c | 372 ++++++++++++++++++ > drivers/iommu/arm/arm-smmu/arm-smmu-qcom.h | 2 + > drivers/iommu/arm/arm-smmu/arm-smmu.h | 2 + > 5 files changed, 386 insertions(+) > create mode 100644 drivers/iommu/arm/arm-smmu/arm-smmu-qcom-tbu.c > > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > index 0af39bbbe3a3..b699e88f42c5 100644 > --- a/drivers/iommu/Kconfig > +++ b/drivers/iommu/Kconfig > @@ -374,6 +374,15 @@ config ARM_SMMU_QCOM > When running on a Qualcomm platform that has the custom variant > of the ARM SMMU, this needs to be built into the SMMU driver. > > +config ARM_SMMU_QCOM_TBU > + bool "Qualcomm TBU driver" > + depends on ARM_SMMU_QCOM > + help > + The SMMUs on Qualcomm platforms may include Translation Buffer > + Units (TBUs) for each master. Enabling support for these units > + allows to operate the TBUs and obtain additional information > + when debugging memory management issues like context faults. > + > config ARM_SMMU_QCOM_DEBUG Can we just use ARM_SMMU_QCOM_DEBUG for all of this? Having both ARM_SMMU_QCOM_DEBUG and ARM_SMMU_QCOM_TBU for the same hardware is pretty confusing, I think. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel