From patchwork Mon Jun 24 19:28:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary R Hook X-Patchwork-Id: 11014001 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 414B476 for ; Mon, 24 Jun 2019 19:28:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3243F28A4C for ; Mon, 24 Jun 2019 19:28:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 266AA28A5D; Mon, 24 Jun 2019 19:28:38 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 9792D28A5B for ; Mon, 24 Jun 2019 19:28:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727521AbfFXT2d (ORCPT ); Mon, 24 Jun 2019 15:28:33 -0400 Received: from mail-eopbgr800089.outbound.protection.outlook.com ([40.107.80.89]:22208 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725881AbfFXT2c (ORCPT ); Mon, 24 Jun 2019 15:28:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2HzROVuo+Ed4kCzlmA9a1CBvYSbkvXUb3KAjeHCUTZA=; b=OVbQUJMFE21Yznx176yj92BN/7YVC2h12Zj1LsTQoTO4r2wKqoAfYJOU5Soj7T907Gh3QQ1I157uXDqRmn+sFf/94/6fyvu2P1vPSSSwR9WuMLfM60EnW4H5EvHQuuXUqko53Nm93nIVmD8UUpfBHQfX8HePm3vq2LXY6BN4kN0= Received: from DM5PR12MB1449.namprd12.prod.outlook.com (10.172.40.14) by DM5PR12MB1786.namprd12.prod.outlook.com (10.175.91.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16; Mon, 24 Jun 2019 19:28:30 +0000 Received: from DM5PR12MB1449.namprd12.prod.outlook.com ([fe80::180c:ff0c:37e6:a482]) by DM5PR12MB1449.namprd12.prod.outlook.com ([fe80::180c:ff0c:37e6:a482%10]) with mapi id 15.20.2008.014; Mon, 24 Jun 2019 19:28:30 +0000 From: "Hook, Gary" To: "linux-crypto@vger.kernel.org" CC: "Lendacky, Thomas" , "herbert@gondor.apana.org.au" , "davem@davemloft.net" Subject: [PATCH 00/11] Add module parameters to control CCP activation Thread-Topic: [PATCH 00/11] Add module parameters to control CCP activation Thread-Index: AQHVKsMBfYnvpmduqEKapWk+5yLilg== Date: Mon, 24 Jun 2019 19:28:30 +0000 Message-ID: <156140365456.116890.15736288493305066708.stgit@sosrh3.amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN1PR12CA0060.namprd12.prod.outlook.com (2603:10b6:802:20::31) To DM5PR12MB1449.namprd12.prod.outlook.com (2603:10b6:4:10::14) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [165.204.78.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e48c304a-5986-42ce-11b4-08d6f8da23a0 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:DM5PR12MB1786; x-ms-traffictypediagnostic: DM5PR12MB1786: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 007814487B x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(396003)(39860400002)(346002)(136003)(376002)(189003)(199004)(2906002)(103116003)(7736002)(26005)(6506007)(6916009)(53936002)(86362001)(6512007)(316002)(256004)(73956011)(2351001)(5660300002)(64756008)(66476007)(66556008)(66066001)(6436002)(66446008)(102836004)(4326008)(66946007)(25786009)(6486002)(186003)(305945005)(5640700003)(52116002)(386003)(14444005)(8936002)(68736007)(478600001)(2501003)(3846002)(71190400001)(6116002)(476003)(81166006)(54906003)(72206003)(81156014)(71200400001)(8676002)(99286004)(486006)(14454004);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR12MB1786;H:DM5PR12MB1449.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: W13n2rh6PzJo8IWdaNlsKbBi2TdKU7O1nDhwgIEX3fNH0WJXHkJsJ0bMny0ncDPkd1jcG6k1X6ZnYX5mW12BJ/6tbXhITQYkFk3ZbbspO0n9kmNeK69hlhqfyuP2C+LwuI7L0hWHvtCIirwarcpYpKj0GEo8Hc0X12cJTkoIVvs8ve+aT6HOk/x/HNWAcLb9VquxHggRiEfh3n1mpa+UFdy4kiQ/xcyTRjbcHRIWZSNcURI0K4cvhpfi3cwCfygT1bANrWs2YQMtRbETq9p6m4+b7rDDY753jxwtt63JasKT5FSmo8Mm+ZjPx1/kk71N6++FWYtRJhq42Yk/gksiigNLMqBR5s4mRY03HQh3lrfXMoMWcQNAIfXS4OI/eTxepkU70zHM1FlrZlmAwXEXl3HzILEHuq+yCYiWvf7O3rg= Content-ID: MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: e48c304a-5986-42ce-11b4-08d6f8da23a0 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jun 2019 19:28:30.6558 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ghook@amd.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1786 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 Firstly, add a switch to allow/disallow debugfs code to be built into the CCP driver. This rest of the patch series implements a set of module parameters that allow fine-tuned control over which CCPs on a system are enabled by the driver, and how many queues on each device are activated. Lastly, a switch to enable/disable DMA engine registration is implemented. The new parameters are also exposed in DebugFS (when enabled). Details: nqueues: configure N queues per CCP (default: 0 - all queues enabled) maxdev: maximum number of devices to enable (default: 0 - all devices activated) pcidev: Only consider activating devices with the specified PCI ID (default: unset - all devices activated) buses: Only consider activating devices on the specified PCI buses (default: unset - all devices activated) dmareg: Register services with the DMA subsystem (default: true) The maxdev, pcidev and buses parameters aggregate. Only activated devices will have their DMA services registered. --- Gary R Hook (11): crypto: ccp - Make CCP debugfs support optional crypto: ccp - Add a module parameter to specify a queue count crypto: ccp - Expose the value of nqueues in DebugFS crypto: ccp - module parameter to limit the number of enabled CCPs crypto: ccp - Expose maxdev through DebugFS crypto: ccp - Specify a single CCP via PCI device ID crypto: ccp - expose the pcidev module parameter in debugfs crypto: ccp - module parameter to allow CCP selection by PCI bus crypto: ccp - expose pcibus module parameter in debugfs crypto: ccp - Add a module parameter to control registration for DMA crypto: ccp - Expose the registerdma module parameter in DFS drivers/crypto/ccp/Kconfig | 9 ++ drivers/crypto/ccp/Makefile | 4 - drivers/crypto/ccp/ccp-debugfs.c | 3 + drivers/crypto/ccp/ccp-dev-v5.c | 24 ++++- drivers/crypto/ccp/ccp-dev.h | 17 ++++ drivers/crypto/ccp/sp-pci.c | 172 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 221 insertions(+), 8 deletions(-) --