From patchwork Tue Jun 17 17:55:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 32098 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3678420C81 for ; Tue, 17 Jun 2014 17:56:42 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id db11sf31924467veb.9 for ; Tue, 17 Jun 2014 10:56:41 -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: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:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=Yy1kYIYhF/hTNh+luQWywtl2BF9Y29JV5KNlkexbpp8=; b=QmM6mby+zD3m9efkz8y+lGHacmDdLz4Dpxzfzr9xe2SKknZaLT61CVnZm8T8EnZNuz rp/muVeMi2rl9ZQf63r2g/yXDa/yticHBID6ZqcS/vgZXhxJw8Oes7i+fJPf99QSrZIE 98lttBqBjq35EXV+DjY1Zs8zNgT5LLz19Fq9yttucMeb9vLLrZhedgrdMCwNCvY09YjF xV0URBCqtl7mzFVitvCCykH/3ULfd7XZZT6MF15EX74zBwy6RfPoXWceqT3SaDoTHe46 nZaLZ/oWHgXYFrgnXl7OoBI3BUNClpQ2LqBprcjVXJTWhhH7WWaTBsmEepyWICmydIuK VvKQ== X-Gm-Message-State: ALoCoQljM661OHShaGaHyvg6lCawL+qirmQUM58FwR2UUcwvC5JrVtIU5ez5paNuxdAhoS7P3IpL X-Received: by 10.58.34.47 with SMTP id w15mr154854vei.20.1403027801949; Tue, 17 Jun 2014 10:56:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.183 with SMTP id 52ls4880179qgv.15.gmail; Tue, 17 Jun 2014 10:56:41 -0700 (PDT) X-Received: by 10.220.103.141 with SMTP id k13mr11735041vco.25.1403027801799; Tue, 17 Jun 2014 10:56:41 -0700 (PDT) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id xo6si5777512veb.19.2014.06.17.10.56.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 10:56:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.178 as permitted sender) client-ip=209.85.128.178; Received: by mail-ve0-f178.google.com with SMTP id oy12so5968784veb.23 for ; Tue, 17 Jun 2014 10:56:41 -0700 (PDT) X-Received: by 10.58.29.234 with SMTP id n10mr23179702veh.16.1403027801717; Tue, 17 Jun 2014 10:56:41 -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.221.54.6 with SMTP id vs6csp227592vcb; Tue, 17 Jun 2014 10:56:41 -0700 (PDT) X-Received: by 10.224.136.65 with SMTP id q1mr17806090qat.93.1403027801268; Tue, 17 Jun 2014 10:56:41 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id 44si1722599qgj.46.2014.06.17.10.56.40 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 17 Jun 2014 10:56:41 -0700 (PDT) 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-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wwxaz-0004vF-AI; Tue, 17 Jun 2014 17:54:57 +0000 Received: from mail-la0-f53.google.com ([209.85.215.53]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wwxa7-0004nb-Mb for lng-odp@lists.linaro.org; Tue, 17 Jun 2014 17:54:03 +0000 Received: by mail-la0-f53.google.com with SMTP id b8so2759721lan.40 for ; Tue, 17 Jun 2014 10:55:40 -0700 (PDT) X-Received: by 10.112.56.233 with SMTP id d9mr2818046lbq.55.1403027740634; Tue, 17 Jun 2014 10:55:40 -0700 (PDT) Received: from localhost.localdomain (176-241-155-136-dynamic.retail.datagroup.ua. [176.241.155.136]) by mx.google.com with ESMTPSA id d3sm11646351lbw.2.2014.06.17.10.55.39 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 10:55:40 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Tue, 17 Jun 2014 20:55:15 +0300 Message-Id: <1403027720-9738-14-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1403027720-9738-1-git-send-email-taras.kondratiuk@linaro.org> References: <1403027720-9738-1-git-send-email-taras.kondratiuk@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH v2 13/18] Split out platform-specific part of odp_queue.h 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: taras.kondratiuk@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.128.178 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 Signed-off-by: Taras Kondratiuk --- include/odp_queue.h | 21 +++++----- platform/linux-generic/include/plat/odp_queue.h | 50 +++++++++++++++++++++++ 2 files changed, 61 insertions(+), 10 deletions(-) create mode 100644 platform/linux-generic/include/plat/odp_queue.h diff --git a/include/odp_queue.h b/include/odp_queue.h index 5e083f1..1054217 100644 --- a/include/odp_queue.h +++ b/include/odp_queue.h @@ -21,18 +21,18 @@ extern "C" { #include #include - +#include /** * ODP queue */ -typedef uint32_t odp_queue_t; +typedef plat_odp_queue_t odp_queue_t; /** Invalid queue */ -#define ODP_QUEUE_INVALID 0 +#define ODP_QUEUE_INVALID PLAT_ODP_QUEUE_INVALID /** Maximum queue name lenght in chars */ -#define ODP_QUEUE_NAME_LEN 32 +#define ODP_QUEUE_NAME_LEN PLAT_ODP_QUEUE_NAME_LEN /** @@ -51,20 +51,21 @@ typedef int odp_queue_type_t; typedef int odp_schedule_prio_t; /** Highest scheduling priority */ -#define ODP_SCHED_PRIO_HIGHEST 0 +#define ODP_SCHED_PRIO_HIGHEST PLAT_ODP_SCHED_PRIO_HIGHEST /** Normal scheduling priority */ -#define ODP_SCHED_PRIO_NORMAL (ODP_CONFIG_SCHED_PRIOS / 2) +#define ODP_SCHED_PRIO_NORMAL PLAT_ODP_SCHED_PRIO_NORMAL /** Lowest scheduling priority */ -#define ODP_SCHED_PRIO_LOWEST (ODP_CONFIG_SCHED_PRIOS - 1) +#define ODP_SCHED_PRIO_LOWEST PLAT_ODP_SCHED_PRIO_LOWEST /** Default scheduling priority */ -#define ODP_SCHED_PRIO_DEFAULT ODP_SCHED_PRIO_NORMAL +#define ODP_SCHED_PRIO_DEFAULT PLAT_ODP_SCHED_PRIO_NORMAL /** * ODP schedule synchronisation + * TODO: Can sync type values be platform specific? */ typedef int odp_schedule_sync_t; @@ -73,7 +74,7 @@ typedef int odp_schedule_sync_t; #define ODP_SCHED_SYNC_ORDERED 2 /**< Ordered queue */ /** Default queue synchronisation */ -#define ODP_SCHED_SYNC_DEFAULT ODP_SCHED_SYNC_ATOMIC +#define ODP_SCHED_SYNC_DEFAULT PLAT_ODP_SCHED_SYNC_DEFAULT /** * ODP schedule core group @@ -84,7 +85,7 @@ typedef int odp_schedule_group_t; #define ODP_SCHED_GROUP_ALL 0 /** Default core group */ -#define ODP_SCHED_GROUP_DEFAULT ODP_SCHED_GROUP_ALL +#define ODP_SCHED_GROUP_DEFAULT PLAT_ODP_SCHED_GROUP_DEFAULT /** diff --git a/platform/linux-generic/include/plat/odp_queue.h b/platform/linux-generic/include/plat/odp_queue.h new file mode 100644 index 0000000..ff174b4 --- /dev/null +++ b/platform/linux-generic/include/plat/odp_queue.h @@ -0,0 +1,50 @@ +/* Copyright (c) 2013, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + +/** + * @file + * + * ODP queue + */ + +#ifndef ODP_QUEUE_H_ +#error This file should be included only into corresponding top level header +#else + +#include + +/** + * ODP queue + */ +typedef uint32_t plat_odp_queue_t; + +/** Invalid queue */ +#define PLAT_ODP_QUEUE_INVALID 0 + +/** Maximum queue name lenght in chars */ +#define PLAT_ODP_QUEUE_NAME_LEN 32 + + +/** Highest scheduling priority */ +#define PLAT_ODP_SCHED_PRIO_HIGHEST 0 + +/** Normal scheduling priority */ +#define PLAT_ODP_SCHED_PRIO_NORMAL (ODP_CONFIG_SCHED_PRIOS / 2) + +/** Lowest scheduling priority */ +#define PLAT_ODP_SCHED_PRIO_LOWEST (ODP_CONFIG_SCHED_PRIOS - 1) + +/** Default scheduling priority */ +#define PLAT_ODP_SCHED_PRIO_DEFAULT PLAT_ODP_SCHED_PRIO_NORMAL + +/** Default queue synchronisation */ +#define PLAT_ODP_SCHED_SYNC_DEFAULT ODP_SCHED_SYNC_ATOMIC + +/** Default core group */ +#define PLAT_ODP_SCHED_GROUP_DEFAULT ODP_SCHED_GROUP_ALL + +#endif