Received: by 10.192.165.156 with SMTP id m28csp337778imm; Tue, 17 Apr 2018 10:58:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/VhlBuaVRJa5toKt9qdPSX9tb/kNb5jO4RknV8DmwwCpWxkFvJ25wjLv5UU+gmRwh91w+e X-Received: by 10.101.75.202 with SMTP id p10mr2572714pgr.339.1523987928156; Tue, 17 Apr 2018 10:58:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523987928; cv=none; d=google.com; s=arc-20160816; b=vZGZvbob0mPY1AV67JmophsFIWbYtU/9j2uLCjN+8ynx5pI7KC31CbqTSHm22BptwM avpdAQeygHNNCZJ8tJJZFWMsUQdU4hbI9yTTtPhw17GARIC/9lEj0TCO91KHbgrRkyoh 0Wb9bHVKtQJPzw9JcrQKOXPWDv/anrIUsWsVvtNEzUj99aQdr0bQT5mFoK2of0Lmzv8i n6SKKCIqlS8b5bAXeNOHr0tn5DFk6rzRBBaXgFHKJPjO7WUM0gvPs8jYnEe0N+4OuVpp 9EYcY280j9DEA6BG2MA+werzbGdRYgrfn7aFq5fIFUSZtlc5O9MW77Dlxa/hmtboL0Tn iIHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=eBZIqntyQP22C0AJMbw9V4NoURvgszXTO5s5A7BNJ0Q=; b=rGI8yZQxwym/WJ2GfBKVSoCNHkeok27IJXmmoPKCStlAxMJ4ahU9UUmzSt8Bhg+cMN Oe9gJKnEcfhQm3j/a/EzMLSQuX7sAccrArPbx3oAlqwQJvhbcoTVLzxEmkLIOpmE8GDa +iPOJ4JxCg2HZS4Ez8KDFJTmRKFsRreByJ3wMTHDBPJ4pZcNXg/CdaYnF3ndyM6nbSkX pKOz0LPb6zjVu7pCWZi4wxcye1Vomivna62/Eo+4oWCM1ngk1JEvpC2ig8lvybAKWGtm xzZw3fOxoSUZ0I1+MsXn0S+KWAY6X7faIp9HgEESsAUWpFxyj3dThHK3Hh372L/Hyeei equQ== ARC-Authentication-Results: i=1; mx.google.com; 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 t9-v6si4505469plo.592.2018.04.17.10.58.33; Tue, 17 Apr 2018 10:58:48 -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; 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 S1752580AbeDQRz5 (ORCPT + 99 others); Tue, 17 Apr 2018 13:55:57 -0400 Received: from foss.arm.com ([217.140.101.70]:46502 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751230AbeDQRz4 (ORCPT ); Tue, 17 Apr 2018 13:55:56 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1A58D1435; Tue, 17 Apr 2018 10:55:56 -0700 (PDT) Received: from [10.1.210.88] (e110467-lin.cambridge.arm.com [10.1.210.88]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 207243F587; Tue, 17 Apr 2018 10:55:54 -0700 (PDT) Subject: Re: [PATCH v3 1/2] iommu - Enable debugfs exposure of the IOMMU To: "Hook, Gary" , "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> <152302066417.47565.4017200105445420643.stgit@sosxen2.amd.com> <1523663790.2747.4.camel@intel.com> <10e422dd-a3ca-8ecb-50fa-e7f131a55a12@amd.com> From: Robin Murphy Message-ID: <80b1e9e5-3048-391a-6d7d-adeeece1bf46@arm.com> Date: Tue, 17 Apr 2018 18:55:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <10e422dd-a3ca-8ecb-50fa-e7f131a55a12@amd.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/04/18 18:36, Hook, Gary wrote: > On 4/13/2018 7:55 PM, Mehta, Sohil wrote: >> On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: >>> +struct dentry *iommu_debugfs_setup(void) >>> +{ >>> +    if (!debugfs_initialized()) >> >> This check is probably not needed. > > Ah, so it isn't. Thank you. > >> >>> +        return NULL; >>> + >>> +    if (!iommu_debugfs_dir) >>> +        iommu_debugfs_dir = debugfs_create_dir("iommu", >>> NULL); >>> + >>> +    if (iommu_debugfs_dir) >>> +        pr_warn("WARNING: IOMMU DEBUGFS SUPPORT HAS BEEN >>> ENABLED IN THIS KERNEL\n"); >>> + >> >> As this gets called for each IOMMU, do you want to use pr_warn_once? > > That works, yes. Or I guess you could just roll the pr_warn() into the previous if() condition, i.e. only warn when the singleton debugfs_dir is actually created. Robin. > >> >>> +    return iommu_debugfs_dir; >>> +} >>> +EXPORT_SYMBOL_GPL(iommu_debugfs_setup); >> >> -Sohil >> > > _______________________________________________ > iommu mailing list > iommu@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/iommu