Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3812172pxf; Mon, 15 Mar 2021 20:49:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysouptRh07yhFD8nD6HeTi9Qey65v9NQtPf90Pm9B18neG9G0ss6OJ3957amVDUQS1AHnS X-Received: by 2002:aa7:d9c8:: with SMTP id v8mr32861875eds.9.1615866573004; Mon, 15 Mar 2021 20:49:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615866572; cv=none; d=google.com; s=arc-20160816; b=XeLXlE0pjbyMZL2PxG3A3R3UftDDGLQ5vYc3xmA9yqZUsT2YjqDl/xmJ9XPNCV4zhG 8ozHayyNOQx/568L6i5zM4rXmaMCwk/9q0GSad93vEjOd7y/LavMzSX1LGByHI0peWAS JDm2tyskcjOkIUoyT8Vu3rR9TOyXCc2IW0Hv2ge6z80rdBGlw2Y6JW49u76j7CS2DW5t bVDwqN5nSfacSEWlVvn7ushbSp++fPfru/CFrjZK4ShIiIg6QoTf49HWxfTOZ4WIAbbU ngx7o57IxsTwzFFOAe0QqukuOecAyBen8gxUBEC5LlkfK208ZqrJT7Hlln/N/Zhooz2S B33Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rL3vKYH4+4i5CC0aVunrWlzK1wduuZG220EJ/vhziQw=; b=Gv/uOl4IyNxTX0wyJLSrKp+L25OFTrnMjxoKb5kyHmQul7SfF7cFvLuJx3k2ShIW1K N5Zs2gNdsHrgJAB9VhiEN1xSwfR6RS7yadBWV0vxvSSrHswSU/OIEnK8oaEW7kepax0u uxNuRiGSNAZ7oci0n/6pNj9hWk9tBD80Lmn/nZ4l2RC3c8StNwunlp/z1R9OEh8470Q8 B1pAJ3gM95lSj841JiaUaadTr6xEU7UXqC0XJ3ZSzB/yyMvRO5JfboDkxfdyFKcLXZ4B HKpIlQXjrGhpe8uMiR5OfE1tEhMNI+nzbqQkGhIDZ9MG2X5P2ZScIxj1ePS09/x/zJJi Mm9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ELopI56G; 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 h1si12678748edn.233.2021.03.15.20.49.11; Mon, 15 Mar 2021 20:49:32 -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=20161025 header.b=ELopI56G; 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 S233770AbhCOUCh (ORCPT + 99 others); Mon, 15 Mar 2021 16:02:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233968AbhCOUCM (ORCPT ); Mon, 15 Mar 2021 16:02:12 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4263EC06174A; Mon, 15 Mar 2021 13:02:12 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id t18so9390869pjs.3; Mon, 15 Mar 2021 13:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=rL3vKYH4+4i5CC0aVunrWlzK1wduuZG220EJ/vhziQw=; b=ELopI56GAtnJ9od1YG8FNmWchTUFYHQzQnDiLKLf6uFJ6rH401bfejAp18uGs91+1i GWgTfleCV6Uh5T2r2Pxj6Web9vw7JQJTQu2ly9AYPV7FqhK9lHHqPEwCmSFLrXt7xO75 b7MBkKnfT2hK7IVL5qsXRpWHDJZz9q7PqyhnurW04j3isnCcgZt4m1zgzxGireYB/1MD AhUISweOYG+oDxLUgzuZceLwibRCeMZ50hM9Gq0o67b8ySWu5W+45c89PUleZR0VCE1K WiJ1orcF8r8PVYuF3sNOXmBrIltsrTZy9K2zlTsqmEG9jdkuJNhEhU/P44raIFgYXE/F BPMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=rL3vKYH4+4i5CC0aVunrWlzK1wduuZG220EJ/vhziQw=; b=p6RTGzxI0dZi5awuezpxYrVMqzEFyQOv+XGSkCPVtmepWiDyYCWfIh7YtgMRscmWtK 0mnZoHBDo3e3n5rykxLUw5HtQWQ1l6zaHI2v98EMdxTMVzHI+XQ3T9q53IHHRNwpn22p FidjBi/Y3EKamo2lbvrM0AaR7ZIPQqrUEUq4Ubz3D57w6S58Y2s3Oif4Tn5vxE8e9q4R N+5318ogL3HERLi+aERL+OQkIBxFRC/lx7gZPkt/IiZkySWo9gdMDsH8gN/EsW+7fGuv PZAnt/uGaCSqB3+bv/JPGtofq8wNUXieRJgi8fhe9LNq37MY114quinFDW3Zw3gayAx/ nBtA== X-Gm-Message-State: AOAM533xxE4smeTxSX+voRE+ClRCqsnNQaVOGm8k3/yTWr+sivnRZjZB bErVfyIfvZWVpcY8tA1+Drw= X-Received: by 2002:a17:90a:9d82:: with SMTP id k2mr807500pjp.48.1615838531534; Mon, 15 Mar 2021 13:02:11 -0700 (PDT) Received: from Asurada-Nvidia (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id 11sm4712300pfn.146.2021.03.15.13.02.10 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Mar 2021 13:02:11 -0700 (PDT) Date: Mon, 15 Mar 2021 12:59:57 -0700 From: Nicolin Chen To: Dmitry Osipenko Cc: joro@8bytes.org, thierry.reding@gmail.com, will@kernel.org, vdumpa@nvidia.com, jonathanh@nvidia.com, linux-tegra@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] iommu/tegra-smmu: Add pagetable mappings to debugfs Message-ID: <20210315195956.GA16172@Asurada-Nvidia> References: <20210315033504.23937-1-nicoleotsuka@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 15, 2021 at 09:53:09PM +0300, Dmitry Osipenko wrote: > 15.03.2021 06:35, Nicolin Chen пишет: > > This patch dumps all active mapping entries from pagetable > > to a debugfs directory named "mappings". > > > > Ataching an example: > > Attaching > > > > > SWGROUP: hc > > ASID: 0 > > reg: 0x250 > > PTB_ASID: 0xe0080004 > > as->pd_dma: 0x80004000 > > { > > [1023] 0xf008000b (1) > > { > > PTE RANGE | ATTR | PHYS | IOVA | SIZE > > [#1023, #1023] | 0x5 | 0x0000000111a8d000 | 0x00000000fffff000 | 0x1000 > > } > > } > > Total PDE count: 1 > > Total PTE count: 1 > > > > Signed-off-by: Nicolin Chen > > --- > > Good to me, thanks. > > Tested-by: Dmitry Osipenko > Reviewed-by: Dmitry Osipenko > > > + for (pd_index = 0; pd_index < SMMU_NUM_PDE; pd_index++) { > > + struct page *pt_page; > > + u32 *addr; > > + unsigned int i; > > Unimportant nit: I'd keep lines arranged by length for consistency with > the rest of the code. > > ... > > + group_debug = devm_kcalloc(dev, soc->num_swgroups, sizeof(*group_debug), GFP_KERNEL); > > Another nit: this is a long line, I'd split it into two lines to keep > coding style consistent and to improve readability for those who have a > side-by-side code viewing setup. Sending v5. Will add your Tested-by and Reviewed-by since there'd be no functional changes. Thanks!