From patchwork Thu Jun 1 11:03:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 100884 Delivered-To: patch@linaro.org Received: by 10.182.202.35 with SMTP id kf3csp699899obc; Thu, 1 Jun 2017 04:04:53 -0700 (PDT) X-Received: by 10.98.155.28 with SMTP id r28mr548231pfd.198.1496315093839; Thu, 01 Jun 2017 04:04:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496315093; cv=none; d=google.com; s=arc-20160816; b=sChN0bt+1Bos/9KVNP93rrzVWlELwUDlzfXlht4pzxBKrhRiaU3m2myeRSuWFV5w7g 6/WZbqSJYAsw6vCh2wncwTeEuQtzQrYnsqcIgQ3Gr3s3iX04LjapODBFa5wvG7wNUW86 WhCslNrsMm6jIi9yUifl+8IiWJBaEyB12ae4QmocwDHXDKRSrdLRSZV4F6krZtzKIXmk XU+qxbfrlg1LNi8UyF19hkCn7WTyVZ2l3vJ3BMgFayuW06XqSS96cPRgjQrW9Ze0gYDh x0LBkbmN4tkMnwCzDY9RsidUP3NmqmMadZOx4TFGVVPTJfWDpwUX+GqwNo+Iz5k9xS/o ihIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=PV+OZxtexhaKFi4LC6dZ9HpNB+Yo6I0b9syEASFgGP4=; b=HkEBU1EQbpOGKSinphy2yFstRSGS7FFBPvPjmtSVcLiWvDZltIdiEhuY/Uuy54EFE0 /lvUJNc+J99WKhJIXXn9CX/fcHJZKXwy5rYzUq4FgFW2e6c45jjfOrSZNhnNDla5jW7Y JfNDegmQ6GHWv5C5sqmWzoe5q3j+4WUCynAltxbC/nY/pHyOnVgGQdFUptUf6AGfUiJV 5bgsiUduHtbDW4URU4xRLdQ0OC5DaL8wWO+AMoaE3W+cafE2KESVUCJHrq6D1Nl85lAK +F34F2z53udX/XkpoDfODbBFtVdatv9dvyjqbF5aiI4AMrU11j702RchC0zBiRKMrdtL 9HcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 f7si28114073plj.42.2017.06.01.04.04.53; Thu, 01 Jun 2017 04:04:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751886AbdFALEc (ORCPT + 1 other); Thu, 1 Jun 2017 07:04:32 -0400 Received: from foss.arm.com ([217.140.101.70]:54476 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751883AbdFALEc (ORCPT ); Thu, 1 Jun 2017 07:04:32 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C2A7115A2; Thu, 1 Jun 2017 04:04:31 -0700 (PDT) Received: from gby.kfn.arm.com (unknown [10.45.48.155]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EE4253F578; Thu, 1 Jun 2017 04:04:29 -0700 (PDT) From: Gilad Ben-Yossef To: Greg Kroah-Hartman Cc: Joe Perches , Ofir Drang , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org Subject: [PATCH v2 10/20] staging: ccree: move M/LLI defines to header file Date: Thu, 1 Jun 2017 14:03:00 +0300 Message-Id: <1496314993-30229-11-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1496314993-30229-1-git-send-email-gilad@benyossef.com> References: <1496314993-30229-1-git-send-email-gilad@benyossef.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org A bunch of macros used to define M/LLI descriptors where being defined in the C file. Move them over to private include file where other relevant definitions are stored. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_lli_defs.h | 8 ++++++++ drivers/staging/ccree/ssi_buffer_mgr.c | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) -- 2.1.4 diff --git a/drivers/staging/ccree/cc_lli_defs.h b/drivers/staging/ccree/cc_lli_defs.h index 876dde0..78811aa 100644 --- a/drivers/staging/ccree/cc_lli_defs.h +++ b/drivers/staging/ccree/cc_lli_defs.h @@ -28,6 +28,14 @@ #define CC_MAX_MLLI_ENTRY_SIZE 0xFFFF +#define LLI_MAX_NUM_OF_DATA_ENTRIES 128 +#define LLI_MAX_NUM_OF_ASSOC_DATA_ENTRIES 4 +#define MLLI_TABLE_MIN_ALIGNMENT 4 /* 32 bit alignment */ +#define MAX_NUM_OF_BUFFERS_IN_MLLI 4 +#define MAX_NUM_OF_TOTAL_MLLI_ENTRIES \ + (2 * LLI_MAX_NUM_OF_DATA_ENTRIES + \ + LLI_MAX_NUM_OF_ASSOC_DATA_ENTRIES) + /* Size of entry */ #define LLI_ENTRY_WORD_SIZE 2 #define LLI_ENTRY_BYTE_SIZE (LLI_ENTRY_WORD_SIZE * sizeof(u32)) diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_mgr.c index 28dc724..25b2876 100644 --- a/drivers/staging/ccree/ssi_buffer_mgr.c +++ b/drivers/staging/ccree/ssi_buffer_mgr.c @@ -33,13 +33,6 @@ #include "ssi_hash.h" #include "ssi_aead.h" -#define LLI_MAX_NUM_OF_DATA_ENTRIES 128 -#define LLI_MAX_NUM_OF_ASSOC_DATA_ENTRIES 4 -#define MLLI_TABLE_MIN_ALIGNMENT 4 /*Force the MLLI table to be align to uint32 */ -#define MAX_NUM_OF_BUFFERS_IN_MLLI 4 -#define MAX_NUM_OF_TOTAL_MLLI_ENTRIES (2*LLI_MAX_NUM_OF_DATA_ENTRIES + \ - LLI_MAX_NUM_OF_ASSOC_DATA_ENTRIES ) - #ifdef CC_DEBUG #define DUMP_SGL(sg) \ while (sg) { \