Received: by 10.192.165.156 with SMTP id m28csp320461imm; Tue, 17 Apr 2018 10:39:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+Qd5Jn1pD8caNpW7GkYCcyMjf1SL8uAv8+c7dxaR7GWQZLFf8mG7jwbgWBOyWrXHAUHmAn X-Received: by 10.98.56.144 with SMTP id f138mr2807159pfa.173.1523986778197; Tue, 17 Apr 2018 10:39:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523986778; cv=none; d=google.com; s=arc-20160816; b=tPzC/I2kVZd6jROQ4F3ugETO5re67Y2pWp7+bvc4Fhgqe8nG1RaSU4qzr1MT4Oj6CT xoZREhJI6+N917sMwQPyUYIBFu4W71zH+0xNDrwseLJSJ0kXlhchZCIvPo+slfBnEpRe 39DZmKm6+McLQI9OxrWRWTBJxdIFCcggNz419lIsOwnMc/+MCKsiXsGv47Hvd5bPtWdF JiRru9Doeo3zAf3wNoVFUMKpQhuBgxUXTpzDXbnpZTdzdpLqSIyBr8Ft3sTbODZ/+W++ E1UFq8BdppUJfj457w0OJEAdUUfohpEFAMFOyWPt8VikO2T9pLRYi1nNBXJlYkU5MdZM rBLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=C2JzEEoHiHbTs/+rUkPnnCx0iFOKNFRwZ/kTQ1KQck0=; b=rVkeyoXVn9pGx9vkIjrwCIdMGqKML40JF0YGKGE4lPpwlh9ItzLgmVi+ny12a3hcQI S/6GAz1ocwKtRH1Z/MTVG1RwBFnh6HbiSZSltkJo6a6bxRcUwZscM7d7JlH+xRuffqz0 DpAZXsMvOAn31TYb13c5QYoCj662e2n6kD77DRAXewgiiuTHa0QWc3q/0KuXBxGLIYbW 7g8KvI//x5BKwtoD1fAExZlfkMczKjpvSiO6pPOGq6ofl6YTUIimSu4BQYrfU2n5UscO 5QKYZYR/9o2YM1M+fQKeFosgH+HCTpWQXM5/o/aj4l6RJer9ATQ+D/VD12EWPEI4ud07 pzQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=CsWduFQN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si10365786pgt.52.2018.04.17.10.39.23; Tue, 17 Apr 2018 10:39:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=CsWduFQN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752619AbeDQRiN (ORCPT + 99 others); Tue, 17 Apr 2018 13:38:13 -0400 Received: from mail-bn3nam01on0062.outbound.protection.outlook.com ([104.47.33.62]:19424 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752043AbeDQRiL (ORCPT ); Tue, 17 Apr 2018 13:38:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=C2JzEEoHiHbTs/+rUkPnnCx0iFOKNFRwZ/kTQ1KQck0=; b=CsWduFQNSBESJ5xTtAUeP12ZIYO9UEJajlYG5HM3Vdg2mKPjZoHVtddV3za0CbiH5lJI9b+bMCNYyEWEoQ2BK5hxMrTHqixCfx/qyw3LuuYCaOEgehI3JaUGfhUZ/aY5mZf8AOppstyWToxl3YIFwlKmZrsMwknMMyYUqrb/qZs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; Received: from [10.224.10.182] (165.204.77.1) by SN1PR12MB0702.namprd12.prod.outlook.com (2a01:111:e400:c42a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.14; Tue, 17 Apr 2018 17:38:08 +0000 Subject: Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU To: "Mehta, Sohil" , "gary.hook@amd.com" , "iommu@lists.linux-foundation.org" Cc: "linux-kernel@vger.kernel.org" References: <152302042701.47565.17954813724758433858.stgit@sosxen2.amd.com> <152302067362.47565.628887796165116844.stgit@sosxen2.amd.com> <1523664612.2747.13.camel@intel.com> From: "Hook, Gary" Message-ID: Date: Tue, 17 Apr 2018 13:38:04 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1523664612.2747.13.camel@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CY4PR1801CA0034.namprd18.prod.outlook.com (2603:10b6:910:74::47) To SN1PR12MB0702.namprd12.prod.outlook.com (2a01:111:e400:c42a::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020);SRVR:SN1PR12MB0702; X-Microsoft-Exchange-Diagnostics: 1;SN1PR12MB0702;3:XvWRomorwNwpfC4bKSackQm7iQm12y5PqUd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LfzyqtLQ7PvAcXs/fWXsOegrgkmiS12CmBw/zDmdl4/hCpm3uCCrYbWvh/c24wi7CRGiCHk1FWR+rADpvGfGTm5y0TWkBvxEr+ga03TE7nw+Nv/fiU2n3n7It593TSJBwm5yH1F6XF1rB7kthrZaKgPGQfsTp+lJFivPbBBOi6iIhRapB40m4Cp30XcMe5JO1vXCLe0uCkH3itu5+uBr0NIAyMaIjdo6aJSGlyLMvmi/SdFR5f7437Zipz27bpdhJk7ll9vib+2D8yKZrjCdp+/AgI8GoCOypsPpugKf1IxWI9C8i++nkvCJXR;4:hqmkxdXGDQ+8YSQaAMD0D3Ug79To0WSAG8m2c73lDdoRtpPB5KYMZFNHlVFo5Ae7JmPt1hjT4eNP8HowTl1j8z5wjzdlaTC4vac0iq+WHCGBK8ictbA2QBjgYs+nxBv1Cncbg4Vq8av9zF/4navotRcpuuWP+LTpqWhad5xdXi6UuMoQIqsBZGD2tbHkcI9gXRAieJniqTf1ab0Wwlt8V7PJSqbrl06Mpu5W/X4+IoHvYXxAdf5/938DwNALnTlF1HuI4yAXbGvIsqfgvc9pCQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231232)(944501327)(52105095)(10201501046)(93006095)(93001095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(6072148)(201708071742011);SRVR:SN1PR12MB0702;BCL:0;PCL:0;RULEID:;SRVR:SN1PR12MB0702; X-Forefront-PRVS: 0645BEB7AA X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(366004)(39380400002)(376002)(39860400002)(396003)(346002)(377424004)(189003)(199004)(16526019)(64126003)(106356001)(105586002)(8936002)(6246003)(53936002)(31696002)(25786009)(65826007)(81166006)(81156014)(3260700006)(8676002)(72206003)(58126008)(50466002)(16576012)(316002)(65956001)(97736004)(68736007)(6666003)(47776003)(65806001)(31686004)(66066001)(110136005)(2201001)(6486002)(5660300001)(229853002)(2501003)(52146003)(23676004)(2486003)(2906002)(53546011)(7736002)(476003)(67846002)(478600001)(3846002)(956004)(386003)(26005)(2616005)(52116002)(446003)(486006)(11346002)(77096007)(6116002)(4326008)(76176011)(305945005)(59450400001)(36756003)(2870700001)(186003);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1PR12MB0702;H:[10.224.10.182];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtTTjFQUjEyTUIwNzAyOzIzOk9wMDJaTlJwY0pBMG1mUTdjNkRKNk9DTkh3?= =?utf-8?B?amJBcEdGdmhEY2NMLzZub21BeEV0RU9DcG1yM1J4amJWTnozQXZvSzlscFdv?= =?utf-8?B?MnUwNzlKbUJObHpmU1E3eDRyUHMwUXpHbVMwbVVQRjJoaEl6TjlqWlBEWjBZ?= =?utf-8?B?dTV0ZFRKdzRYWmFGOTlxVitNWHZUY2tBZ1BrUkJOdkFIcVN2Vm5FQ1g4Q3Aw?= =?utf-8?B?K2ZhSkhsTnIzY3ZYN0J4Vzhsa3d0RlN5Z0RXU001b0hLYzRLa1pRZGNzU3BQ?= =?utf-8?B?dzFSZlNWc21BOUJuR1B0aUxQenVWNko5a2RTQlNtUFpmRmU0amllQUd5ZjNj?= =?utf-8?B?Z3NBc2EyTXpudkhXWFVVNHRqcXI3NkwzOU93QTYzN3h5emsxVjBZVllkSVMv?= =?utf-8?B?Q3lKZ3NiOXVORjYwa3J3SXREZEhsZlFieVR2VTV0MjlpbGw2R0l1UmRxUlUy?= =?utf-8?B?QlBzekl2TzNGR3NVaEV0bUVQOFRnN2oyOGMyV0creG1ZTWxmTzZOb3Yza0lS?= =?utf-8?B?OXRqNWpnYWtKaitZUnRBQmJJ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onzIoBpIQgQ2KIo0pHnbJs5uiF65rnsPRXAJNq9Cimetb/mDvWDLMiS4pBFud837iHX8m8tXimKkK61iTDcyfK80gAk6P8XScClgOtIR5Ls7/8bBSfPwc3pNO/fEpZEr1A59BtRPQr+4GzjCz050tSCXBwz3/13h/JjnnSqTwNRAIduU2uIZUH2Db0+nH1q7H2/nUQQWGaAhcYAGohl4ADhZfOxFLPeUzk38EYFyeUmNEgQS4XDv0mgRzq X-MS-Office365-Filtering-Correlation-Id: 6b94e719-9bc4-4f30-5581-08d5a489fc49 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2018 17:38:08.4963 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6b94e719-9bc4-4f30-5581-08d5a489fc49 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0702 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/13/2018 8:08 PM, Mehta, Sohil wrote: > On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: >> >> + >> +void amd_iommu_debugfs_setup(struct amd_iommu *iommu) >> +{ >> + char name[MAX_NAME_LEN + 1]; >> + struct dentry *d_top; >> + >> + if (!debugfs_initialized()) > > Probably not needed. Right. > >> + return; >> + >> + mutex_lock(&amd_iommu_debugfs_lock); >> + if (!amd_iommu_debugfs) { >> + d_top = iommu_debugfs_setup(); >> + if (d_top) >> + amd_iommu_debugfs = >> debugfs_create_dir("amd", d_top); >> + } >> + mutex_unlock(&amd_iommu_debugfs_lock); > > > You can do the above only once if you iterate over the IOMMUs here >  instead of doing it in amd_iommu_init. I'm not sure it matters, given the finite number of IOMMUs in a system, and the fact that this work is done exactly once. However, removal of a lock is fine thing, so I'll move this around. > >> + if (amd_iommu_debugfs) { >> + snprintf(name, MAX_NAME_LEN, "iommu%02d", iommu- >>> index); >> + iommu->debugfs = debugfs_create_dir(name, >> +     amd_iommu_debugf >> s); >> + if (!iommu->debugfs) { >> + debugfs_remove_recursive(amd_iommu_debugfs); >> + amd_iommu_debugfs = NULL; >> + } >> + } >> +} > > -Sohil >