From patchwork Thu Apr 10 17:55:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Dmytriyenko X-Patchwork-Id: 28239 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8B90420671 for ; Thu, 10 Apr 2014 17:55:45 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id jt11sf13833487pbb.7 for ; Thu, 10 Apr 2014 10:55:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=eJeawP/QhfDq+KIdoMANd5Pvle5oWGvvPlwG53QctK4=; b=LoSdtaBeFaUsTa4X+L69+pyDExJ3KsHJnIWldOSPGNWrTI5e1tjGXlT7qGk15ozdXM VXxkM1VxtnxanXtqbKViSN+aUoYYcbJ/iKKe5WyqPSt7PGeHqUsNdClMaXKE4nSKsd7b I3Q+TXWVYOpcPOAvJRIEqi/iklYmac6beHt6IPybiaydWMaoTY8OLHDjSOVCvAC5XG1z 0zVvyNniu9aPu9ij97yquCPHkJ2f4x20ZrknLY8r2lo9pRU7em3/ju4jBB/Q2ODfhF1n wP1neNdjsUd1XuMjJCpVc2oG7cOmVUaZO9zwvxTDs6rkjlzq29/GtlR1ETLjOchoNfXP Bl4A== X-Gm-Message-State: ALoCoQmWhks7mO8gLKIiti5j+CSJPeDJ4mHS4oErhNwZ2NYmB2+XcMM64CrB/dVwPjdYUaBubD2s X-Received: by 10.66.190.202 with SMTP id gs10mr8854167pac.0.1397152544820; Thu, 10 Apr 2014 10:55:44 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.96.79 with SMTP id j73ls1285619qge.45.gmail; Thu, 10 Apr 2014 10:55:44 -0700 (PDT) X-Received: by 10.221.29.137 with SMTP id ry9mr15529037vcb.6.1397152544323; Thu, 10 Apr 2014 10:55:44 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id od9si823788vcb.65.2014.04.10.10.55.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 10:55:44 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id jy13so3749900veb.16 for ; Thu, 10 Apr 2014 10:55:44 -0700 (PDT) X-Received: by 10.52.78.231 with SMTP id e7mr2018917vdx.28.1397152544098; Thu, 10 Apr 2014 10:55:44 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp79610vcb; Thu, 10 Apr 2014 10:55:43 -0700 (PDT) X-Received: by 10.66.193.161 with SMTP id hp1mr21398817pac.20.1397152542644; Thu, 10 Apr 2014 10:55:42 -0700 (PDT) Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id cb4si2623563pbc.280.2014.04.10.10.55.41 for ; Thu, 10 Apr 2014 10:55:42 -0700 (PDT) Received-SPF: pass (google.com: domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Received: from mail.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id D557B65E94; Thu, 10 Apr 2014 17:55:35 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from vms173017pub.verizon.net (vms173017pub.verizon.net [206.46.173.17]) by mail.openembedded.org (Postfix) with ESMTP id B100265D65 for ; Thu, 10 Apr 2014 17:55:32 +0000 (UTC) Received: from gandalf.denix.org ([unknown] [71.191.205.189]) by vms173017.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0N3T00A78TSL2100@vms173017.mailsrvcs.net> for openembedded-core@lists.openembedded.org; Thu, 10 Apr 2014 12:55:33 -0500 (CDT) Received: from localhost.localdomain (elrond [192.168.0.7]) by gandalf.denix.org (Postfix) with ESMTP id 6127D20396; Thu, 10 Apr 2014 13:55:33 -0400 (EDT) From: Denys Dmytriyenko To: openembedded-core@lists.openembedded.org Date: Thu, 10 Apr 2014 13:55:27 -0400 Message-id: <1397152528-16715-3-git-send-email-denis@denix.org> X-Mailer: git-send-email 1.9.1 In-reply-to: <1397152528-16715-1-git-send-email-denis@denix.org> References: <1397152528-16715-1-git-send-email-denis@denix.org> Cc: Denys Dmytriyenko Subject: [OE-core] [PATCH v2 3/4] cryptodev-module: recipe for out-of-tree cryptodev device driver X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: denis@denix.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Denys Dmytriyenko Depends on cryptodev-linux for providing a header file Signed-off-by: Denys Dmytriyenko --- v2 - add patch to fix INIT_COMPLETION rename in 3.13+ kernels .../cryptodev/cryptodev-module_1.6.bb | 18 +++++ ...talling-header-file-provided-by-another-p.patch | 28 +++++++ ...-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch | 86 ++++++++++++++++++++++ 3 files changed, 132 insertions(+) create mode 100644 meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb create mode 100644 meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch create mode 100644 meta/recipes-kernel/cryptodev/files/0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch diff --git a/meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb b/meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb new file mode 100644 index 0000000..df50e5a --- /dev/null +++ b/meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb @@ -0,0 +1,18 @@ +require cryptodev_${PV}.inc + +SUMMARY = "A /dev/crypto device driver kernel module" + +inherit module + +# Header file provided by a separate package +DEPENDS += "cryptodev-linux" + +SRC_URI += " \ +file://0001-Disable-installing-header-file-provided-by-another-p.patch \ +file://0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch \ +" + +EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' + +RCONFLICTS_${PN} = "ocf-linux" +RREPLACES_${PN} = "ocf-linux" diff --git a/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch b/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch new file mode 100644 index 0000000..a580fc6 --- /dev/null +++ b/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch @@ -0,0 +1,28 @@ +From 8a884f55bd1527baa82fab68c186ba546273860c Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko +Date: Sun, 6 Apr 2014 19:51:39 -0400 +Subject: [PATCH] Disable installing header file provided by another package + +Signed-off-by: Denys Dmytriyenko + +Upstream-Status: Inappropriate [ OE specific ] +--- + Makefile | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/Makefile b/Makefile +index d66ef26..8e97c6a 100644 +--- a/Makefile ++++ b/Makefile +@@ -23,8 +23,6 @@ install: modules_install + + modules_install: + make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules_install +- @echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..." +- @install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h + + clean: + make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean +-- +1.9.1 + diff --git a/meta/recipes-kernel/cryptodev/files/0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch b/meta/recipes-kernel/cryptodev/files/0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch new file mode 100644 index 0000000..c5c7ec7 --- /dev/null +++ b/meta/recipes-kernel/cryptodev/files/0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch @@ -0,0 +1,86 @@ +From 57b5544de80db85c8955499831fdaa30829db77a Mon Sep 17 00:00:00 2001 +From: Cosmin Paraschiv +Date: Thu, 23 Jan 2014 03:40:00 +0100 +Subject: [PATCH] In the 3.13-rc1 Linux kernel, the INIT_COMPLETION macro has + been replaced with an inline function, reinit_completion [1][2]. We are + currently using the 3.13-rc3 Linux kernel, which leads to the following + error: + +cryptlib.c:279:2: error: implicit declaration of function 'INIT_COMPLETION' [-Werror=implicit-function-declaration] + INIT_COMPLETION(cdata->async.result->completion); + +[1] https://github.com/torvalds/linux/commit/c32f74ab2872994bc8336ed367313da3139350ca +[2] https://github.com/torvalds/linux/commit/62026aedaacedbe1ffe94a3599ad4acd8ecdf587 + +Signed-off-by: Cosmin Paraschiv +Reviewed-by: Cristian Stoica +Tested-by: Cristian Stoica +Signed-off-by: Horia Geanta +Signed-off-by: Phil Sutter + +Upstream-Status: Backport +--- + cryptlib.c | 8 ++++---- + cryptodev_int.h | 6 ++++++ + 2 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/cryptlib.c b/cryptlib.c +index 54d5d41..a923c14 100644 +--- a/cryptlib.c ++++ b/cryptlib.c +@@ -217,7 +217,7 @@ ssize_t cryptodev_cipher_encrypt(struct cipher_data *cdata, + { + int ret; + +- INIT_COMPLETION(cdata->async.result->completion); ++ reinit_completion(&cdata->async.result->completion); + + if (cdata->aead == 0) { + ablkcipher_request_set_crypt(cdata->async.request, +@@ -240,7 +240,7 @@ ssize_t cryptodev_cipher_decrypt(struct cipher_data *cdata, + { + int ret; + +- INIT_COMPLETION(cdata->async.result->completion); ++ reinit_completion(&cdata->async.result->completion); + if (cdata->aead == 0) { + ablkcipher_request_set_crypt(cdata->async.request, + (struct scatterlist *)src, dst, +@@ -351,7 +351,7 @@ ssize_t cryptodev_hash_update(struct hash_data *hdata, + { + int ret; + +- INIT_COMPLETION(hdata->async.result->completion); ++ reinit_completion(&hdata->async.result->completion); + ahash_request_set_crypt(hdata->async.request, sg, NULL, len); + + ret = crypto_ahash_update(hdata->async.request); +@@ -363,7 +363,7 @@ int cryptodev_hash_final(struct hash_data *hdata, void* output) + { + int ret; + +- INIT_COMPLETION(hdata->async.result->completion); ++ reinit_completion(&hdata->async.result->completion); + ahash_request_set_crypt(hdata->async.request, NULL, output, 0); + + ret = crypto_ahash_final(hdata->async.request); +diff --git a/cryptodev_int.h b/cryptodev_int.h +index 12dd5b1..188063d 100644 +--- a/cryptodev_int.h ++++ b/cryptodev_int.h +@@ -2,6 +2,12 @@ + #ifndef CRYPTODEV_INT_H + # define CRYPTODEV_INT_H + ++#include ++ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)) ++# define reinit_completion(x) INIT_COMPLETION(*(x)) ++#endif ++ + #include + #include + #include +-- +1.9.1 +