Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756200AbcLUL4s (ORCPT ); Wed, 21 Dec 2016 06:56:48 -0500 Received: from mail-by2nam01on0069.outbound.protection.outlook.com ([104.47.34.69]:26048 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753154AbcLUL4l (ORCPT ); Wed, 21 Dec 2016 06:56:41 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=George.Cherian@cavium.com; From: To: , CC: , , , George Cherian Subject: [PATCH v3 0/3] Add Support for Cavium Cryptographic Acceleration Unit Date: Wed, 21 Dec 2016 11:56:10 +0000 Message-ID: <1482321373-407-1-git-send-email-george.cherian@cavium.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0060.INDPRD01.PROD.OUTLOOK.COM (10.164.116.160) To BLUPR0701MB1699.namprd07.prod.outlook.com (10.163.85.13) X-MS-Office365-Filtering-Correlation-Id: 2c9d9fc7-1db3-4569-6ee7-08d429986c09 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BLUPR0701MB1699; X-Microsoft-Exchange-Diagnostics: 1;BLUPR0701MB1699;3:CStRG7iGWCIRbAuKbLv7s/CFfsg/1+odhPZn6qLZ54dhj3yso1WCjwyalFZ9zRK6jEA70AqvTXnPfGs8BaVC+POoYuY7930xhKHrQDPLvHPvEGvKOdpKRhijsUFpY1VgRRSZNeWM83+OtGxCzqbTq9DRPlvhTqvbaAt/6IwK10jY+lJXAzNoNAfRDRObdHTDJV0OwNkfG3jVUQ1tDDY4Qyai0kHbJt8RHkKE+g1ApFl/JVDKzExAurz+w2QAYevGiZp/U70dx61zq9k/hoEsyw== X-Microsoft-Exchange-Diagnostics: 1;BLUPR0701MB1699;25:pmwVqjpC2skSuFvUCrsMMeYmMgYBBJ5M92/S8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p0d+zhHyhyMCKuEriANwz3DU50LtW8OnRAv91jJP4o9k8Eh7ms7FRst7FgSjaFndOiCSZEm65ewu8MhC01mgYAqiMmCyHnNFnJIKa9uCQxbIsgghQlwpaDuZeUc5hmiUxawLN2vxaDtFc/5OcWs1egBJ7q8dWle5EZjnTVrJ68Q80uBiO8XJ0GpAVxHJKN6fH3OwVvG4h+LR8Ih0ryrB/SrjgDJ9WL4cARtCHLaysVpdcpXI3uUcBSne6eT6QmUPoNm9874pD1fRSQ7GsutHpkktlQlmoaq4qSlV3HEs+yCfLCpaSQFFX/5CS7dhy4uiG/EE6ojrEG/38nj79kl5BsKU4vQ0fGiZ1SuuZblunOqh//KWW/G4dRQtl0czKf7mJ4aF5etigzXQGclFmBybvxUReJ7JjLjEkADTuxolNuvK9eMaOJQ1L+DptHGFWZ/GYzaIfE/03yqAZeRKDl9PQrr5XuntdN X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(20161123558021)(6072148);SRVR:BLUPR0701MB1699;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0701MB1699; X-Microsoft-Exchange-Diagnostics: 1;BLUPR0701MB1699;4:MmPJslZWT4BEH0gt5xOYLew2+jzvBeFoDNXzYHHUm0xBHl6ZuK4G+ZQb8nynA31M0J8GwyWpzys1GLjMA4dwezyJudaCLCYvcKKsxn4pRfSTcAMPqF9238slMuBSQiLiItAF0w3/tQs7TGY4SCv8sIitLzq32j3F4pehkoBXr24mA4B8xgez2Df1MdydPbSBsHNh1dayvocV42zTNj6kgZq1YKYEnlbqCzy7L+Rq6svNoU2O8wpIlpRNIwdYMg31IhgO71KKj+26sFgCKCm90x0SygJDZV8WlCKR7jEH+Lo3C8+jAP1vmFx7Jd5kcDHlK5avfPnMBEzRt18fzdGuq6oimhtJdfhFaOTgvVtEgKawZc4MSe0nOHZGZ6ISuA/z9sIDdRRORvZp2Pyz34M/zOXm+yh6cY0GLsqavU1Jk+AfjhyA1R9Jf1b4IsEYxOgkU+m+EMSXz8/PxLtrqlI8gGayC2IQdhGG1A2mo5XMrbjhhAe3nle9LocD5QqoqKsYUHr9cBJIywDN43kPgsX/dyu3DDgEmS6eGvBBt5vBp6ujeluZhjhQiQaCKaJL1t1LRZ7YlzbCDQHaAsT7GDjBxu4M4J9GyMurlGiZRYfoP1Q= X-Forefront-PRVS: 01630974C0 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(189002)(199003)(4001430100002)(36756003)(5009440100003)(66066001)(25786008)(50466002)(48376002)(4326007)(92566002)(6116002)(3846002)(81166006)(305945005)(86152002)(81156014)(8676002)(42186005)(53416004)(50226002)(7736002)(86362001)(6666003)(69596002)(6512006)(6506006)(50986999)(68736007)(31430400001)(107886002)(38730400001)(5003940100001)(6486002)(97736004)(189998001)(106356001)(5660300001)(105586002)(2906002)(2876002)(101416001)(47776003)(33646002)(5001770100001)(7099028);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR0701MB1699;H:ubuntu.caveonetworks.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR0701MB1699;23:KAyAh7Xzj25bteCT6TCwUM/qB1O3udEwQUkFc+e?= =?us-ascii?Q?YLyIlaXAUchy+1N7HVGp6sBfBxA7yOA2yHHGnJIzLI9gdekh6c+6SSlddGOJ?= =?us-ascii?Q?hcvaQNi4I0rfHp3PgBHk3ka7jUhgoGw0t6WgLRn2yISBA/ftUtptPtRIUzns?= =?us-ascii?Q?tYZVJ4I9npJ3huW+/TY5VI4pULA4BpKxZeA2oh6NpO7h398TCg5w23OErWRt?= =?us-ascii?Q?a+xAhY28BLM/lp8xer+v81iVpNX5wMd9OrBo/CUN7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+usgWg6Sh4u6bWN8wzV/x6hPbR3vBcb3QQRvMCkdc0AGTLsMi7xEdz/3WH7PvP02Djy95ZWMryob1INzjKW14BoShhyfJr6KC4JWegUOAdKcuN/gGys4CZIddgDwDM0E+GXVertCnoSFufA1lVP1YfjdYwzK6fWILH/bbLT73lnNF7L8HqwWZD1N8h94nXoqMQWIdLdr46+H9Wjvo+ta/40pr3GOkjNlp0S6Pk9H+X47VxTXSqOUkIxcaYKsNn/kfGBUm0jicNS2op5Ds/4c+XXnqDyzVMoHpt3zdcgNl0bPbCXEv9lpAqTxQPqLOgd2ndSRvhdeqW7MTUPAVohX66f0IE9/PMQVVUVEw== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2016 11:56:36.8087 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1699 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3587 Lines: 66 From: George Cherian This series adds the support for Cavium Cryptographic Accelerarion Unit (CPT) CPT is available in Cavium's Octeon-Tx SoC series. The series was tested with ecryptfs and dm-crypt for in kernel cryptographic offload operations. This driver needs a firmware to work, I will be sending the firmware to linux-firmware once the driver is accepted. Changes v2 -> v3 -- Addressed David Daney's comments - There is not much difference in performance readq/writeq vs readq_relaxed/writeq_relaxed, so switching to readq/writeq variant. - Removed the useless bitfield definitions. - Use GENMASK,dev_to_node() instead of custome functions. - Use module_pci_driver instead of module_init/exit. Changes v1 -> v2 -- Addressed a crash issue when more gather components are passed. -- Redo the cptvf request manager. - Get rid of the un necessary buffer copies. -- s/uint*_t/u* -- Remove unwanted Macro definitions -- Remove the redundant ROUNDUP* macros and use kernel function -- Select proper config option in Kconfig file. -- Removed some of the unwanted header file inclusions -- Miscellaneous Cleanup George Cherian (3): drivers: crypto: Add Support for Octeon-tx CPT Engine drivers: crypto: Add the Virtual Function driver for CPT drivers: crypto: Enable CPT options crypto for build drivers/crypto/Kconfig | 1 + drivers/crypto/Makefile | 1 + drivers/crypto/cavium/cpt/Kconfig | 16 + drivers/crypto/cavium/cpt/Makefile | 3 + drivers/crypto/cavium/cpt/cpt_common.h | 158 +++++ drivers/crypto/cavium/cpt/cpt_hw_types.h | 658 +++++++++++++++++++ drivers/crypto/cavium/cpt/cptpf.h | 69 ++ drivers/crypto/cavium/cpt/cptpf_main.c | 703 ++++++++++++++++++++ drivers/crypto/cavium/cpt/cptpf_mbox.c | 163 +++++ drivers/crypto/cavium/cpt/cptvf.h | 135 ++++ drivers/crypto/cavium/cpt/cptvf_algs.c | 424 ++++++++++++ drivers/crypto/cavium/cpt/cptvf_algs.h | 110 ++++ drivers/crypto/cavium/cpt/cptvf_main.c | 945 +++++++++++++++++++++++++++ drivers/crypto/cavium/cpt/cptvf_mbox.c | 205 ++++++ drivers/crypto/cavium/cpt/cptvf_reqmanager.c | 581 ++++++++++++++++ drivers/crypto/cavium/cpt/request_manager.h | 147 +++++ 16 files changed, 4319 insertions(+) create mode 100644 drivers/crypto/cavium/cpt/Kconfig create mode 100644 drivers/crypto/cavium/cpt/Makefile create mode 100644 drivers/crypto/cavium/cpt/cpt_common.h create mode 100644 drivers/crypto/cavium/cpt/cpt_hw_types.h create mode 100644 drivers/crypto/cavium/cpt/cptpf.h create mode 100644 drivers/crypto/cavium/cpt/cptpf_main.c create mode 100644 drivers/crypto/cavium/cpt/cptpf_mbox.c create mode 100644 drivers/crypto/cavium/cpt/cptvf.h create mode 100644 drivers/crypto/cavium/cpt/cptvf_algs.c create mode 100644 drivers/crypto/cavium/cpt/cptvf_algs.h create mode 100644 drivers/crypto/cavium/cpt/cptvf_main.c create mode 100644 drivers/crypto/cavium/cpt/cptvf_mbox.c create mode 100644 drivers/crypto/cavium/cpt/cptvf_reqmanager.c create mode 100644 drivers/crypto/cavium/cpt/request_manager.h -- 2.1.4