From patchwork Fri Jan 27 21:28:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary R Hook X-Patchwork-Id: 9542675 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 13DB3604AB for ; Fri, 27 Jan 2017 21:29:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05C76267EC for ; Fri, 27 Jan 2017 21:29:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6901281C3; Fri, 27 Jan 2017 21:29:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1626F267EC for ; Fri, 27 Jan 2017 21:29:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751661AbdA0V30 (ORCPT ); Fri, 27 Jan 2017 16:29:26 -0500 Received: from mail-sn1nam02on0084.outbound.protection.outlook.com ([104.47.36.84]:33048 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751258AbdA0V25 (ORCPT ); Fri, 27 Jan 2017 16:28:57 -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=qc8/TCX76N13Q1XZxEcvfki+ErvN9lfhYVr/eYtbAng=; b=xJd0T7ijHkiNarGBvcdYonwKqYZt0J6l9+J17kF/etA6S1OliizWuvYdZ1U2o04GZ8a6m+3BKQMuxR75Ps6xZvA0zFCnPdso0opKrxvk5GY120PaM03l1y1BO+mTn/5xJEUXTteK1y7S+dBVErDjYnLpl0Y1c7LMQNAI/I+ac90= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; Received: from [10.236.19.42] (165.204.77.1) by BN6PR12MB1395.namprd12.prod.outlook.com (10.168.228.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13; Fri, 27 Jan 2017 21:28:54 +0000 Subject: [PATCH] crypto: ccp: Fix DMA operations when IOMMU is enabled From: Gary R Hook To: CC: , , Date: Fri, 27 Jan 2017 15:28:45 -0600 Message-ID: <20170127212845.27618.32169.stgit@taos> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR03CA0050.namprd03.prod.outlook.com (10.173.137.12) To BN6PR12MB1395.namprd12.prod.outlook.com (10.168.228.141) X-MS-Office365-Filtering-Correlation-Id: 8ff298bb-359f-41f6-9130-08d446fb7f26 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN6PR12MB1395; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1395; 3:0/W9MBrp9QXJPyNaf2jJQHjHuRvVMa2K/I70pu5iGK8PEXc1EY4VdWn0EzmG9W0zRaFBbl2oLiUN/Ja2WCKdIGZWkxX5QhGPKSgwINysXEMeEdmXHFVmfY16e9Z0YGBuGHd9ktqN03CJ1Gls7dudFeQkxVTU0qXgAFpS1VjAQbH0cxNKq7mq8x7uI8vtIZLi4f7jO9e6UtnZh3ipUlPu5HQ3Ly9DNenQqr3vNB2v3EsU/iI8MeetTpGp10AJHZuGLBfBbmIOuX4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QGpRkUgaW2Gg/8r2u5dD+FPIhCaNYT8lOhhRNRXG54qNNRTVl+oLIZpHY8HuhykzAXuXnHGI/QR1y2LIbj/FK6kGEiDzES6NJ1LXL9ZSfy6sCawhDoBlOFpnp7yenp1P5et7SjIZP/3cz1lHO9+AgWcW4NAP33vkwCuDoQmvkusnKj9wQctOUI+4b4UNOIlmgaVzHA44A+SxdZzEjH13I4ubTF/Nnn7vsT X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(6072148); SRVR:BN6PR12MB1395; BCL:0; PCL:0; RULEID:; SRVR:BN6PR12MB1395; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1395; 4:+VFeXPq5lIcXUnnn9AnezT1PfrTKoI05+5ihjNWHaIfqWXF4IOtEAmGq7EENu0BvfNA5p+DoN52ChjzqiTBYvhWph0ZY9EEOMChKg1SgS0vmlTbvIZBMPdvzaF1f+6prnC1eroF3apThTrsyS7W5o/pJLwWzlpxPQE8bEnU2zcDdsyGG0IrCska5hrAcBbJdFVQw4sfFMi5HHs1eFOhBF9uxCvSl1aJ64OACBTIAK4oBOq4bYZYTjbvjIpAmFVZl82y5I3g5bix5GO7YTwmax3PXggJrCt1hXOU0RSk4u/xMz7nVc3p5JA91AJBSEKw+EYTmVYMIFTbyWduMy4RtSaEpIMfdobbyC3WY9i7cp+xPo34K8aqZNJM6wKP37V1GZlgYAvTg2ZQ2G3lEhUBhnnVBjMruaeIiLy6MV6voEX3l3AenGqIwgv30CLE1PZ7q1zyh5/vN2X7uACdJ3C4x/90rrfDxz9a1H7IDcjd96o2lacBbK+nJYrg0YvoLU3qg244WK8n6+caWDnvBEOS92WcQwbF8EkBwraupzy1qwOjJtfvm3yZeDV9MEdyR1DriZ7Aq5TpkCruCXYV7vhypHzFh7U4XOTzRbkINaca4F1CKSAhCl7HkK3Wl6J9MpH7j X-Forefront-PRVS: 0200DDA8BE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6049001)(7916002)(39410400002)(39850400002)(39860400002)(39840400002)(39450400003)(189002)(199003)(25786008)(103116003)(1076002)(2351001)(66066001)(54356999)(50986999)(81166006)(110136003)(68736007)(42186005)(92566002)(33646002)(101416001)(8676002)(6116002)(230700001)(3846002)(47776003)(4001350100001)(6916009)(97736004)(53936002)(97746001)(305945005)(7736002)(105586002)(81156014)(6666003)(9686003)(86362001)(38730400001)(189998001)(6486002)(54906002)(2906002)(77096006)(4326007)(33716001)(23676002)(50466002)(106356001)(83506001)(5660300001)(90366009); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1395; H:[10.236.19.42]; 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?MTtCTjZQUjEyTUIxMzk1OzIzOmJWZEVrOHpadW94US9TSE9SOHo4S2VtTFJL?= =?utf-8?B?eHU0U0FGOXBoYVBvT0EreGJ5b2VLVUZvY2tQL0VDR0NRN1E0ZW1Wd3pDRDZO?= =?utf-8?B?MGJmaGxCRXBscmJncjErRG5TRjEvOUlrYWhHRnNmREFBakU0eWVLWDBjV2tJ?= =?utf-8?B?cm5kV0xGcklHWVgxVmhkY2lzQ1NxL0x0RjU0SWVRL3ZuTlpGUVkvczlKZ1M5?= =?utf-8?B?NTdDOW9xQ3pkRmM1TlZSZjdrcEt6WkRadkd6L1NYZVVwd0JORXhnVFl2Mjgx?= =?utf-8?B?V1ZBQzV6TjJobHBhajlPbVhtR0h1Tjg1bHhWSG1zZG1EUTA5OE5FOUcxSnJJ?= =?utf-8?B?RDFVSk15MjU5RWhBZUpzK0hNbU96QkxqRHFORHNId2dMaE94anEwN0loalNX?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0gOpE8UXCfjPIvNw3WYsCO3pMd++0Q1DmpNKZNh1kBqJsuzDNDs3R9a1S9jM8e7z4Nh9uk43pN1Q7/23V6K3XPratqA X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2017 21:28:54.7479 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1395 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP An I/O page fault occurs when the IOMMU is enabled on a system that supports the v5 CCP. DMA operations use a Request ID value that does not match what is expected by the IOMMU, resulting in the I/O page fault. Setting the Request ID value to 0 corrects this issue. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-dev-v5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c index e2ce819..612898b 100644 --- a/drivers/crypto/ccp/ccp-dev-v5.c +++ b/drivers/crypto/ccp/ccp-dev-v5.c @@ -959,7 +959,7 @@ static irqreturn_t ccp5_irq_handler(int irq, void *data) static void ccp5_config(struct ccp_device *ccp) { /* Public side */ - iowrite32(0x00001249, ccp->io_regs + CMD5_REQID_CONFIG_OFFSET); + iowrite32(0x0, ccp->io_regs + CMD5_REQID_CONFIG_OFFSET); } static void ccp5other_config(struct ccp_device *ccp)