From patchwork Wed Dec 10 19:12:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 42098 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A1E7626C75 for ; Wed, 10 Dec 2014 19:12:33 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id b13sf2374279wgh.9 for ; Wed, 10 Dec 2014 11:12:32 -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=zZvwF38TdtU3UOd15QGVX+2FHKucma1Zn23mSaMw6UI=; b=HZGx59CRAOMghEGMMdvKITmwO9YcvO2aXLce0gQG4eRnAOCK2/Kr3N5TYZX1FS3Ax7 FzhbUfoZADSCD7p/S1czLcu7JCMqYh9IQVvPpNWZL09vu5kRtGY0PrQ+SIkfppGyxh7j 3DaCEzDsUAIwkKvIDpF5Jda7vwizgXUlsPg20Xs/d8/Pr8dQlj1MhWtlIzOC+b2ooF13 Jkk+o1FdiCXnvbdU5W3yU90Hg+5bVq/hXwGzf3X9v+C/ii9QGxoRM9PsK2p5YszRp6i7 +b6c/1ULQRw3PLdVLOTWK/KOZRneduRCAALoNusxs/yJdBYy0IUwfIUqf9sJbcKqLfCM P3wQ== X-Gm-Message-State: ALoCoQlcmEVGyZya1T7a7FBxWXyxbkOHKGjca1lMDVIW9LS6yxSFPmFWlQhEHVjXcksNRitgl/2x X-Received: by 10.112.138.234 with SMTP id qt10mr1010564lbb.4.1418238752332; Wed, 10 Dec 2014 11:12:32 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.170.227 with SMTP id ap3ls213385lac.60.gmail; Wed, 10 Dec 2014 11:12:32 -0800 (PST) X-Received: by 10.112.65.195 with SMTP id z3mr5911037lbs.36.1418238752126; Wed, 10 Dec 2014 11:12:32 -0800 (PST) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id ml2si5597015lbc.7.2014.12.10.11.12.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Dec 2014 11:12:31 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by mail-lb0-f174.google.com with SMTP id 10so2947064lbg.33 for ; Wed, 10 Dec 2014 11:12:31 -0800 (PST) X-Received: by 10.112.170.36 with SMTP id aj4mr5649982lbc.3.1418238751861; Wed, 10 Dec 2014 11:12:31 -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.142.69 with SMTP id ru5csp300262lbb; Wed, 10 Dec 2014 11:12:31 -0800 (PST) X-Received: by 10.229.215.137 with SMTP id he9mr11875278qcb.6.1418238749062; Wed, 10 Dec 2014 11:12:29 -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 b4si5811967qan.124.2014.12.10.11.12.27 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 10 Dec 2014 11:12:29 -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 1XymgU-0002up-7Y; Wed, 10 Dec 2014 19:12:26 +0000 Received: from mail-qa0-f48.google.com ([209.85.216.48]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XymgM-0002uk-LF for lng-odp@lists.linaro.org; Wed, 10 Dec 2014 19:12:18 +0000 Received: by mail-qa0-f48.google.com with SMTP id v10so2438215qac.7 for ; Wed, 10 Dec 2014 11:12:13 -0800 (PST) X-Received: by 10.224.80.6 with SMTP id r6mr11398482qak.5.1418238733414; Wed, 10 Dec 2014 11:12:13 -0800 (PST) Received: from fedora1.holmesfamily.ws ([98.221.136.245]) by mx.google.com with ESMTPSA id t17sm5009569qgt.43.2014.12.10.11.12.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Dec 2014 11:12:12 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Wed, 10 Dec 2014 14:12:05 -0500 Message-Id: <1418238725-8877-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: remove internal macros from API 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.174 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 Move remaining API macros that were tagged @internal to the internal header file. Signed-off-by: Mike Holmes --- platform/linux-generic/include/api/odp_align.h | 44 ---------------------- .../linux-generic/include/odp_align_internal.h | 21 +++++++++++ 2 files changed, 21 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..068f0ca 100644 --- a/platform/linux-generic/include/odp_align_internal.h +++ b/platform/linux-generic/include/odp_align_internal.h @@ -43,6 +43,13 @@ extern "C" { /** * @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 cache line size alignment */ #define ODP_CACHE_LINE_SIZE_ROUNDUP(x)\ @@ -72,6 +79,20 @@ extern "C" { #define ODP_CACHE_LINE_SIZE_ROUNDDOWN(x)\ ODP_ALIGN_ROUNDDOWN_POWER_2(x, ODP_CACHE_LINE_SIZE) +/** + * @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))) + /* * Check align */