Received: by 10.223.176.46 with SMTP id f43csp1304044wra; Fri, 26 Jan 2018 15:53:41 -0800 (PST) X-Google-Smtp-Source: AH8x225p6CNR8DMRr7sinBWPOhDXSd4m+93W26YImWr/cYa4yUaFZn5ZhcoeWNBmRkIkdaYJBNjR X-Received: by 2002:a17:902:d90a:: with SMTP id c10-v6mr15932318plz.200.1517010821343; Fri, 26 Jan 2018 15:53:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517010821; cv=none; d=google.com; s=arc-20160816; b=brYjxYe5DabBrtZSHeWquT2C59gD4XdgK5mMHokwYefjmcxqCF3fkdFFdLZsE+BHLp 7ReGVZ5VWhHSBIjqPJMqY7kqI6LKdJM4a4koNrHdimrVb+lLZzGjztO9vV7/vtfINghY Ts5890Df/VLHX4B9a8NsLIdA8P3pYjW1XHmAdHOOri4qD0tWLj4BXSsXE3ZuSWXg2uQ9 peEbdaUELuVyAAa2Im5PADXhr8pXe4Yfsa6LCk0+dc9kC7D0zrqWEwK2Qm0IS8HDn+o1 gjdBKX/S9iUS+sm/5AtwQueq7okBPejxbUjw3ykr0vXTzlb8p1+SUA8wPzBnotpA6/Ql 0HyA== 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:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:dkim-signature:arc-authentication-results; bh=lJDXfnAlCI8+zlvihoFrdCuz0XudM/piLsZFONuVyIY=; b=iwmz2PV7Ck24plTdr64scT3OatRA4abVAwC1TMutNX1A4BZ0DV/8wpWZUjhl/TV51V wCxB0iO2oVGL50uT5p5GEpqpfUtUGRThkOhAA9zcTEhgzBLD0gaVJH3SN+VTAkxw9bKz qri+PmZ5lQjrH/5kCTe4GewxUJpr3NyrdZIm1v+Iztk+PXVSilcNuBRvoDfa92iZBw95 pFjYvisRvjOTRbN/jWLSjqvhexvKse9OvJmtkCZEq6gxOjyFHh5bWHXw3sq6B59YHGqm zxLxCv8n2xoEm2c4fi8qprCkS5ik+B63344CVQ/azMPnzCzr0FZRhgw39QwffHI7ycm6 4XOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=r40ScLNs; 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 m27si7124851pfg.64.2018.01.26.15.53.27; Fri, 26 Jan 2018 15:53:41 -0800 (PST) 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=r40ScLNs; 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 S1752622AbeAZXwp (ORCPT + 99 others); Fri, 26 Jan 2018 18:52:45 -0500 Received: from mail-dm3nam03on0045.outbound.protection.outlook.com ([104.47.41.45]:14112 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752383AbeAZXwm (ORCPT ); Fri, 26 Jan 2018 18:52:42 -0500 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=lJDXfnAlCI8+zlvihoFrdCuz0XudM/piLsZFONuVyIY=; b=r40ScLNszbWYrqgHAizI5HBMA6yCERw5sA8K3TWDuHcKJ59MaoehA7r7cvrbPIHo1hGvb3g5DLJIuvjAj5YO7SO1tH/uxM90VYEO/Ff58moh+OsHTUPiVZxpnXQkjrO9z4NXNTzqxVAGkMYOqR9G5w4OFN3qIaW6zePXk9CfEVc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; Received: from [127.0.1.1] (165.204.78.1) by MWHPR12MB1216.namprd12.prod.outlook.com (10.169.204.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Fri, 26 Jan 2018 23:52:39 +0000 Subject: [PATCH 3/5] iommu/amd - Add a README variable for the IOMMU debugfs From: Gary R Hook To: iommu@lists.linux-foundation.org Cc: joro@8bytes.org, linux-kernel@vger.kernel.org Date: Fri, 26 Jan 2018 17:52:35 -0600 Message-ID: <151701075592.16448.13505485878705952024.stgit@taos> In-Reply-To: <151701071164.16448.3611271062222336838.stgit@taos> References: <151701071164.16448.3611271062222336838.stgit@taos> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: BL0PR1501CA0012.namprd15.prod.outlook.com (52.132.16.25) To MWHPR12MB1216.namprd12.prod.outlook.com (10.169.204.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 17029cb3-7d40-4edc-7943-08d56517e2aa X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:MWHPR12MB1216; X-Microsoft-Exchange-Diagnostics: 1;MWHPR12MB1216;3:xArqZFW27lsto9XRr1d6N4GPzoa6Ye8pjiIvTYfh5FLI5y04FtT9ZP9fMzDFSNdKGl7bEUo16Ha6LPClYtybtRmc/dYclFFelloW09q4z4z4i6xx3MZBH3ZCwwUhuTb7u01uIghSG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29ghRGZnprr0jp8xnTrI48td8AzA1DsFp9IrX19YTLbWcamP7dVC294tjCMyqFcpfLID8S9YVjlDg6fpwQe75PMsf0XLl1CR6zTb51bxl80x6PxvgCaPkS/hvR+kvBNLxhYjRF1jPVJ6QdzLaaO2DUv6Prx38NsHSimDIOSKpZmzJ6vH16v0ahz1PuGVhnOOBgpS1kuKOGir8bnWIOlYaEVjMd2;4:0D7ACB/OqqQ7UC/gGIvrqCAi9J7xnugSuBzEJKcTKYsJ8uVCMUChavaSxPXuk75HUSfTstyXhJhzdsEh/PU0o+hOUkvkUbwxuqZD9O3kMhuKEAswo3Uu13PoO4w2ViWPyrSMC0Sy1mBKr526fnI2up7GpRq5/oahwx6hlBKIgxJwIAG4IJFXXfoPzHW8E7ZghFykzLGULBecka84sli+5NuzQQJkn8MFsoRaE5Bz2shcXst1Qdp2dyqDPwtxF0KuX9qr9MMsyF99eoaBeRm0xUV4n0KYEWpUiX2T6LWT61M8c9fe8tleQObuwNQzPRFa X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(8121501046)(5005006)(3231078)(2400081)(944501161)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041288)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:MWHPR12MB1216;BCL:0;PCL:0;RULEID:;SRVR:MWHPR12MB1216; X-Forefront-PRVS: 05641FD966 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(7916004)(39860400002)(396003)(346002)(376002)(366004)(39380400002)(189003)(199004)(2486003)(7736002)(6916009)(47776003)(86362001)(6666003)(2950100002)(66066001)(6486002)(26005)(90366009)(186003)(33896004)(16526019)(2906002)(52116002)(386003)(5660300001)(8676002)(81156014)(81166006)(305945005)(77096007)(76176011)(2361001)(23676004)(68736007)(316002)(53936002)(9686003)(105586002)(103116003)(58126008)(478600001)(2351001)(72206003)(83506002)(106356001)(33716001)(4326008)(50466002)(230700001)(6116002)(25786009)(3846002)(16576012)(97736004)(8936002);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR12MB1216;H:[127.0.1.1];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxMjE2OzIzOm8yV3ZtTGl5NGpZcGhaQk1GVmNPQmY3WUpk?= =?utf-8?B?eDdGcm91RU93bUpMS2dnbjFwMlpYS2xXTS9iUmloRmpZMVNQQ21Dei82bVdP?= =?utf-8?B?OW5uekFJKzNGeTVzcFp3SDQ2YzFaVmJHS0pUWDdDNk5kSDIzc09SazNWejdh?= =?utf-8?B?SW5sKzA4ekxIeHZVWDZGQi8xMncwSkUvUUR1YWM2MnROS0xwZ2E2Zkp1cXV2?= =?utf-8?B?RHJZby9ZTEpjdU5hWFlEcGVJL2FQV1B0N2M1cTRnYkt0ZllNMmphUmNvMnQ3?= =?utf-8?B?SlpMWHBmOUFSSVg5R1FkVFZWcUhMUHBlbWtQUWczU2NIZlJDUE05UnFaUjQ2?= =?utf-8?B?Q0xrUzJNVVpibmxzc1FTczFvQWE4Vk1NOVA4RVkzOFc0Z1dyVEJENThFdGxK?= =?utf-8?B?ZEpoNWdxOWRoeU5ieW5JRnYvZHVnRDdSSnEzb1dvdG10ZUUzdmd0K3ZJYml4?= =?utf-8?B?YXdwTzI1bUNDV2hNYlBGWXpwVmxlZHJEVkdSSnVsSE9MU2NIK3BOUUpvU3Zq?= =?utf-8?B?QjAxOCtvelV5SjFBOUZ1MUJaVmdkYmJYbFRyb1Q5VXl3eFJHbTgwWmRKQktv?= =?utf-8?B?K3Q0Y3l0dStIeTQ5ZS94V0ZuY0tpam5yWlVBMS8waklYWXJxalhUK0IyT2Zw?= =?utf-8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4pKQ6vFYrckiXFXRG98EnUkHmkhtf1tFXwWHpTrp0zESp6ljSb69Lcrce2Xv2Mms18/cWESywj4Vxx0L9m36fulSBg2El0iNNelj3J7tbCqzNlyylsSZUEAKDXAUIpmO9lEK3Up4buLaA6oh3mbrcQa1M SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;MWHPR12MB1216;20:Y+qpRHhfKd7kBKiBSrxj4vUvUUwsox4rS2205I2J2txbYz5ZsJ9pHL9LTO1gEGhbDKXLOX8JvqgCp5DJ96MYu22jWkFVufujjRudHcrVCD/gnNHB9vWoPNhmgpuazTFS1651pPekLmK11D/E7E0U36qC0XGijuXCBpnRiKUPyWP9ewjGXRGKBv5rF8KS2wJa6aHubK7YkLd7XolNjp2HXxhzS2OE7ldD130JqFVbF+roIMO1ql0Zl2MBG8/RVM49 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2018 23:52:39.6300 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 17029cb3-7d40-4edc-7943-08d56517e2aa X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1216 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Provide help text via a filesystem entry Signed-off-by: Gary R Hook --- drivers/iommu/amd_iommu_debugfs.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/drivers/iommu/amd_iommu_debugfs.c b/drivers/iommu/amd_iommu_debugfs.c index c449f3a7452c..5066d3976912 100644 --- a/drivers/iommu/amd_iommu_debugfs.c +++ b/drivers/iommu/amd_iommu_debugfs.c @@ -81,6 +81,31 @@ static const struct file_operations amd_iommu_debugfs_dtecount_ops = { .write = NULL, }; +static char readmetext[] = +"count Count of active devices\n" +"verbose Provide additional descriptive text\n" +"\n"; + +static ssize_t amd_iommu_debugfs_readme_read(struct file *filp, + char __user *ubuf, + size_t count, loff_t *offp) +{ + ssize_t ret; + + ret = simple_read_from_buffer(ubuf, count, offp, + readmetext, strlen(readmetext)); + + return ret; +} + + +static const struct file_operations amd_iommu_debugfs_readme_ops = { + .owner = THIS_MODULE, + .open = simple_open, + .read = amd_iommu_debugfs_readme_read, + .write = NULL, +}; + void amd_iommu_debugfs_setup(struct amd_iommu *iommu) { char name[MAX_NAME_LEN + 1]; @@ -115,6 +140,12 @@ void amd_iommu_debugfs_setup(struct amd_iommu *iommu) if (!d_dte) goto err; + d_dte = debugfs_create_file("README", 0400, + iommu->debugfs_instance, iommu, + &amd_iommu_debugfs_readme_ops); + if (!d_dte) + goto err; + return; err: