From patchwork Tue Jan 13 22:05:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 43087 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5ABBE20DE8 for ; Tue, 13 Jan 2015 22:05:58 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id p9sf3049931lbv.1 for ; Tue, 13 Jan 2015 14:05:57 -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: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=ZM47DO//IHGlB6yDaBcomC5mAQBXqTf4F3U+fh+XsiE=; b=Evve4o8Bz8Cyxud/xQMHZdC5iyBp1i1RtBMXAbVHievtYyYYEER9fOGXjJTDWuhQ0y zl7ZpVnC8aSDIEVgVMyZPOmyGjt1pc7xnKRPqK88jonTgBrQU5i749BO8WM+3EpK1NLQ UTQzPT38lwDmGUCPU9vY2iAljpCORVA36IQDHnTwQWw9PSEsmkeL1Rdx9RJ2fUIbZMlL tCfjiH0KkylPz68fjOMCAvqOUsvn+xHSuSeyXRIfHOSzXFbFXVU+YNGrYNOaI/Z5fGTF bso651cyHt8iu2hg3jrJckaiPTVSMjz2HVdiO1zCgMbCWIyTRJi3hT0vVRB6jrLU3DtX +xSQ== X-Gm-Message-State: ALoCoQlBETRc1YthKb/Zf06vd4hYjcgHwVH6RE2w8yA36jEwt05UcKs88JY80khg/sWGHOq91/81 X-Received: by 10.194.204.201 with SMTP id la9mr1330wjc.6.1421186757260; Tue, 13 Jan 2015 14:05:57 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.170 with SMTP id p10ls52132lal.35.gmail; Tue, 13 Jan 2015 14:05:57 -0800 (PST) X-Received: by 10.113.7.163 with SMTP id dd3mr607375lbd.96.1421186757099; Tue, 13 Jan 2015 14:05:57 -0800 (PST) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id oq1si25453051lbb.98.2015.01.13.14.05.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 Jan 2015 14:05:56 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by mail-lb0-f170.google.com with SMTP id 10so5015250lbg.1 for ; Tue, 13 Jan 2015 14:05:56 -0800 (PST) X-Received: by 10.112.90.170 with SMTP id bx10mr526304lbb.69.1421186756648; Tue, 13 Jan 2015 14:05:56 -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.9.200 with SMTP id c8csp1511752lbb; Tue, 13 Jan 2015 14:05:55 -0800 (PST) X-Received: by 10.140.82.136 with SMTP id h8mr1084561qgd.75.1421186755104; Tue, 13 Jan 2015 14:05:55 -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 s106si28581225qgd.103.2015.01.13.14.05.54 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 13 Jan 2015 14:05:55 -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 1YB9ax-0007gw-VR; Tue, 13 Jan 2015 22:05:51 +0000 Received: from mail-qa0-f44.google.com ([209.85.216.44]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YB9as-0007fc-NX for lng-odp@lists.linaro.org; Tue, 13 Jan 2015 22:05:46 +0000 Received: by mail-qa0-f44.google.com with SMTP id w8so4209946qac.3 for ; Tue, 13 Jan 2015 14:05:41 -0800 (PST) X-Received: by 10.224.171.129 with SMTP id h1mr1390261qaz.74.1421186741199; Tue, 13 Jan 2015 14:05:41 -0800 (PST) Received: from mike-desktop.?.holmesfamily.ws ([98.221.136.245]) by mx.google.com with ESMTPSA id g12sm18813291qay.44.2015.01.13.14.05.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Jan 2015 14:05:40 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Tue, 13 Jan 2015 17:05:33 -0500 Message-Id: <1421186734-8566-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH 1/2] api: remove odp_compiler.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: 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.170 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 Compiler information should be predominately platform specific and not part of the API. The only part of the API needing these definitions is odp_byteorder.h so move the definition there and delete odp_compiler.h Signed-off-by: Mike Holmes --- platform/linux-generic/Makefile.am | 1 - platform/linux-generic/include/api/odp.h | 2 - platform/linux-generic/include/api/odp_byteorder.h | 27 +++++++++++- platform/linux-generic/include/api/odp_compiler.h | 51 ---------------------- 4 files changed, 26 insertions(+), 55 deletions(-) delete mode 100644 platform/linux-generic/include/api/odp_compiler.h diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 4535c57..51cf69c 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -14,7 +14,6 @@ include_HEADERS = \ $(top_srcdir)/platform/linux-generic/include/api/odp_buffer_pool.h \ $(top_srcdir)/platform/linux-generic/include/api/odp_byteorder.h \ $(top_srcdir)/platform/linux-generic/include/api/odp_classification.h \ - $(top_srcdir)/platform/linux-generic/include/api/odp_compiler.h \ $(top_srcdir)/platform/linux-generic/include/api/odp_config.h \ $(top_srcdir)/platform/linux-generic/include/api/odp_coremask.h \ $(top_srcdir)/platform/linux-generic/include/api/odp_crypto.h \ diff --git a/platform/linux-generic/include/api/odp.h b/platform/linux-generic/include/api/odp.h index b7b1ca9..920fc58 100644 --- a/platform/linux-generic/include/api/odp.h +++ b/platform/linux-generic/include/api/odp.h @@ -19,10 +19,8 @@ extern "C" { #endif #include - #include #include -#include #include #include #include diff --git a/platform/linux-generic/include/api/odp_byteorder.h b/platform/linux-generic/include/api/odp_byteorder.h index 5890011..f5514d9 100644 --- a/platform/linux-generic/include/api/odp_byteorder.h +++ b/platform/linux-generic/include/api/odp_byteorder.h @@ -21,7 +21,32 @@ extern "C" { #include #include #include -#include + +/** @addtogroup odp_compiler_optim + * Macro for old compilers + * @{ + */ + +/** @internal GNU compiler version */ +#define GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) + +/** + * @internal + * Compiler __builtin_bswap16() is not available on all platforms + * until GCC 4.8.0 - work around this by offering __odp_builtin_bswap16() + * Don't use this function directly, instead see odp_byteorder.h + */ +#if GCC_VERSION < 40800 +#define __odp_builtin_bswap16(u16) ((((u16)&0x00ff) << 8)|(((u16)&0xff00) >> 8)) +#else +#define __odp_builtin_bswap16(u16) __builtin_bswap16(u16) +#endif + +/** + * @} + */ /** @defgroup odp_compiler_optim ODP COMPILER / OPTIMIZATION * Macros that check byte order and byte converting operations. diff --git a/platform/linux-generic/include/api/odp_compiler.h b/platform/linux-generic/include/api/odp_compiler.h deleted file mode 100644 index 71a4431..0000000 --- a/platform/linux-generic/include/api/odp_compiler.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (c) 2014, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - - -/** - * @file - * - * Compiler related - */ - -#ifndef ODP_COMPILER_H_ -#define ODP_COMPILER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/** @addtogroup odp_compiler_optim - * Macro for old compilers - * @{ - */ - -/** @internal GNU compiler version */ -#define GCC_VERSION (__GNUC__ * 10000 \ - + __GNUC_MINOR__ * 100 \ - + __GNUC_PATCHLEVEL__) - -/** - * @internal - * Compiler __builtin_bswap16() is not available on all platforms - * until GCC 4.8.0 - work around this by offering __odp_builtin_bswap16() - * Don't use this function directly, instead see odp_byteorder.h - */ -#if GCC_VERSION < 40800 -#define __odp_builtin_bswap16(u16) ((((u16)&0x00ff) << 8)|(((u16)&0xff00) >> 8)) -#else -#define __odp_builtin_bswap16(u16) __builtin_bswap16(u16) -#endif - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif