From patchwork Mon Jan 12 18:43:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 42969 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f199.google.com (mail-we0-f199.google.com [74.125.82.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E5DD920DE8 for ; Mon, 12 Jan 2015 18:44:46 +0000 (UTC) Received: by mail-we0-f199.google.com with SMTP id k11sf10640506wes.2 for ; Mon, 12 Jan 2015 10:44:46 -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=DOIs8Y4Ubfs63dTn8h5W6kiPizktL+MxXiSXC/gtoo0=; b=L7DiGQMG8ZyVow1vLbKGOmjt8mszXfBa7xY8vITn289NOl+RsIBLwiRB1/9xXPZPLI /7cth8CecDbkzz9PIymkyQaDv9bJ8KBsH04Lkm2IJAnOAEM7v8b3cKCgDf/we0eoKwRa RJo+zgj5doJ/OvEVX21lE7ZYsZAJrNwMbyq9qMbRLlFN3ytrY5V8zNncqXGN4I5g++TH E8r7q/yg1sKq/EHObe5bz2s0QKIc8NDyUr4ZoNuRnUM9Tw7Naq02mKYfgwHPj1HK/1k/ R/1hfOUHn8Mp8rXOPponWYBl90eSEjVp+0bAY3dFmggmRjLnFg60iIHabm+bAEGHGob3 GOgw== X-Gm-Message-State: ALoCoQnZwDI3HIXzXQ4sBzpG6e3zVKT6iZW0XzUjXSG7M/ZRbWlDddy+t+3k4HaGs7thQns5OvGr X-Received: by 10.112.37.72 with SMTP id w8mr991486lbj.6.1421088286174; Mon, 12 Jan 2015 10:44:46 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.4.8 with SMTP id ca8ls703898lad.0.gmail; Mon, 12 Jan 2015 10:44:46 -0800 (PST) X-Received: by 10.112.8.41 with SMTP id o9mr27933909lba.40.1421088286027; Mon, 12 Jan 2015 10:44:46 -0800 (PST) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id rf7si22031099lbb.114.2015.01.12.10.44.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Jan 2015 10:44:45 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by mail-lb0-f173.google.com with SMTP id z12so19200742lbi.4 for ; Mon, 12 Jan 2015 10:44:45 -0800 (PST) X-Received: by 10.112.14.6 with SMTP id l6mr38690603lbc.91.1421088285903; Mon, 12 Jan 2015 10:44:45 -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 c8csp1161783lbb; Mon, 12 Jan 2015 10:44:44 -0800 (PST) X-Received: by 10.229.70.133 with SMTP id d5mr52252014qcj.2.1421088284379; Mon, 12 Jan 2015 10:44:44 -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 le8si10184488qcb.11.2015.01.12.10.44.43 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 12 Jan 2015 10:44:44 -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 1YAjyj-0006yr-I6; Mon, 12 Jan 2015 18:44:41 +0000 Received: from mail-qc0-f172.google.com ([209.85.216.172]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YAjye-0006x6-Hv for lng-odp@lists.linaro.org; Mon, 12 Jan 2015 18:44:36 +0000 Received: by mail-qc0-f172.google.com with SMTP id m20so19475100qcx.3 for ; Mon, 12 Jan 2015 10:44:31 -0800 (PST) X-Received: by 10.224.29.209 with SMTP id r17mr37947509qac.67.1421088271298; Mon, 12 Jan 2015 10:44:31 -0800 (PST) Received: from mike-desktop.?.holmesfamily.ws ([98.221.136.245]) by mx.google.com with ESMTPSA id 62sm15459645qgj.16.2015.01.12.10.44.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Jan 2015 10:44:30 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Mon, 12 Jan 2015 13:43:57 -0500 Message-Id: <1421088237-10014-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH] api: align: move macros to internal 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.173 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 These macros were in the pubic API but labeled internal. Signed-off-by: Mike Holmes Reviewed-by: Bill Fischofer --- platform/linux-generic/include/api/odp_align.h | 44 ---------------------- .../linux-generic/include/odp_align_internal.h | 28 ++++++++++++++ 2 files changed, 28 insertions(+), 44 deletions(-) diff --git a/platform/linux-generic/include/api/odp_align.h b/platform/linux-generic/include/api/odp_align.h index 6ec5a0a..741f9fd 100644 --- a/platform/linux-generic/include/api/odp_align.h +++ b/platform/linux-generic/include/api/odp_align.h @@ -79,50 +79,6 @@ extern "C" { /** Page size */ #define ODP_PAGE_SIZE 4096 - -/* - * Round up - */ - - -/** - * @internal - * Round up pointer 'x' to alignment 'align' - */ -#define ODP_ALIGN_ROUNDUP_PTR(x, align)\ - ((void *)ODP_ALIGN_ROUNDUP((uintptr_t)(x), (uintptr_t)(align))) - - -/** - * @internal - * Round up pointer 'x' to cache line size alignment - */ -#define ODP_CACHE_LINE_SIZE_ROUNDUP_PTR(x)\ - ((void *)ODP_CACHE_LINE_SIZE_ROUNDUP((uintptr_t)(x))) - - - -/* - * Round down - */ - - -/** - * @internal - * Round down pointer 'x' to 'align' alignment, which is a power of two - */ -#define ODP_ALIGN_ROUNDDOWN_PTR_POWER_2(x, align)\ -((void *)ODP_ALIGN_ROUNDDOWN_POWER_2((uintptr_t)(x), (uintptr_t)(align))) - - -/** - * @internal - * Round down pointer 'x' to cache line size alignment - */ -#define ODP_CACHE_LINE_SIZE_ROUNDDOWN_PTR(x)\ - ((void *)ODP_CACHE_LINE_SIZE_ROUNDDOWN((uintptr_t)(x))) - - /** Defines type/struct/variable to be cache line size aligned */ #define ODP_ALIGNED_CACHE ODP_ALIGNED(ODP_CACHE_LINE_SIZE) diff --git a/platform/linux-generic/include/odp_align_internal.h b/platform/linux-generic/include/odp_align_internal.h index 498a7a9..b734cc5 100644 --- a/platform/linux-generic/include/odp_align_internal.h +++ b/platform/linux-generic/include/odp_align_internal.h @@ -29,6 +29,20 @@ extern "C" { /** * @internal + * Round up pointer 'x' to alignment 'align' + */ +#define ODP_ALIGN_ROUNDUP_PTR(x, align)\ + ((void *)ODP_ALIGN_ROUNDUP((uintptr_t)(x), (uintptr_t)(align))) + +/** + * @internal + * Round up pointer 'x' to cache line size alignment + */ +#define ODP_CACHE_LINE_SIZE_ROUNDUP_PTR(x)\ + ((void *)ODP_CACHE_LINE_SIZE_ROUNDUP((uintptr_t)(x))) + +/** + * @internal * Round up 'x' to alignment 'align' */ #define ODP_ALIGN_ROUNDUP(x, align)\ @@ -61,6 +75,20 @@ extern "C" { /** * @internal + * Round down pointer 'x' to 'align' alignment, which is a power of two + */ +#define ODP_ALIGN_ROUNDDOWN_PTR_POWER_2(x, align)\ +((void *)ODP_ALIGN_ROUNDDOWN_POWER_2((uintptr_t)(x), (uintptr_t)(align))) + +/** + * @internal + * Round down pointer 'x' to cache line size alignment + */ +#define ODP_CACHE_LINE_SIZE_ROUNDDOWN_PTR(x)\ + ((void *)ODP_CACHE_LINE_SIZE_ROUNDDOWN((uintptr_t)(x))) + +/** + * @internal * Round down 'x' to 'align' alignment, which is a power of two */ #define ODP_ALIGN_ROUNDDOWN_POWER_2(x, align)\