From patchwork Mon Sep 10 08:00:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 146289 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp2204573ljw; Mon, 10 Sep 2018 01:01:06 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYELIZ3ZyRnmQghPiPlMHp6OGIy4sJ4gFYZDXO7o/iea2xkl3RYMIXrujQCM31gqJRRU0Bc X-Received: by 2002:a0c:c290:: with SMTP id b16-v6mr13177607qvi.182.1536566466533; Mon, 10 Sep 2018 01:01:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536566466; cv=none; d=google.com; s=arc-20160816; b=bu/6llOsJp/7EaTRbXbZTeQXW0qQLcv56rlubL8Ky5dAgaV0ksG7s5OOaHFR68HE2l CcNaRFv0ciRtcDGBDE2U9aSuUmzetuV5P1I/+08xVgKYp0FK5FHVO4Uc6r/9u7MVBgfZ cmyxtNi6SRx6FMCN8oNKSkGm2mDy0WZQOqUCs7g0px37XLKlRAGaeis/nUPZvoGGEG/8 K2tB8T8QifnMLTW0SRlEP2+BH0nAXkQMqrrzBMspG9742EgYaokDP/C2jt0sJElOoR8z CJ5fTepozQZPeX4miTh5PHq2Hmhay36B7kTh47jPfz1qmiQZYunWWZxngnLpqG4BZQdo rzuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to; bh=kykMcFFi7QXE0kS3d0dNj2GQozd5fbvlvURRYa+qXcg=; b=RCsTasFvhHbE4hI4RHafGKPY6YKrGubK43d0nJ9HJnZokyUgzOq5pG9FTVi/1izOpv 0MpQqVNKPSkgWMI7e4fGg7IezHFyy59OBC7jdtRcS6IUL1zP89uQbDbbb9jy6gR+kjSK ByCC1hTkYSSfeLs5Rq26tlP6ndG016sdV8q3/OyCPo1JSf5qwvi0H9wiVDEdFOqUYRQk DPCLlXtyyUcH6z9mT0Ed9ENIgFaRyhx5FFZfScuYQ3j0jnQ+vFdNBe9lXZiPqxjYcFWJ gk2dCv2+c+aUP6yQm7CNm5egVaAWPmfi7gI8H8ISBzH8IwuwDyMH9gdIN2I3x6BkaXrJ HClw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id 57-v6si1379736qtz.128.2018.09.10.01.01.06; Mon, 10 Sep 2018 01:01:06 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 0DEB661889; Mon, 10 Sep 2018 08:01:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id E0B1660E96; Mon, 10 Sep 2018 08:00:51 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 0C01961950; Mon, 10 Sep 2018 08:00:46 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id 2490B6196A for ; Mon, 10 Sep 2018 08:00:12 +0000 (UTC) Received: from mxback3o.mail.yandex.net (mxback3o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1d]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 53C0D1244A95 for ; Mon, 10 Sep 2018 11:00:10 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback3o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id rCFsiYB4vi-0A7C17YC; Mon, 10 Sep 2018 11:00:10 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id E3Xd8gWuU7-09rOTR3n; Mon, 10 Sep 2018 11:00:09 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Mon, 10 Sep 2018 08:00:07 +0000 Message-Id: <1536566407-6224-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536566407-6224-1-git-send-email-odpbot@yandex.ru> References: <1536566407-6224-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 695 Subject: [lng-odp] [PATCH v1 1/1] linux-gen: ishm: don't initialize anonymous mappings X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Josep Puigdemont Anonymous mappings are automatically initalized to zero. >From the mmap manual: "MAP_ANONYMOUS: The mapping is not backed by any file; its contents are initialized to zero." Signed-off-by: Josep Puigdemont --- /** Email created from pull request 695 (joseppc:fix/no-init-mmap-anonymous) ** https://github.com/Linaro/odp/pull/695 ** Patch: https://github.com/Linaro/odp/pull/695.patch ** Base sha: 6d48d7f7f684b8aa87f7eb4f922d45be345ed771 ** Merge commit sha: 2287a4ca0a06b738b59a11115b1421d0a429df26 **/ platform/linux-generic/odp_ishm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/platform/linux-generic/odp_ishm.c b/platform/linux-generic/odp_ishm.c index 59d1fe534..07ce4d534 100644 --- a/platform/linux-generic/odp_ishm.c +++ b/platform/linux-generic/odp_ishm.c @@ -1508,7 +1508,6 @@ int _odp_ishm_init_global(const odp_init_t *init) goto init_glob_err1; } ishm_tbl = addr; - memset(ishm_tbl, 0, sizeof(ishm_table_t)); ishm_tbl->dev_seq = 0; ishm_tbl->odpthread_cnt = 0; odp_spinlock_init(&ishm_tbl->lock); @@ -1521,7 +1520,6 @@ int _odp_ishm_init_global(const odp_init_t *init) goto init_glob_err2; } ishm_ftbl = addr; - memset(ishm_ftbl, 0, sizeof(ishm_ftable_t)); /* *reserve the address space for _ODP_ISHM_SINGLE_VA reserved blocks,