Received: by 10.223.176.5 with SMTP id f5csp649570wra; Tue, 30 Jan 2018 17:11:08 -0800 (PST) X-Google-Smtp-Source: AH8x224PDRwQ6sG4+AEy/UrlA9R5tyM1Ni60d4jcW6DgCibALtkrgOtnWXMr76Uz7c8YqkV0rpQh X-Received: by 10.98.80.20 with SMTP id e20mr31775216pfb.148.1517361068368; Tue, 30 Jan 2018 17:11:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517361068; cv=none; d=google.com; s=arc-20160816; b=hycljQaJP1m3lWGKlF0ypwsi1i58whI5dRs2HZQtR+ObHjA709VYBodKLCi599fGyx qfZmOYN2MH1bMditKHV7vCOHoWti6X6hNkquIdAw+bE3sVF3wsfE3amWRv746xpqNrgr zt5/6z+sQzTzLA+RSDFH/ykdWvUQmnGk9WcCIRCxpaS/kPHTuFnENbQGM/gn4nSTnUJ5 M37VH5krY/W4R6dC+YZF+QcKUgLDTaU3TVd/uGdeU8ogPg9sjEpbQikkzC6yWYj3qu1N bBvbEsrwdzX4gXV4wAW+sJmdjzPIyIJhhzBlDKp4gq8bxG6sGGc2zOnabWadJ/h9N4hc 4xBw== 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=bbcZhyubTOLqPSbZJ2PtmSdg5NmosUZgE1Lgc+1LJrM=; b=OZV8V5Nv6kY7Acm6xE48hE810FUe+BjTrWYmjIq/fP11UilXCkZPusX+01aDBBj8hp KKTQho5GxFDqJdYcW32JikyqxIB1zWdabZoY+fSj45DcDGOisU1oV6ccHcKnJFcPIY+V r6LZTvGddR+OBzg9/PhQTj7ul8pBBrlKGgfbL5CWTA7VG37B50Bsx6gMXcxTrIBR3kUR U0JVf2PxMMPh4Fn2Scl/fFT6+JWQHesIZHhJs3btotS6o4W/RwH1yk27+HzG85pd/v7i BLYIh+/bbBuMtC6XCZvekq+nUqX8xH0GmfrRReUAJwJ9xOUF3z+70M3jNkPzjNtP5gjF YHSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=Bf8X6QEz; 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 d4si443324pgf.231.2018.01.30.17.10.53; Tue, 30 Jan 2018 17:11:08 -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=Bf8X6QEz; 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 S1752391AbeAaBEf (ORCPT + 99 others); Tue, 30 Jan 2018 20:04:35 -0500 Received: from mail-dm3nam03on0065.outbound.protection.outlook.com ([104.47.41.65]:34912 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751429AbeAaBEd (ORCPT ); Tue, 30 Jan 2018 20:04:33 -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=bbcZhyubTOLqPSbZJ2PtmSdg5NmosUZgE1Lgc+1LJrM=; b=Bf8X6QEzMBBQWH96U2NSMLQ4arA2ieiyzIkw+r1bEHRKxvhhrwtMJjVQAIiMf+NrCBTc7HxU5EJEqQHKmAXBUJI9e/cCy6hQc2ROVVtFcketqR9lr1to3PPDhCMcHs1BpPakuiUPYV8Z0BIRdwKWZM2u3NsocxhD8sbCf6ph7hI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; Received: from [127.0.1.1] (165.204.78.1) by DM5PR12MB1212.namprd12.prod.outlook.com (10.168.237.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Wed, 31 Jan 2018 01:04:31 +0000 Subject: [PATCH] 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: Tue, 30 Jan 2018 19:04:27 -0600 Message-ID: <151736066756.21649.4739957712713863861.stgit@sosam4> 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: BN6PR21CA0002.namprd21.prod.outlook.com (10.173.197.12) To DM5PR12MB1212.namprd12.prod.outlook.com (10.168.237.15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b07bd58c-f10c-47df-bfb0-08d5684695ff X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:DM5PR12MB1212; X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1212;3:huN/gKm8nHDZo8wQ32DHCxScYQZg6bSPby8lMsVT5bm5sntovb/vnqS27m2hVVlu7PlPDfFJdeWibS/DpCSJYLNR/q/P62yemwZL2itiV5dx4FehVGFdYaYopHpnymtfdC64Fg3b/uo6Rd0NQsKcv067LhQw6+u7sESowzKHd8jhH8AhY7xAWmFn9YN03Vu48OLixLiYwo1me6zrB9NfnjE/6Wi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dYhJb7XnMb3XHUV/kwpSIYfYuvuXnsK8FuE9ExIALtncY6EtlKqyXc9LbhBseqGIOcijl95Ddp0GPSFlqDiLMoaA7nvVFLk6HvH168Y+YG764+QQfZBpQi7H8;4:GSfqb37Y4CE+mNzbNmgNWYH1XIsPoT9ZWZqAlgnl46lHAe64Gsevr8wcp0iISYKirMkED4eCIPxescBnJxBKhByeOkXU3kE7HIKKci3g+GZKpjkFT0p7zw3qNJKhEikw57KsyOBNJAf5So6/FnwBFyjhQnO74b/ewOoF/maK3byy3mIMI8Tlu+Go0GHSdEx5q8Q+JXH4vQk7ItZ/5tFkGw6RGuY2uwraBk8ecfQuguFaRlmE+vRlBzXN9MzlBWO6Z0FkMd2kCpBO4AVRPDWYz0kJ7kA6MvL17ftarCkH4YUWCbTFbyRwKZlT8reM4I45 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)(3231101)(2400082)(944501161)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041288)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(6072148)(201708071742011);SRVR:DM5PR12MB1212;BCL:0;PCL:0;RULEID:;SRVR:DM5PR12MB1212; X-Forefront-PRVS: 056929CBB8 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(7916004)(346002)(376002)(366004)(39380400002)(396003)(39860400002)(199004)(189003)(16526019)(47776003)(83506002)(16576012)(77096007)(66066001)(8676002)(105586002)(186003)(72206003)(386003)(6666003)(59450400001)(230700001)(2486003)(86362001)(23676004)(26005)(6916009)(33896004)(81166006)(8936002)(50466002)(575784001)(6486002)(106356001)(4326008)(5660300001)(68736007)(305945005)(90366009)(103116003)(7736002)(2361001)(2906002)(58126008)(97736004)(33716001)(53936002)(52116002)(478600001)(25786009)(3846002)(316002)(9686003)(6116002)(81156014)(2351001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR12MB1212;H:[127.0.1.1];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyTUIxMjEyOzIzOlR5aExFajE1djRRVC9sR1NpSzB5S3lDQXZI?= =?utf-8?B?ejFvdkZqZ1NCNjhkdE9hTS9mWXhtd0g5SWN0WW5XQzhhbE9vNlBOdUN3NUhS?= =?utf-8?B?d0lRVVhmdFJRRVkrL0xkdHMwNmJ5ck1pajRwclhaMnRqVWlIbzB6MEJMRVBt?= =?utf-8?B?Y1FNTGo5RE8vTkszUlVybXBNSHYvVThKcTB3RTQ1NzZyQUtoMmVXWEtDUEFw?= =?utf-8?B?eDhDM1RBTkJUejNGS294QUl4SnAycGlQalVXUUEwYXBXRHorc2pjc1JOTTZr?= =?utf-8?B?UVExYWlFbnJHSCtOQndiczFRTGx2bU1CZDZOa05TTnoyeHBGcTFzRnorL2Ft?= =?utf-8?B?T25FcURrVEtIRlJsUGVwVDBsU3dwemliME1OMnJNYzBiUVkzNnNnOVlNSGVS?= =?utf-8?B?djVrczRjR3dkOUVGNS9wSE1FT2pPNUJPdk13emJBRkxwTVFNSGcxYktpdXh4?= =?utf-8?B?OURsT1ZjU1VFRHRUNit3d05lQXpwNWN3YytNdG1ibWgwaUwzTUFmVzJ6aUdD?= =?utf-8?B?N05nZWN0ejl6YUw5cWtLY3JTQzhnNG5Eejk1eERhSnJRckRSSU10WU0wQUJU?= =?utf-8?B?UGkrQkFOTVYxRk5wNVI5UUhMcDFRbTJ5amVRVld6V0JCTjMzS2xtTGdGbmpo?= =?utf-8?B?S2l6Skd2SlR5NUtJRklhNGE0cGpqUTE0UzhDemVDNVFkTXFncWpWVkhZRFha?= =?utf-8?B?TE5IRjFvN0VWYXRGbGxnU3NJNFBwQXhDL0xWdFkxZ0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EikmGkYCbGV2N1+G2hoq9KU4d8WoccREFC6FM SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1212;20:WDZ1oHOkSe1HBCjJlxjF92mdIjHfBp1xPWdc9uO/uIIkEeXhP0LosjfU1sNkY4aiK41r5AK81zR34HhxNe5+VicMbQUYgd9eRYBAicrA5jnyiza4MdZmquOoXRteXT/J2G8msv5Xb+QI1Cd/MyHxyCUH3rQ+bS272Tyj+koV/n7y8oU7pZnQ1m+zUX/pKOksnXhgeHnWFSshXzVQZjTq9CMH5jDEbWNgoAL4HxlWJXhQ4lW9oXPOwXf7zuMHIXIq X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2018 01:04:31.0421 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b07bd58c-f10c-47df-bfb0-08d5684695ff X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1212 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 | 56 +++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index b58e0a745b7f..90a61f546bac 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -546,6 +546,8 @@ static void amd_iommu_report_page_fault(u16 devid, u16 domain_id, static void iommu_print_event(struct amd_iommu *iommu, void *__evt) { + struct pci_dev *pdev = iommu->dev; + struct device *dev = &pdev->dev; int type, devid, domid, flags; volatile u32 *event = __evt; int count = 0; @@ -572,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));