From patchwork Wed Oct 28 14:32:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 55702 Delivered-To: patch@linaro.org Received: by 10.112.61.134 with SMTP id p6csp157437lbr; Wed, 28 Oct 2015 07:37:06 -0700 (PDT) X-Received: by 10.55.20.4 with SMTP id e4mr1126005qkh.61.1446043026445; Wed, 28 Oct 2015 07:37:06 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 194si42236402qhw.93.2015.10.28.07.37.05; Wed, 28 Oct 2015 07:37:06 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: by lists.linaro.org (Postfix, from userid 109) id 998B561FBA; Wed, 28 Oct 2015 14:37:05 +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=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, URIBL_BLOCKED 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 3BA1B6199F; Wed, 28 Oct 2015 14:36:57 +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 10B8B61B64; Wed, 28 Oct 2015 14:36:55 +0000 (UTC) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) by lists.linaro.org (Postfix) with ESMTPS id 3083461996 for ; Wed, 28 Oct 2015 14:36:53 +0000 (UTC) Received: by lbbec13 with SMTP id ec13so7313159lbb.0 for ; Wed, 28 Oct 2015 07:36:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=ClFVTsYOlMytQYRMYqsyQaYcaFKGJ/L+XrndYEuw9i8=; b=JdaQijCZ2PLpfLu6jcLQWZXRz7LeBGxl9l/X5c3RQFqtppA6DzudJ8mwBfATFfgF+u 0gAS5KatwvRmEP3tXMhTBF7vbKatAwah+QpxTBL7rPTszjHIWHFQ/KHNXvS9wU3H8DE0 64IEhB6gyuYbwKneH24cN+D1kg639Ug++VK8/h+eNhYEfCiJlxCd8YLT6WlormvBCgxH /GOfXbTbsGlo92MeVadkOZLZtQX04NKjRjgKDwAQFZ6pl+fxnEvG7IBlm1S2X9ubpsp8 tH2E8/HY7apelnzfU2S6UMOqo6QkSx5LkzaM4uu96E4/x+VKwyh5SHRCqqdQO30SOdzl pUsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ClFVTsYOlMytQYRMYqsyQaYcaFKGJ/L+XrndYEuw9i8=; b=j0JkGHTugz/Dg0uWHsRkD4m6fGDlrSWK7yN+mxRIijZ5S969pfgCn9SHUXdEE7QaeC 8ZBxKTetXCQOd/xEMN9g9J2rpspYDJUfXERxSe+7TlxXmtw5IWfajMNzz+p6F4QzZIVT DPOyCy37RZn4e+6O86K+MLnw53JA2f+ZmY7+Rb15uw7ZcEaNzcuIxIN2CV8lPBmhJ5u9 3WTunLyiOjvAXvBLDBsillwdAqIyGHN4qpyK+/eu+Ryi9Fk1Zy+faC4AQc5IS7qetNV4 y8oMoVU9+nS2EQeBMu80gUIgoi4zWmSa/+iSThPGdZqW1RiK0r0ode7p4UXaBOBxfpLS 4NGA== X-Gm-Message-State: ALoCoQkgUDLjabkcZIq19EsUhbj1TLZRhNUT9M8IBCKM2M++3l4Hm/EhEMGqIDhjXLyax4Y/sUD1 X-Received: by 10.112.13.98 with SMTP id g2mr23803453lbc.18.1446043011562; Wed, 28 Oct 2015 07:36:51 -0700 (PDT) Received: from localhost (c-893970d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.57.137]) by smtp.gmail.com with ESMTPSA id r194sm8077876lfg.5.2015.10.28.07.36.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Oct 2015 07:36:50 -0700 (PDT) From: Anders Roxell To: pasi.orpana@nokia.com, carl.wallen@nokia.com Date: Wed, 28 Oct 2015 15:32:43 +0100 Message-Id: <1446042764-12311-1-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 2.1.4 X-Topics: patch Cc: petri.savolainen@nokia.com, lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 1/2] api: cpumask: don't use platform internal defines 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Applications that use an installed ODP will get the following compile error: .../odp_install/include/odp/plat/cpumask_types.h:26:33: fatal error: odp_config_internal.h: No such file or directory #include Defines a new public API macro ODP_CPUMASK_SIZE that is the maximum number of CPUs that can be accessed in this system. Fixes bug: https://bugs.linaro.org/show_bug.cgi?id=1864 Signed-off-by: Anders Roxell --- include/odp/api/cpumask.h | 6 ++++++ platform/linux-generic/include/odp/plat/cpumask_types.h | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/odp/api/cpumask.h b/include/odp/api/cpumask.h index 4835a6c..7480132 100644 --- a/include/odp/api/cpumask.h +++ b/include/odp/api/cpumask.h @@ -26,6 +26,12 @@ extern "C" { */ /** + * @def ODP_CPUMASK_SIZE + * Maximum cpumask size, this definition limits the number of individual CPUs + * that can be accessed in this system. + */ + +/** * @def ODP_CPUMASK_STR_SIZE * Minimum size of output buffer for odp_cpumask_to_str() */ diff --git a/platform/linux-generic/include/odp/plat/cpumask_types.h b/platform/linux-generic/include/odp/plat/cpumask_types.h index affe59b..1beaa1d 100644 --- a/platform/linux-generic/include/odp/plat/cpumask_types.h +++ b/platform/linux-generic/include/odp/plat/cpumask_types.h @@ -23,12 +23,13 @@ extern "C" { */ #include -#include + +#define ODP_CPUMASK_SIZE 1024 /** * Minimum size of output buffer for odp_cpumask_to_str() */ -#define ODP_CPUMASK_STR_SIZE ((_ODP_INTERNAL_MAX_THREADS + 3) / 4 + 3) +#define ODP_CPUMASK_STR_SIZE ((ODP_CPUMASK_SIZE + 3) / 4 + 3) /** * CPU mask