From patchwork Mon Feb 16 19:55:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 44735 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3A22321544 for ; Mon, 16 Feb 2015 19:56:50 +0000 (UTC) Received: by lbiw7 with SMTP id w7sf324330lbi.0 for ; Mon, 16 Feb 2015 11:56:49 -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=cKoSxyi5eZyxijJkb4KdEKlJjHelmjRCF2sonJwqLtc=; b=H+xjbICj7K9lNBMjbxlk+UFN0y7oBfQE/ujz0shzGtJJkmqM4/igvxABEicexf38Wk 24GN7l7NXypylzvc9MQ5njGmLxAotNsgWe80A9OKgk2i313XqwtstWMpr5Kef7faknPH XcVtV8Heaa7LzxN2nG2Gy49d6tCAElRzQBWQ6+BadO8V1AdNypTBMiTUmYncBhiK4Ts1 t11INJnPs79jrV9WvM5M2dmafhwOg4CIiBFGecUvFk7KP4tf3J78cyfMVZg55sJyP6U/ idniCYJuvwyFll4bl1m8kVrhg/lMcl1PiZ4VZWxuYGfuFkumtBRCZW8HsSYHyuVfqiUL xnjA== X-Gm-Message-State: ALoCoQkwmAibDLL7h/khy0i/NhXblvLlHxX/uxk+xLgmUC/RVwWDVdntNZ7hLsy7rwO5/GbftG2h X-Received: by 10.194.201.10 with SMTP id jw10mr3155488wjc.3.1424116609155; Mon, 16 Feb 2015 11:56:49 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.232 with SMTP id h8ls601381lam.30.gmail; Mon, 16 Feb 2015 11:56:48 -0800 (PST) X-Received: by 10.152.28.129 with SMTP id b1mr12117646lah.37.1424116608920; Mon, 16 Feb 2015 11:56:48 -0800 (PST) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id n9si10799575lbp.165.2015.02.16.11.56.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Feb 2015 11:56:48 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by lbvp9 with SMTP id p9so583094lbv.0 for ; Mon, 16 Feb 2015 11:56:48 -0800 (PST) X-Received: by 10.112.56.139 with SMTP id a11mr25029218lbq.36.1424116608826; Mon, 16 Feb 2015 11:56:48 -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 h5csp1788137lbj; Mon, 16 Feb 2015 11:56:48 -0800 (PST) X-Received: by 10.140.150.21 with SMTP id 21mr141036qhw.69.1424116607330; Mon, 16 Feb 2015 11:56:47 -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 76si7029985qhe.33.2015.02.16.11.56.46 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 16 Feb 2015 11:56:47 -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 1YNRme-0007h6-3E; Mon, 16 Feb 2015 19:56:44 +0000 Received: from mail-qc0-f175.google.com ([209.85.216.175]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YNRlx-0007SR-2n for lng-odp@lists.linaro.org; Mon, 16 Feb 2015 19:56:01 +0000 Received: by mail-qc0-f175.google.com with SMTP id b13so19810519qcw.6 for ; Mon, 16 Feb 2015 11:55:56 -0800 (PST) X-Received: by 10.229.241.137 with SMTP id le9mr757925qcb.20.1424116555934; Mon, 16 Feb 2015 11:55:55 -0800 (PST) Received: from mike-desktop.?.holmesfamily.ws (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by mx.google.com with ESMTPSA id o10sm4832854qag.9.2015.02.16.11.55.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Feb 2015 11:55:55 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Mon, 16 Feb 2015 14:55:20 -0500 Message-Id: <1424116520-20381-11-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1424116520-20381-1-git-send-email-mike.holmes@linaro.org> References: <1424116520-20381-1-git-send-email-mike.holmes@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH v2 10/10] linux-generic: buffer pool: add term_local 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mike.holmes@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) 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: Yan Sonming Signed-off-by: Yan Sonming Signed-off-by: Mike Holmes --- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_buffer_pool.c | 6 ++++++ platform/linux-generic/odp_init.c | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h index 7f45a3e..7d522f9 100644 --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@ -42,6 +42,7 @@ int odp_shm_init_local(void); int odp_buffer_pool_init_global(void); int odp_buffer_pool_term_global(void); +int odp_buffer_pool_term_local(void); int odp_pktio_init_global(void); int odp_pktio_term_global(void); diff --git a/platform/linux-generic/odp_buffer_pool.c b/platform/linux-generic/odp_buffer_pool.c index bb384bc..e6f2ccd 100644 --- a/platform/linux-generic/odp_buffer_pool.c +++ b/platform/linux-generic/odp_buffer_pool.c @@ -124,6 +124,12 @@ int odp_buffer_pool_term_global(void) return ret; } +int odp_buffer_pool_term_local(void) +{ + _odp_flush_caches(); + return 0; +} + /** * Pool creation */ diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c index 732bd8f..151c597 100644 --- a/platform/linux-generic/odp_init.c +++ b/platform/linux-generic/odp_init.c @@ -151,5 +151,10 @@ int odp_term_local(void) return -1; } + if (odp_buffer_pool_term_local()) { + ODP_ERR("ODP buffer pool local term failed.\n"); + return -1; + } + return (odp_thread_term_local() > 0) ? 1 : 0; }