From patchwork Wed Oct 14 13:49:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 80747 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6BB41A04B7; Wed, 14 Oct 2020 15:49:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B24F01DE37; Wed, 14 Oct 2020 15:49:53 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id 106C81DE35 for ; Wed, 14 Oct 2020 15:49:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602683389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4imZ0wZQZWtCAGETzmwzi2dqncFx31Dsy6+R3jTj2gE=; b=XIgWyFQy+eCojs1njS/5p7FnSDVyzAJPnECrzuvjE+z0Vll4QZWPsniAOf2gAY3TQgCm6R rXxdJ7VOKPzZ9VFL2mZKGB54C1D0wRbzDKak0IOQyd8u73o1dTe7TXym1dM+Vd/0Eohr6R MqjQdESqQWD6wU9zdKLdHxwf4HSK6Lc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-459-zAZzP1r4OAKNCqMLLqubcQ-1; Wed, 14 Oct 2020 09:49:47 -0400 X-MC-Unique: zAZzP1r4OAKNCqMLLqubcQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DB91F8CCB86; Wed, 14 Oct 2020 13:49:45 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.194.175]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3831E60C0F; Wed, 14 Oct 2020 13:49:42 +0000 (UTC) From: David Marchand To: dev@dpdk.org, radu.nicolau@intel.com Cc: Ruifeng Wang , Jerin Jacob , Jan Viktorin , Bruce Richardson , Konstantin Ananyev Date: Wed, 14 Oct 2020 15:49:31 +0200 Message-Id: <20201014134931.11203-1-david.marchand@redhat.com> In-Reply-To: <20201014081430.31349-1-david.marchand@redhat.com> References: <20201014081430.31349-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH v2] eal: add experimental tags for write combining store X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Only marking the doxygen declarations is not enough. Arch specific implementations must be tagged as well since there is no common declaration of those inlines. Fixes: 8a00dfc738fe ("eal: add write combining store") Signed-off-by: David Marchand Reviewed-by: Ruifeng Wang Reviewed-by: Radu Nicolau --- Changelog since v1: - fix 32-bit build by adding missing rte_compat.h include, --- lib/librte_eal/arm/include/rte_io_64.h | 2 ++ lib/librte_eal/include/generic/rte_io.h | 1 + lib/librte_eal/x86/include/rte_io.h | 9 +++++++++ 3 files changed, 12 insertions(+) diff --git a/lib/librte_eal/arm/include/rte_io_64.h b/lib/librte_eal/arm/include/rte_io_64.h index d07d9cb226..f9a1f10ce7 100644 --- a/lib/librte_eal/arm/include/rte_io_64.h +++ b/lib/librte_eal/arm/include/rte_io_64.h @@ -164,12 +164,14 @@ rte_write64(uint64_t value, volatile void *addr) rte_write64_relaxed(value, addr); } +__rte_experimental static __rte_always_inline void rte_write32_wc(uint32_t value, volatile void *addr) { rte_write32(value, addr); } +__rte_experimental static __rte_always_inline void rte_write32_wc_relaxed(uint32_t value, volatile void *addr) { diff --git a/lib/librte_eal/include/generic/rte_io.h b/lib/librte_eal/include/generic/rte_io.h index 0669baa0b6..ebcf8051e1 100644 --- a/lib/librte_eal/include/generic/rte_io.h +++ b/lib/librte_eal/include/generic/rte_io.h @@ -14,6 +14,7 @@ #include #include +#include #include #ifdef __DOXYGEN__ diff --git a/lib/librte_eal/x86/include/rte_io.h b/lib/librte_eal/x86/include/rte_io.h index c035eecc6a..730f958758 100644 --- a/lib/librte_eal/x86/include/rte_io.h +++ b/lib/librte_eal/x86/include/rte_io.h @@ -28,6 +28,7 @@ __rte_x86_movdiri(uint32_t value, volatile void *addr) : "a" (value), "d" (addr)); } +__rte_experimental static __rte_always_inline void rte_write32_wc_relaxed(uint32_t value, volatile void *addr) { @@ -47,11 +48,19 @@ rte_write32_wc_relaxed(uint32_t value, volatile void *addr) } } +__rte_experimental static __rte_always_inline void rte_write32_wc(uint32_t value, volatile void *addr) { + /* gcc complains about calling this experimental function even + * when not using it. Hide it with ALLOW_EXPERIMENTAL_API. + */ +#ifdef ALLOW_EXPERIMENTAL_API rte_wmb(); rte_write32_wc_relaxed(value, addr); +#else + rte_write32(value, addr); +#endif } #ifdef __cplusplus