Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp45533iof; Wed, 8 Jun 2022 14:52:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKv7gNj0udCchAfdPZWxyxzt+FfG+nNyF2xCjyduysqdMCwJP+FU6He13VzIFildx4qzgx X-Received: by 2002:a17:906:e104:b0:711:d510:54ca with SMTP id gj4-20020a170906e10400b00711d51054camr13947778ejb.342.1654725140650; Wed, 08 Jun 2022 14:52:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654725140; cv=none; d=google.com; s=arc-20160816; b=HM6Sf0C3FPYdNSQfycfRjcm2NHKGcHXxd0d2UKDEyT635be60Nwi5t1tHuy/7JzV+U Tcb8qMsts1gz4ffXOD5FP6dAxwgdYMKHmZFEvGEDyH2GrBsdclDRA0DQc2t1YHmD0LPq 7KNTiFMWYr35wHZx71s8TAvlTYnUe0EEZIsKKl9PS745cqJ/Jn95DH6QkMpNsHqENCPk ef2GQv/NM/OyuHqUMkKEXR0y9dO5J65PXKSVxCUR5rJ0coQ1IWJwzSu91fx7tbwqkmnd 3LdZO705KMCNiAXV/MRFtdYtUVFrlCDGFA/LRPVfM60MrYFevNt4LcM92tcFDG1x0I9C z9wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=KIO51oCSFBweuGA1Msu2btlmkDy6vYub6CEmYJxxH4w=; b=UBD9N4mYsUCo9Qj4Dgnh+n8d4wacVyQq35N9zqMcoD0bJwdWUMYYVJXumyT2l9L8fP eUgt0Hb17GDPmTOBe6VbQQnj5LhfqGz0dxPRtNaWDM9Y4Sk3la3b2dlXqamlFtHy8VFT BpmQdOxTaHhzn1oFb6fJP3DqbtcMsoXumlKK3ZVJLaFg6fj8lSayfJhMJ6+WD3v5xLfC LUindlg89a47kOsmqMYdc9szShPAjjAyzl67/fQch2XC3fqW1yF85fQgyhbYhttABfG4 /sr+LCbRvMMMGBiz+KYQ8nA0TG96kRmP35gZZyGrnMqVOtre+6itJKyUl/c0vOGIVQ9N WPsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailoo.org header.s=mailo header.b=bDx4yfH5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailoo.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr15-20020a1709073f8f00b006ff70e15efdsi20591318ejc.858.2022.06.08.14.51.54; Wed, 08 Jun 2022 14:52:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailoo.org header.s=mailo header.b=bDx4yfH5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailoo.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236426AbiFHVns (ORCPT + 99 others); Wed, 8 Jun 2022 17:43:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231722AbiFHVnq (ORCPT ); Wed, 8 Jun 2022 17:43:46 -0400 X-Greylist: delayed 1214 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 08 Jun 2022 14:43:43 PDT Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B15AE92733 for ; Wed, 8 Jun 2022 14:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1654723379; bh=KIO51oCSFBweuGA1Msu2btlmkDy6vYub6CEmYJxxH4w=; h=X-EA-Auth:Message-ID:Subject:From:To:Cc:Date:In-Reply-To: References:Content-Type:MIME-Version:Content-Transfer-Encoding; b=bDx4yfH5O9J40SpES1cArf5QgrRDpSgNAoMMIwMgccQj4itj658OFVp7qZWAE4hn8 L37MVHQNQJUw7/7LYIOpMumOgwfpSQace5VzE1Fr997+iHEXCs/PUxqaBeRUXK4Fok HP3VShc8/msEIa+BU9WcIrqDZUlSISxKaqbfbphI= Received: by b-6.in.mailobj.net [192.168.90.16] with ESMTP via proxy.mailoo.org [213.182.55.207] Wed, 8 Jun 2022 23:22:59 +0200 (CEST) X-EA-Auth: UhNYjE+10JvU06sCLX4eJVHCBIE9YEmsIEtVZsDiqasF96VM03rc5qtn5aeyRFiRMzJkqxMheEJk4YsHAbGb7Qz2NgE5IfNzzY16N2TzQSw= Message-ID: <78f1adee5c6e0c3547c116d0e78fe5b70f9c15e1.camel@mailoo.org> Subject: Re: [PATCHv2] iommu/arm-smmu-qcom: Add debug support for TLB sync timeouts From: Vincent Knecht To: Sai Prakash Ranjan , Will Deacon , Robin Murphy , Joerg Roedel Cc: iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, quic_guptap@quicinc.com, Rob Clark , Bjorn Andersson Date: Wed, 08 Jun 2022 23:22:58 +0200 In-Reply-To: <20220526041403.9984-1-quic_saipraka@quicinc.com> References: <20220526041403.9984-1-quic_saipraka@quicinc.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Le jeudi 26 mai 2022 =C3=A0 09:44 +0530, Sai Prakash Ranjan a =C3=A9crit=C2= =A0: > TLB sync timeouts can be due to various reasons such as TBU power down > or pending TCU/TBU invalidation/sync and so on. Debugging these often > require dumping of some implementation defined registers to know the > status of TBU/TCU operations and some of these registers are not > accessible in non-secure world such as from kernel and requires SMC > calls to read them in the secure world. So, add this debug support > to dump implementation defined registers for TLB sync timeout issues. >=20 > Signed-off-by: Sai Prakash Ranjan > --- >=20 > Changes in v2: > =C2=A0* Use scm call consistently so that it works on older chipsets wher= e > =C2=A0=C2=A0 some of these regs are secure registers. > =C2=A0* Add device specific data to get the implementation defined regist= er > =C2=A0=C2=A0 offsets. >=20 > --- > =C2=A0drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 161 ++++++++++++++++++= --- > =C2=A0drivers/iommu/arm/arm-smmu/arm-smmu.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= |=C2=A0=C2=A0 2 + > =C2=A0drivers/iommu/arm/arm-smmu/arm-smmu.h=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= |=C2=A0=C2=A0 1 + > =C2=A03 files changed, 146 insertions(+), 18 deletions(-) Hi Sai, and thanks for this patch ! I've encountered TLB sync timeouts with msm8939 SoC recently. What would be needed to add to this patch so this SoC is supported ? Like, where could one check the values to be used in an equivalent of qcom_smmu_impl0_reg_offset values for this SoC (if any change needed) ? Current values are not found by simply greping in downstream/vendor dtsi/dt= s files...