From patchwork Sun Jun 4 08:02:26 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: 101331 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp437453qgd; Sun, 4 Jun 2017 01:03:43 -0700 (PDT) X-Received: by 10.98.76.140 with SMTP id e12mr14456948pfj.78.1496563423619; Sun, 04 Jun 2017 01:03:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496563423; cv=none; d=google.com; s=arc-20160816; b=uehBwyxPDtdpJ/rf6HfhoY5GOsWucQKNUAYp3NIPwNO0PXPVF5PQiksCar4er8yFef 0lDo6QpgIRKOsp0GCJHTyMFEKbdn21gmCNJKvPg76zdj2vjXGVKdt3DggQPjq85iUC7b 6rh4L4sXIl/xd4/PiILmwxzzu6B2mLjznmiSauy/yP+DISGUj6pI77Xe+j7Rt60v6u09 uTjCiAHYHnbRo/J5e8DFq2W/1VGULWdY+7fuvSF3CB2DdjQ/CSP0N7vl4MmSi/cbQe7C fwSM8nLtyJG2TeX0X4469mMjxzhHymtwGIsC8LhjL7gg0l0nj+FRbDrV/Te78ey1rpmL xhKQ== 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=WGwUyJG5tNSxm+h5ncGLEwI8I81aFfP+qSwEFAFj4iM=; b=fDlJxa1cD6V88mzSudHRP/7aZbbR6GLO5fCBZcIPHECHOEw4HXKz5J/s/xjKtlteRd 0PGA5dwMnQzpwV+tyEXEjiAF9642cnRyjEbOiafwozDZNFoEivSi1XYjEDc79PZEaGcm da1amwYa2l3JOKWNlYvU9F0l08EmJULCmErd4obLpcPBbrUpxf++2R64ObAZKBAg/VmP cB/hluuKiHMNFfxssX1yAP0TZvldyvnfMhIBc2VpWP14HkQK7VmA0HSG4A8RQb6JFxTp NgYCKDSoll6RlPV9ON/elYNB95ourfVKX3ar+wGEdB7AR1N+J4NQxI52NhiIctk4kTvB PtHg== 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 e124si26832040pgc.289.2017.06.04.01.03.43; Sun, 04 Jun 2017 01:03:43 -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 S1751246AbdFDIDe (ORCPT + 1 other); Sun, 4 Jun 2017 04:03:34 -0400 Received: from foss.arm.com ([217.140.101.70]:52702 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751230AbdFDIDU (ORCPT ); Sun, 4 Jun 2017 04:03:20 -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 36A70344; Sun, 4 Jun 2017 01:03:20 -0700 (PDT) Received: from localhost.localdomain (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 388E13F589; Sun, 4 Jun 2017 01:03:18 -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 v3 05/18] staging: ccree: move M/LLI defines to header file Date: Sun, 4 Jun 2017 11:02:26 +0300 Message-Id: <1496563362-7954-6-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1496563362-7954-1-git-send-email-gilad@benyossef.com> References: <1496563362-7954-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 24ba51d..63ffcd5 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) { \