From patchwork Mon Feb 23 20:36:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robbie King X-Patchwork-Id: 44922 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7957621562 for ; Mon, 23 Feb 2015 20:38:04 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id l15sf11617166wiw.0 for ; Mon, 23 Feb 2015 12:38:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=RZfE5ygPMMQXnX7VZ4TtWnCR7Ipi9Q0b3tWIN8KImRQ=; b=JoDDJ+Zp43fePzVQTrltlq2G8mg1EkmyQQNMwIMTY5fwUsYfzFelldUVZoTxcW3m1O b6GIGO2NPrkvvp7fTf9GbNrhXQUG9TIZxqhAvOyQWg/gTQA5Uc8OIxCkY/QdEwT1PkBy jVIMePH00auDd4iSZo9mhuOxDspsPUQkH61D5vlYMByKlSRl8x+ALgyTa7zbOq8mdhc5 zZKZT1uHbBACCW21NmzCdMg6MCOLcz9p1FCYfGIZzZTjnEnwrROxS5wKIY6PIwPGeGY0 fKah/erYMaTScJWtK4rQT0QRkVjTksMouldP43Pqff1I0nmXiebAEIrwsy0N6wFT89dP TLqQ== X-Gm-Message-State: ALoCoQnEhUFnPYwSC2iTZBuSmYA/6JozEeP2ivc+mkFf5n6eU9/uh7fIlIZ4nDpjDQ50etqChuBx X-Received: by 10.112.174.36 with SMTP id bp4mr1594620lbc.15.1424723883611; Mon, 23 Feb 2015 12:38:03 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.98 with SMTP id l2ls576820laf.73.gmail; Mon, 23 Feb 2015 12:38:03 -0800 (PST) X-Received: by 10.152.88.4 with SMTP id bc4mr11540605lab.86.1424723883428; Mon, 23 Feb 2015 12:38:03 -0800 (PST) Received: from mail-la0-x232.google.com (mail-la0-x232.google.com. [2a00:1450:4010:c03::232]) by mx.google.com with ESMTPS id mk9si25564300lbb.3.2015.02.23.12.38.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Feb 2015 12:38:03 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::232 as permitted sender) client-ip=2a00:1450:4010:c03::232; Received: by labpv20 with SMTP id pv20so21064467lab.8 for ; Mon, 23 Feb 2015 12:38:03 -0800 (PST) X-Received: by 10.112.64.193 with SMTP id q1mr11537608lbs.88.1424723883342; Mon, 23 Feb 2015 12:38:03 -0800 (PST) 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.112.35.133 with SMTP id h5csp1500641lbj; Mon, 23 Feb 2015 12:38:02 -0800 (PST) X-Received: by 10.140.19.237 with SMTP id 100mr28087339qgh.24.1424723882078; Mon, 23 Feb 2015 12:38:02 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id w71si10726220qha.90.2015.02.23.12.38.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 23 Feb 2015 12:38:02 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YPzlO-0002rf-Rk; Mon, 23 Feb 2015 20:37:59 +0000 Received: from alln-iport-7.cisco.com ([173.37.142.94]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YPzkU-0002d2-EM for lng-odp@lists.linaro.org; Mon, 23 Feb 2015 20:37:02 +0000 X-IronPort-AV: E=Sophos;i="5.09,633,1418083200"; d="scan'208";a="126182553" Received: from alln-core-11.cisco.com ([173.36.13.133]) by alln-iport-7.cisco.com with ESMTP; 23 Feb 2015 20:36:57 +0000 Received: from cpp-rtpbld-55.cisco.com (cpp-rtpbld-55.cisco.com [172.18.5.199]) by alln-core-11.cisco.com (8.14.5/8.14.5) with ESMTP id t1NKaufD022934 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 23 Feb 2015 20:36:57 GMT Received: from cpp-rtpbld-55.cisco.com (localhost.localdomain [127.0.0.1]) by cpp-rtpbld-55.cisco.com (8.13.8/8.13.8) with ESMTP id t1NKauUN030659; Mon, 23 Feb 2015 15:36:56 -0500 Received: (from robking@localhost) by cpp-rtpbld-55.cisco.com (8.13.8/8.13.8/Submit) id t1NKatmB030658; Mon, 23 Feb 2015 15:36:55 -0500 From: Robbie King To: lng-odp@lists.linaro.org Date: Mon, 23 Feb 2015 15:36:07 -0500 Message-Id: <1424723769-8762-9-git-send-email-robking@cisco.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1424723769-8762-1-git-send-email-robking@cisco.com> References: <1424723769-8762-1-git-send-email-robking@cisco.com> X-Topics: patch Subject: [lng-odp] [PATCHv3 08/10] linux-generic: shm: add term_global X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Original-Sender: robking@cisco.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::232 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=fail header.i=@cisco.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Yan Sonming Signed-off-by: Yan Songming Signed-off-by: Mike Holmes Signed-off-by: Robbie King --- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_init.c | 5 +++++ platform/linux-generic/odp_shared_memory.c | 8 ++++++++ 3 files changed, 14 insertions(+) diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h index dad844f..4b9630c 100644 --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@ -37,6 +37,7 @@ int odp_thread_term_local(void); int odp_thread_term_global(void); int odp_shm_init_global(void); +int odp_shm_term_global(void); int odp_shm_init_local(void); int odp_pool_init_global(void); diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c index cdc4565..7426a97 100644 --- a/platform/linux-generic/odp_init.c +++ b/platform/linux-generic/odp_init.c @@ -113,6 +113,11 @@ int odp_term_global(void) rc = -1; } + if (odp_shm_term_global()) { + ODP_ERR("ODP shm term failed.\n"); + rc = -1; + } + return rc; } diff --git a/platform/linux-generic/odp_shared_memory.c b/platform/linux-generic/odp_shared_memory.c index dbaec22..251bf97 100644 --- a/platform/linux-generic/odp_shared_memory.c +++ b/platform/linux-generic/odp_shared_memory.c @@ -96,6 +96,14 @@ int odp_shm_init_global(void) return 0; } +int odp_shm_term_global(void) +{ + int ret = 0; + + ret = munmap(odp_shm_tbl, sizeof(odp_shm_table_t)); + return ret; +} + int odp_shm_init_local(void) {