Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753999AbcDNGHp (ORCPT ); Thu, 14 Apr 2016 02:07:45 -0400 Received: from mail-bl2on0094.outbound.protection.outlook.com ([65.55.169.94]:65231 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753641AbcDNGHj (ORCPT ); Thu, 14 Apr 2016 02:07:39 -0400 X-Greylist: delayed 907 seconds by postgrey-1.27 at vger.kernel.org; Thu, 14 Apr 2016 02:07:38 EDT Authentication-Results: spf=none (sender IP is 165.204.84.22) smtp.mailfrom=amd.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=permerror action=none header.from=amd.com; From: Wan Zongshun To: Joerg Roedel , CC: , , , "Wan Zongshun" Subject: [PATCH] iommu/amd: Set AMD iommu callbacks for platform bus driver Date: Thu, 14 Apr 2016 09:28:53 -0400 Message-ID: <1460640533-3025-1-git-send-email-vincent.wan@amd.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.22;IPV:CAL;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(428002)(189002)(199003)(36756003)(5008740100001)(19580395003)(106466001)(19580405001)(2906002)(5003600100002)(50986999)(5001770100001)(4326007)(5003940100001)(33646002)(6806005)(86362001)(229853001)(189998001)(105586002)(47776003)(1096002)(77096005)(586003)(53416004)(11100500001)(1220700001)(50226001)(101416001)(92566002)(50466002)(48376002)(87936001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR1201MB1084;H:SATLEXCHOV02.amd.com;FPR:;SPF:None;MLV:sfv;MX:1;A:1;LANG:en; X-MS-Office365-Filtering-Correlation-Id: 2bd94505-eaea-4915-4aaa-08d36428f5dd X-Microsoft-Exchange-Diagnostics: 1;CY1PR1201MB1084;2:cYckvzjnRtpaRKk0RgcMD5p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dl0bqoSDS7/ms2LJL4hHxyYECCDnWwiP4as+PQnH6hHlMbwkaDKylauhn/F7gS8Ene5+j8XjGtyeYzeMYgXwobguyXRewBmBbOixh0qYWz8JxB86Pv7V5IzM6XcmgHvadnE+qG7e0VCPg2O5jKyN+SgkJq6omk380Ez/VT4KEhe0AnXADITR/YMMPofzz4NB8seKdzQOoZ+iCei8YPmAWv0hGQ1HUQcgD6ShKiX3vhd8Pk6IUpTpg1+prM5RzJRzbA4wbVpxRmvFnOwe64wLxC;4:unqQ/a0lUCiw+jmA73zbIiwUJlP6cZJTYBY2QtlQnriEW7Nq7Q3IOG1t0f9xQBzYiEIAI6qgcj5AQygJrY/EEqeyLBNI7qHjhdLZEvjAVu6J8sQU1D6Yg8gblkz4mIjuDq1hkkLIs2sW8xkXDttP+F/DSZzNiS21EcaKgQwttjwxOvPwg9524bvucjeXwRbS0B9ceTDp4rJf0COHU11Q7/UVoF2uCiMBiTQq7fgjC6vXpU+c9FzEjpXjWlJCqonhEIfPpitUPoGymXnDsmF6L8OkGJ+XR2tUeGNG15RcbLagPJygZ4nLAbBAo1ONz7dMfCp1N0xXt9g54d5nFjCZhIZuB2/2pbEjwmnL6+DTj0BZrgrJ9N6oiIgWDSk15Vegx0dgGAqNvGTyH4tkJXJocdBlhEsUd/MkhVUwjPjf+bQE+s6NjOqUVvCK/P2v/u7w X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(13023025)(13021025)(5005006)(13013025)(10201501046)(3002001)(6055026);SRVR:CY1PR1201MB1084;BCL:0;PCL:0;RULEID:;SRVR:CY1PR1201MB1084; X-Forefront-PRVS: 0912297777 X-Microsoft-Exchange-Diagnostics: 1;CY1PR1201MB1084;23:quOxiFCHN16c0tE21KECxLJCXU6HCnYxiOcFkcE86RU+ZWqdCftG+IsNtCZq+ki6e/pUZvOx5UuSvmdEqEwpbXIQ0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ESMVN3I/HCS271lmeorIFMceJcBT+sXBRG9UHFnERHOg/s9mNbHas+0SlAtXdhMAiCLaxOCc/BoMxoFrvq0=;20:CAuMudd9cc4EaSAkecPiQXLORfp1hbq7cQ8CISXCTuELZ+NC3XtFW2TAk0ksbJy1Skky66gb562mGFpcpT+8xw1+rVm3mQeQNn1WRJVOERO2Afx/wmTJ6QwNj4O0STMcQxP8/qVfUkc5GhAYhssNwsYJme5f6kYTxkPage1bM+EJmecajRaoPhpP+JYRykGgF0XIJV7FSRLtLZZ6rq/Bpi6PSaPKRFeTOzKT3wZLUm1hFVWldPJWeuJFmxX8ahRh SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2016 05:52:27.4199 (UTC) X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.22];Helo=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR1201MB1084 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 873 Lines: 34 From: Wan Zongshun AMD has more drivers will use ACPI to platform bus driver later, all those devices need iommu support, such as eMMC acpi driver. Signed-off-by: Wan Zongshun --- drivers/iommu/amd_iommu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index c430c10..547cdd4 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -2980,6 +2981,9 @@ int __init amd_iommu_init_api(void) if (err) return err; #endif + err = bus_set_iommu(&platform_bus_type, &amd_iommu_ops); + if (err) + return err; return 0; } -- 1.9.1