Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp313102imm; Mon, 4 Jun 2018 18:24:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ5bMok7+oVAcwGgdZUNLOMiiaUnK10MSEhTMV4U1d284f9SGhspUtpAg01AuB5sRLUaxnj X-Received: by 2002:a65:4d47:: with SMTP id j7-v6mr18759853pgt.19.1528161891913; Mon, 04 Jun 2018 18:24:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528161891; cv=none; d=google.com; s=arc-20160816; b=ZHarpq4q+1k3ysDDeIJZDZ106j+OTAsNB6RS2/33hVwNGqFhyPQxBpORZs2+IolFKy dWzO3Wtn4LbMNmnlQzVlszrbO+AB1mAx0N/CuJkF/YkZ11rGIj+6vrhMDKZKZFmKyoGR vbEBgMHHiczIEW/vVo0e9kpIn8KABKBsY+t3Xm66dTNodkXM/mfxJz4MYwRUN+1QacLS QTmO49l5qOKBCHCrj09gXSl3JTXzhXwArvUBVB9db+E7PWD1tRTmPmTX8I8OoTNTO5Bu KGEnPVJSl/EfjXMnGwgR7SfsOPKcZ0Y8zS7cMZViRrmNEjbCysz5zr0k0slKprTYzfeM 1oDg== 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:dkim-signature :arc-authentication-results; bh=XEk+X7Dg2J9PZrMnH5HsGQQfEuw60ocAjDYhyxZq9aw=; b=SIfIp0Y18X6W2iE0/7kJwtyjAKgZYR3XtapzlN3Sp6xIJDlSq/JDZ8rsq7bpCjMc0j /CA0cMGpOJW5U4Pq5dyjHx7gw11DqWQbHtCGc2zYOoNlArL+MjFmKLtzYIuyhHdCoRPo ji0RSLEApKa0+YFwGeVC02CMvIrtXClFz+KHx/E8YO3UQsaYAFTz/yfkkIVDzspKHJAr BNRle7A8BXk8ZcLBdqa6hYSnw5LftlWOfHDIk0EvZSP1UoDFx5Vm6k/eY1BAnI16KQZJ Nq2PfM0YwSvzORYiJF2KPkrMfJgvF6M3Gh4mcOvGONXHLp3F5etrfd4vGYT9JKxytfw1 sHog== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Ot4vq/Zq; 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 y3-v6si6691690pgp.102.2018.06.04.18.24.37; Mon, 04 Jun 2018 18:24:51 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Ot4vq/Zq; 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 S1751396AbeFEBXu (ORCPT + 99 others); Mon, 4 Jun 2018 21:23:50 -0400 Received: from merlin.infradead.org ([205.233.59.134]:52180 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750899AbeFEBXt (ORCPT ); Mon, 4 Jun 2018 21:23:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=XEk+X7Dg2J9PZrMnH5HsGQQfEuw60ocAjDYhyxZq9aw=; b=Ot4vq/ZqTrvaQU+3BgpVQnWS7w H1vhoyl1OI9jUlctQ31phlisa1UsV/zjxNDi47TFeV306wdy5Sz7PDr8b5txKJ/92Ez5Vbw09gTju vHWc42TQmeb40hsPZtyEKGD2jV1SXn019EBUD735krGSDifW1QbNAPbaZ9QVboPCGgyCQTbzBv05k GTEFJePMtaN8HKa+Dyj3/xSMR5tv2Gn5oairtTNP0NTgbjVYULh1yVLxmh4LTKZdRuUy77ZvI7amX YEE8e3nChdAiEaX6BX2YqrXai0pC9g0pUsMdTIM+Ux1DKp+iwy/xkEBgmZejU/cMml8JUlQb/UgHt qHnYa7Ug==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fQ0hL-0001UL-NV; Tue, 05 Jun 2018 01:23:44 +0000 Subject: Re: [PATCH v8 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU To: Greg KH , Gary R Hook Cc: iommu@lists.linux-foundation.org, joro@8bytes.org, linux-kernel@vger.kernel.org References: <152761784341.2654.8609366076331539902.stgit@sosgrh1.amd.com> <152761820371.2654.4551405686504157036.stgit@sosgrh1.amd.com> <20180529183917.GA10618@kroah.com> From: Randy Dunlap Message-ID: <9713a0b2-1450-7783-712f-ba27f8a09b2b@infradead.org> Date: Mon, 4 Jun 2018 18:23:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180529183917.GA10618@kroah.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/29/2018 11:39 AM, Greg KH wrote: > On Tue, May 29, 2018 at 01:23:23PM -0500, Gary R Hook wrote: >> Implement a skeleton framework for debugfs support in the >> AMD IOMMU. Add a hidden boolean to Kconfig that is defined >> for the AMD IOMMU when general IOMMY DebugFS support is >> enabled. >> >> Signed-off-by: Gary R Hook >> --- >> drivers/iommu/Kconfig | 4 ++++ >> drivers/iommu/Makefile | 1 + >> drivers/iommu/amd_iommu_debugfs.c | 39 +++++++++++++++++++++++++++++++++++++ >> drivers/iommu/amd_iommu_init.c | 6 ++++-- >> drivers/iommu/amd_iommu_proto.h | 6 ++++++ >> drivers/iommu/amd_iommu_types.h | 5 +++++ >> 6 files changed, 59 insertions(+), 2 deletions(-) >> create mode 100644 drivers/iommu/amd_iommu_debugfs.c >> >> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig >> index f9af25ac409f..ec223f6f4ad4 100644 >> --- a/drivers/iommu/Kconfig >> +++ b/drivers/iommu/Kconfig >> @@ -137,6 +137,10 @@ config AMD_IOMMU >> your BIOS for an option to enable it or if you have an IVRS ACPI >> table. >> >> +config AMD_IOMMU_DEBUGFS >> + def_bool y > > Why default y? Can you not boot a box without this? If not, it should > not be Y. > >> + depends on AMD_IOMMU && IOMMU_DEBUGFS >> + >> config AMD_IOMMU_V2 >> tristate "AMD IOMMU Version 2 driver" >> depends on AMD_IOMMU Gary, By far, most driver-debugfs additions are optional and include a user Kconfig prompt so that user's can choose whether to enable it or not. I suggest that the way forward is to fix Greg's debugfs_() api comments and to add a prompt string to AMD_IOMMU_DEBUGFS. -- ~Randy