Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp267929pxb; Mon, 13 Sep 2021 18:54:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5ARXp9RVZ3zSfGUB1oi7Nyp+JV52yZDl+D67cPgFYBoQidgrFIPseLaI1OzZ16a8hPIsA X-Received: by 2002:a05:6402:6d2:: with SMTP id n18mr16246583edy.333.1631584459310; Mon, 13 Sep 2021 18:54:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631584459; cv=none; d=google.com; s=arc-20160816; b=rtgVbr6pKIgt0Y7Vo99pKa/pm+q2UOslEUftfEjDQIRsG7bGFhDUIPV1a6IJI/nzAl rKh9X4zAVEw0ilH2hH1iTbQXtGg3PNjfdeYaeIsQEyikJNle3gARQ7tIwU72q3SZaOzf 9RAKYVdAhgP8hQeV2AaABnFiirAnI98AaVC+tPCBh9rM5p4+JAsLtC73i2tKMd96MYM4 ngEoXWdXFr/yJoE/SchmJ+a16piXQ6Md6rJnZg7QE0jouRqVFIoI2DhjgpJyVTBhOhBp v7+lJi5aIsbxtPOenB41OySnjJa3oK3KVgFYb/55OzNMjNQO95vvOnTQuN18lbn6tQQv SDdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=wZqHoyadq44npl8Iti+BxptrXlSWbYpcF970LVVeoyc=; b=UJm+CiOv/CxbIwrCBQwswhSllf5WE2Mdv02qFgbhzKLbSYYYdUAu7eWvSMK79MAjEf E/efPL2+0DwbdWi0nn15fyw6+LX9swnIjHsOtmFZ4hlW90axFttgVZg7HE50gYxBmxvH 0QImAIPHdC1j2TBJpdz9ESwQL0ak/aL1+XdxoJOdenO5ySCwuTUVg1Ij1pSGJG8MyYCv 3BGbttGNOv5Mz9jLHSKmUmEKnoNdFgPZrJkY+SELjAUQwIQXeajxWonNWwVabm3/DUR5 wnjcf8jbblInB7UF0wR56z4g801KfWDvrkpukGB2jku1tejp9g4QU0OH4t+3Tzwb9EVU ZJJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=X6j9hu+t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f21si8516223edf.336.2021.09.13.18.53.55; Mon, 13 Sep 2021 18:54:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=X6j9hu+t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231210AbhINBss (ORCPT + 99 others); Mon, 13 Sep 2021 21:48:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230109AbhINBss (ORCPT ); Mon, 13 Sep 2021 21:48:48 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8BA3C061574; Mon, 13 Sep 2021 18:47:31 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id n30so7936419pfq.5; Mon, 13 Sep 2021 18:47:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=wZqHoyadq44npl8Iti+BxptrXlSWbYpcF970LVVeoyc=; b=X6j9hu+tKaHtxvWbiO9+nifx3OR+ly2BXHSI8eMNTy5q9sShGeM79vednhO1IYoZe4 boIbuzhe2kioia/W9WZKr/a6/5CSi6TeXrE21Brb3EWJE7yQJruYU0twe6Je+Qrmp47H 8JyjQZxAV9sQ1eA+S8wHYtPHcnbAcGWJQz3dFwCHEt+WMsjEPQzLz+QSzF01efusBX0X gdev54VoEAb49LbS+h6Fa8vokgP7uCAhH3TNkXxWk3RXZEqhU8s2GhH3uSI6q2rc9jWk SkOcclxJTyDeVvuCPcatnrYMRndsdD01+sWJ/1OQ/Kfn1pc8+CQ1W9GISY5RW29FWc0Q n/zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wZqHoyadq44npl8Iti+BxptrXlSWbYpcF970LVVeoyc=; b=b2nIXRugYR+nNmgunLo+m1KrxLdTLuOLj6e4qY1hC8Rf2mNcEGqSBxFC4lb0ilgGEU 6rokpQsgqB3RehnKgkwA1JriLQ4LsL5A+YKPHmxO89Ly85KYHrEkRkMRZTDEe/PWJXbi lnwr6/wtk++Ll0BMJ9bRa+gYPuRjtXiKekuaY1Po0oJdTgvNoVMYLpme7y/BKyH38sGs O3NqwnxQg+XeYBk0vvmvvDSOVlcsHtTMZD5efgButWjLW1CuAIaBHpn0RWaGEox/TfSh ubqZ8lrdZDPQpSOLopxP2JVZrj8SW7A8HrmrBbiOOVZlRWI4R2e4rKyFe4X1/EmLdkZ4 PYaA== X-Gm-Message-State: AOAM530NApZEv6Hlg226CVHCM++0/VvlkxrifDVEQfIB6eW9hIp5uwPI hOMnbzry572z/dc7o5dmlJjlJy424VL6SQ== X-Received: by 2002:aa7:9056:0:b0:412:444e:f601 with SMTP id n22-20020aa79056000000b00412444ef601mr2282788pfo.84.1631584050925; Mon, 13 Sep 2021 18:47:30 -0700 (PDT) Received: from Asurada-Nvidia.nvidia.com (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id z11sm8270101pfr.157.2021.09.13.18.47.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 18:47:30 -0700 (PDT) From: Nicolin Chen To: thierry.reding@gmail.com, joro@8bytes.org, will@kernel.org Cc: vdumpa@nvidia.com, jonathanh@nvidia.com, linux-tegra@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, digetx@gmail.com Subject: [PATCH v6 0/6] iommu/tegra-smmu: Add pagetable mappings to debugfs Date: Mon, 13 Sep 2021 18:38:52 -0700 Message-Id: <20210914013858.31192-1-nicoleotsuka@gmail.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series of patches adds a new mappings node to debugfs for tegra-smmu driver. The first five patches are all preparational changes for PATCH-6, based on Thierry's review feedback against v5: https://lkml.org/lkml/2021/3/16/447 Changelog v6: * Added PATCH1-3 for better naming conventions * Added PATCH4-5 to embed previous struct tegra_smmu_group_debug into struct tegra_smmu_group * Dropped parentheses at SMMU_PTE_ATTR_SHIFT * Dropped swgrp->reg print * Replaced ptb_reg contents with as->attr and as->pd_dma * Added "index" and "count" in the PD entries for readability * Removed Dmitry's Tested-by and Reviewed-by for the big change from v5 to v6. v5: https://lkml.org/lkml/2021/3/15/2473 * Fixed a typo in commit message * Split a long line into two lines * Rearranged variable defines by length * Added Tested-by and Reviewed-by from Dmitry v4: https://lkml.org/lkml/2021/3/14/429 * Changed %d to %u for unsigned variables * Fixed print format mismatch warnings on ARM32 v3: https://lkml.org/lkml/2021/3/14/30 * Fixed PHYS and IOVA print formats * Changed variables to unsigned int type * Changed the table outputs to be compact v2: https://lkml.org/lkml/2021/3/9/1382 * Expanded mutex range to the entire function * Added as->lock to protect pagetable walkthrough * Replaced devm_kzalloc with devm_kcalloc for group_debug * Added "PTE RANGE" and "SIZE" columns to group contiguous mappings * Dropped as->count check * Added WARN_ON when as->count mismatches pd[pd_index] v1: https://lkml.org/lkml/2020/9/26/70 Nicolin Chen (6): iommu/tegra-smmu: Rename struct iommu_group *group to *grp iommu/tegra-smmu: Rename struct tegra_smmu_group_soc *soc to *group_soc iommu/tegra-smmu: Rename struct tegra_smmu_swgroup *group to *swgrp iommu/tegra-smmu: Use swgrp pointer instead of swgroup id iommu/tegra-smmu: Attach as pointer to tegra_smmu_group iommu/tegra-smmu: Add pagetable mappings to debugfs drivers/iommu/tegra-smmu.c | 312 +++++++++++++++++++++++++++++++------ 1 file changed, 262 insertions(+), 50 deletions(-) -- 2.17.1