Received: by 10.223.185.116 with SMTP id b49csp241501wrg; Thu, 8 Mar 2018 16:36:16 -0800 (PST) X-Google-Smtp-Source: AG47ELsBELeytjsjIurEFe9NcOZ7IWeIlQs5NqEBQ4KcCn3fwDiHKmZv0ggkN3h3jIFpg2Uv+DOY X-Received: by 10.98.61.133 with SMTP id x5mr28204274pfj.181.1520555776501; Thu, 08 Mar 2018 16:36:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520555776; cv=none; d=google.com; s=arc-20160816; b=c5UdhC30huvQy6Y2Xzq+I6ilv22k/Vl9DgpZsan9pSjiweu2lh11AogV9bTcb/nUZ5 HQM4tmwcG6gFBQ/IXRlwJkjzq49+9IuCoX7QARSgogc6VuDF5/38jPI3b3rOsCp6TK0R bP9aPBMXPfEmwoDo57FuPVBrae+AzbTjEFdnbdd4smWW/8ETzt82Dx6RomBNRHsT6KCp cpoFLPCBCgMqJn5M2ZijQOFshJ6zVTd1KmNjYOR0uS8rL8wcEauMZaX+u66z+f1R2dnA LBSSQJmYzGcWOIn3ZniaSVfzIFHJ5gVKGw2HERTK/13aLTWgJ2/C2FsBH3gWRepRIl56 A7pg== 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:message-id:date:cc:to:from:subject:dkim-signature :arc-authentication-results; bh=otDdmeWFTnsAKhmZ58SP4cPBBpTQLWvrb8zPHTYpYT4=; b=mVQrNwjSDdzwm9sZx39TU/p2WGCnjOr3XM7aRCW+Gq6zUB775CiDQ0ePa9WItAjIAg NDkgipGczC4sFR7ulLIjOJVL/YOJttLe7KUZN4K13QeuhdioSxF9VO7cGmi341nFNWlv 7KCAxFu5XVube3T12T38R5IO8eu912rVDHLx2rzEIF5w6Z3vTpSwI8EFYvaOtsXqXj9L uEhlOssnl7Std84IHW7CtNHxqhgiFHmHdGXSGg/FWGCJrd9oJHKFftu86TrCFjjyIqCC jVkyjHYvnkiWaqLZe1YaqpH1cE2mjbCHgMoaizcV2tCqakTeWQUkDsaE4tBVpOFgtPfi Wccw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=zIyvywg4; 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 u16si16692922pfl.299.2018.03.08.16.36.02; Thu, 08 Mar 2018 16:36:16 -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=zIyvywg4; 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 S1751743AbeCIAew (ORCPT + 99 others); Thu, 8 Mar 2018 19:34:52 -0500 Received: from mail-bn3nam01on0043.outbound.protection.outlook.com ([104.47.33.43]:60316 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751237AbeCIAeu (ORCPT ); Thu, 8 Mar 2018 19:34:50 -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=otDdmeWFTnsAKhmZ58SP4cPBBpTQLWvrb8zPHTYpYT4=; b=zIyvywg4HwiEsz7ng70YMLRXaut16IA1oXCPYli5pX2GeuyhIJO8hsXRmBsCrdHvnNWkTzKIGIYxRSsJuBfd1pse7DJT+UuIqG5b9Rsa/AMAYaEqGUL2Q1nu3z94qSGpOU/rMyQBi8QrQ/KOyxN4jaPQcfEWXaXvK6c5hZfLRpA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; Received: from sosxen2.amd.com (165.204.78.1) by BLUPR12MB0692.namprd12.prod.outlook.com (2a01:111:e400:5951::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Fri, 9 Mar 2018 00:34:45 +0000 Subject: [PATCH v2] iommu/amd - Use dev_err to send events to the system log From: Gary R Hook To: iommu@lists.linux-foundation.org Cc: joro@8bytes.org, linux-kernel@vger.kernel.org Date: Thu, 08 Mar 2018 18:34:41 -0600 Message-ID: <152055568151.107515.8442872081731932876.stgit@sosxen2.amd.com> 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: BN6PR21CA0001.namprd21.prod.outlook.com (2603:10b6:404:8e::11) To BLUPR12MB0692.namprd12.prod.outlook.com (2a01:111:e400:5951::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2acc44a4-37e8-4b2b-1abc-08d585558ebf X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:BLUPR12MB0692; X-Microsoft-Exchange-Diagnostics: 1;BLUPR12MB0692;3:zm8uCqHvBmGVl2QxJ3z8zqbmqx202ELvGegKGhjO5okj2ujWxGtaH5i+/O/7UrBIJZfypIT3eqVgwLbKiP4WVFCuNaxUMy19+UoOm9OkkCsjW0yrT/2a6qaVU7t+HT4YuhE+KG/RLT9tHFFiMoHYG3n/SvzZ/QUfh2G7xd8/ZPkT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AZb7tenODciP5XGexHPe21w6LR/rYfQdvyy4qdaAo6s06IGtSjlnG43MmQHlG7+SQdPkjdOkO+8MIui8X7Q0t/FQNHM39BlnS7WvqXWQpMXmE0Y4Nk2sQwRTetXjkCB6O7KyL390kF02roCrJJkRrgRo/ksT4m7g/caKyp7AYQDX2;4:0N7uGLjoMX6fDbGOo6EvoKhuor385O7b3e17K8YeY/JQIxoX9Poe0y3hiUwJHym7FnchyaoiF62sCvhdC4tU+JXFX8FU0YMGLan++JMLbwjuWfp+KZLQXti9dnW+XlfC8Emloio13T0Trzl4C3Z6X/6ibwrIxhpiX5riFpv92Fz0m7DHXlWC5h/nL9WF2ENLHrEVk11B2HYqHPaoywwy1gmBwcDcT5f4WsexMvIvFuFEwoMwnk2uDdHkNQRvQL34VPBPeSgCquRKIZGHNlOlz39nfhM0FSWHXrinyWY2kT3cTLjWBUdVcycAt/u7XCmE X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040521)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231220)(944501244)(52105095)(10201501046)(3002001)(6055026)(6041309)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:BLUPR12MB0692;BCL:0;PCL:0;RULEID:;SRVR:BLUPR12MB0692; X-Forefront-PRVS: 0606BBEB39 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(39860400002)(396003)(346002)(39380400002)(366004)(376002)(189003)(199004)(97736004)(53416004)(386003)(81166006)(81156014)(4326008)(8936002)(186003)(8676002)(16526019)(105586002)(6916009)(6116002)(6666003)(478600001)(305945005)(72206003)(7736002)(2906002)(50466002)(3846002)(59450400001)(86362001)(2361001)(2486003)(23676004)(2351001)(55016002)(316002)(58126008)(230700001)(106356001)(66066001)(52116002)(68736007)(103116003)(25786009)(5660300001)(7696005)(53936002)(47776003)(26005);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR12MB0692;H:sosxen2.amd.com;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?MTtCTFVQUjEyTUIwNjkyOzIzOm4xdDZTZUhJUEk5SWpSWFM2T3Izb3U3OU9v?= =?utf-8?B?RXJpZzUxWnl4R0gwQkFqT0FkWVRYWno0K1pkZGliTGVlSjJuNlBnSlh5TG56?= =?utf-8?B?NUM2VzZBejBKaXBlQ3lpNkFOZS9aYUs0emRPek1nWmJ5Umw4YTJPR2swNmxM?= =?utf-8?B?Y0JOVDNXbndFWTVzNmFwa1JzenFGQS93SzVQeHUrNENTRUkxQ1hmaTRhZkN1?= =?utf-8?B?TjFKaWo1MUszKzE1eG95Z2hla2ZHM2RGZGVXcFJNcjEwU054VEovT3NweG1l?= =?utf-8?B?alhDMnBJelU2b0YyeERUWlovYjlxTXdmdHdVaHBUVWtTMnhsNGkrcU1xZGw0?= =?utf-8?B?bGs0bWhGRVQwb054UVFlN1dIc29UdzVLMXF6YjNmQURVVCtuaWw5ZmJqMEJy?= =?utf-8?B?QnhoVUlhWjlQYXRJMWkzWEZGTkNiT1kxRWVWNnVzYUcxdG1PbFcvWnJvV1Bu?= =?utf-8?B?UmJXNWg5UXNxajZuZUt2MTJ2aUF6Tkl3S04yS0orOEhXVVJGcENvUXNNZkFn?= =?utf-8?B?ZVJwd3BZK05SZEdUaUhrM2VhNWRlRjVXRGNzblp0cjdpZjVKWVMxQi85b0NW?= =?utf-8?B?bS9ZRVdCS1JzazJNTDFuVDkvTlVUdVNyNVFOQ1NUOUNWT015MUIvWDQ2Z3Uv?= =?utf-8?B?RGRScmg0ckYwekxsLzIxVTFVbXZFNXpBVFlSUi80VHpWb2lUSjhOelFmd0k4?= =?utf-8?B?eW41Z1NkZHhtajNCbS9iVkh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adata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BLUPR12MB0692;20:q2sFKwNvdShqpbdTkTyvQuqiaoCI6j9YA2EVlxWQ9upRxlqkXw0VjUo4w3mugMIdLGvecB4IZJELOndnv+4Wk4b0BeZIYdZTxw+DNifPaJSEgoQtewFugH8LtAoD8xwNe/+0LN1eI+A8ixVdI1WvnvqtcaCWvbM+qIM8QwF1op7nWH3nv14UtvTjza/BlqBWXSo8n73lQyux3ob6mhDdtbcjTBCUfI2k5gFrzIhWDv9dfDd03A99A6NjcUL9oHjK X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2018 00:34:45.2958 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2acc44a4-37e8-4b2b-1abc-08d585558ebf X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR12MB0692 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove printk and use a more preferable error logging function. Signed-off-by: Gary R Hook --- drivers/iommu/amd_iommu.c | 55 +++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 7389cc15d97a..7f4e82aed6a0 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -547,6 +547,7 @@ static void amd_iommu_report_page_fault(u16 devid, u16 domain_id, static void iommu_print_event(struct amd_iommu *iommu, void *__evt) { + struct device *dev = iommu->iommu.dev; int type, devid, domid, flags; volatile u32 *event = __evt; int count = 0; @@ -573,53 +574,53 @@ static void iommu_print_event(struct amd_iommu *iommu, void *__evt) amd_iommu_report_page_fault(devid, domid, address, flags); return; } else { - printk(KERN_ERR "AMD-Vi: Event logged ["); + dev_err(dev, "AMD-Vi: Event logged ["); } switch (type) { case EVENT_TYPE_ILL_DEV: - printk("ILLEGAL_DEV_TABLE_ENTRY device=%02x:%02x.%x " - "address=0x%016llx flags=0x%04x]\n", - PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), - address, flags); + dev_err(dev, "ILLEGAL_DEV_TABLE_ENTRY device=%02x:%02x.%x " + "address=0x%016llx flags=0x%04x]\n", + PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), + address, flags); dump_dte_entry(devid); break; case EVENT_TYPE_DEV_TAB_ERR: - printk("DEV_TAB_HARDWARE_ERROR device=%02x:%02x.%x " - "address=0x%016llx flags=0x%04x]\n", - PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), - address, flags); + dev_err(dev, "DEV_TAB_HARDWARE_ERROR device=%02x:%02x.%x " + "address=0x%016llx flags=0x%04x]\n", + PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), + address, flags); break; case EVENT_TYPE_PAGE_TAB_ERR: - printk("PAGE_TAB_HARDWARE_ERROR device=%02x:%02x.%x " - "domain=0x%04x address=0x%016llx flags=0x%04x]\n", - PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), - domid, address, flags); + dev_err(dev, "PAGE_TAB_HARDWARE_ERROR device=%02x:%02x.%x " + "domain=0x%04x address=0x%016llx flags=0x%04x]\n", + PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), + domid, address, flags); break; case EVENT_TYPE_ILL_CMD: - printk("ILLEGAL_COMMAND_ERROR address=0x%016llx]\n", address); + dev_err(dev, "ILLEGAL_COMMAND_ERROR address=0x%016llx]\n", address); dump_command(address); break; case EVENT_TYPE_CMD_HARD_ERR: - printk("COMMAND_HARDWARE_ERROR address=0x%016llx " - "flags=0x%04x]\n", address, flags); + dev_err(dev, "COMMAND_HARDWARE_ERROR address=0x%016llx " + "flags=0x%04x]\n", address, flags); break; case EVENT_TYPE_IOTLB_INV_TO: - printk("IOTLB_INV_TIMEOUT device=%02x:%02x.%x " - "address=0x%016llx]\n", - PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), - address); + dev_err(dev, "IOTLB_INV_TIMEOUT device=%02x:%02x.%x " + "address=0x%016llx]\n", + PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), + address); break; case EVENT_TYPE_INV_DEV_REQ: - printk("INVALID_DEVICE_REQUEST device=%02x:%02x.%x " - "address=0x%016llx flags=0x%04x]\n", - PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), - address, flags); + dev_err(dev, "INVALID_DEVICE_REQUEST device=%02x:%02x.%x " + "address=0x%016llx flags=0x%04x]\n", + PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), + address, flags); break; default: - printk(KERN_ERR "UNKNOWN type=0x%02x event[0]=0x%08x " - "event[1]=0x%08x event[2]=0x%08x event[3]=0x%08x\n", - type, event[0], event[1], event[2], event[3]); + dev_err(dev, KERN_ERR "UNKNOWN event[0]=0x%08x event[1]=0x%08x " + "event[2]=0x%08x event[3]=0x%08x\n", + event[0], event[1], event[2], event[3]); } memset(__evt, 0, 4 * sizeof(u32));