From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4FAC6A0C46; Wed, 9 Jun 2021 13:43:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 166E34069B; Wed, 9 Jun 2021 13:43:29 +0200 (CEST) Received: from mail-il1-f172.google.com (mail-il1-f172.google.com [209.85.166.172]) by mails.dpdk.org (Postfix) with ESMTP id B273B4003C; Wed, 9 Jun 2021 13:43:27 +0200 (CEST) Received: by mail-il1-f172.google.com with SMTP id h3so6212843ilc.9; Wed, 09 Jun 2021 04:43:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aaedCtIGqrIai2Ndvh78N3bDwR9aE7AwWlfyjQjzmIU=; b=XXm+b7EV2UYt+WePXZQL+nlawW0t1ryLSdnIBombYhCEk5HijCXlPIhZiCeyX8XzeL kXxbxKQ0W/j3KC7fZ2mKS6M6EoM4reCL81NKYF9//B81reqeVOLOxTbCOBaSeHNmwldV jnLRdzc9R7ef5CjJpJdLsO5S+xcchtGPARn/aGGzRlwJXInLsfvnsFSFwRtrTISUW0ZL MTWOM58O/vbKqg+iBTjNxQM6mtgNqbXf/q/ulTVCebdFt2rV3C3ug6N1ld9nPpgvLfaC pmvmOM8JpcP7E4EdHpcX/SBnh7C8tTdO+3lLQdV+FxrClQFbi+jvRyXpuNBfGw2CfNcR kO+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aaedCtIGqrIai2Ndvh78N3bDwR9aE7AwWlfyjQjzmIU=; b=gplU2q7mshb9J84dfrA1/PwUykQ2xMtCmAk2PnxwdNau571qxkan0MeLc0qAQNO8gA cOSarDQHG8BeFz9sZNqtn08geDCp5T9AT+jqfd+fAKs6RPH5rZfOmw12rUhyVNQIDqSx FBlp7Mje4moAgAeVPZ2fMNMK/TezBOt3MWBIembDUTaI+gxde5Cu76W3cf/Y6WjcHT0r UGobu3qnfxrPdnCwJ1iSXOcyHceo08Hh3d8lFvcuASBQYdJ7Q1KVelgO5U3llXCBWf3t b5QjBO3g0hSuDtGSuT3NeVOQ2eRd8Kn6PMu47mH1WSxMMXblzKl3rB7fzRWkPUwFLRuK a6XA== X-Gm-Message-State: AOAM532uIQU+UrdI5+fZd2FMTkG72OWZCpW1/LpTlIRABc6O8EPkDrgG qeEcb/Guyuws9ySzOEzh1oeHE36q72R2AP6TAd4= X-Google-Smtp-Source: ABdhPJylJdoU2GQh3hG/rKw4yHeHs/ioC380UIhDHMa8JNXsDJFBpChSI4857N5R0wLoYHD6ERAfkOYn7rFlE3Px6NQ= X-Received: by 2002:a05:6638:2190:: with SMTP id s16mr25089036jaj.133.1623239007007; Wed, 09 Jun 2021 04:43:27 -0700 (PDT) MIME-Version: 1.0 References: <20210609101755.20769-1-michael.pfeiffer@tu-ilmenau.de> In-Reply-To: <20210609101755.20769-1-michael.pfeiffer@tu-ilmenau.de> From: Jerin Jacob Date: Wed, 9 Jun 2021 17:13:11 +0530 Message-ID: To: Michael Pfeiffer Cc: Jan Viktorin , Ruifeng Wang , Jerin Jacob , dpdk-dev , dpdk stable , kosar@rehivetech.com, Phil Yang , Joyce Kong Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v5] eal: arm: fix out of tree build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" On Wed, Jun 9, 2021 at 3:48 PM Michael Pfeiffer wrote: > > Including various headers may fail for ARM builds with 'Platform must > be built with RTE_FORCE_INTRINSICS' if rte_config.h is not included > before. Move the error message after the includes to ensure rte_config.h > is always included. > > Fixes: de966ccdcd7f ("eal/arm: add byte order operations for ARM") > Fixes: 17d5fa0fa90d ("eal/arm: add atomic operations for ARMv7") > Fixes: d708f01b7102 ("eal/arm: add atomic operations for ARMv8") > Fixes: 2173f3333b61 ("mcslock: add MCS queued lock implementation") > Fixes: 7860c3965483 ("eal/arm: add spinlock operations for ARM") > Fixes: ca49b92079df ("ticketlock: enable generic ticketlock on all arch") > Cc: stable@dpdk.org > Cc: kosar@rehivetech.com > Cc: phil.yang@arm.com > Cc: joyce.kong@arm.com > > Signed-off-by: Michael Pfeiffer Acked-by: Jerin Jacob > --- > v5: > * Add Fixes: tag. > > v4: > * Apply to fix to rte_atomic_{32,64}.h, rte_{mcs,spin,ticket}lock.h as > well. > * Remove unnecessary include of rte_config.h. > * Adjust commit message. > > v3: > * Proper in-reply-to. > > v2: > * Fixed subject line. > > lib/eal/arm/include/rte_atomic_32.h | 8 ++++---- > lib/eal/arm/include/rte_atomic_64.h | 8 ++++---- > lib/eal/arm/include/rte_byteorder.h | 8 ++++---- > lib/eal/arm/include/rte_mcslock.h | 8 ++++---- > lib/eal/arm/include/rte_spinlock.h | 8 ++++---- > lib/eal/arm/include/rte_ticketlock.h | 8 ++++---- > 6 files changed, 24 insertions(+), 24 deletions(-) > > diff --git a/lib/eal/arm/include/rte_atomic_32.h b/lib/eal/arm/include/rte_atomic_32.h > index c00ab78dba..138abd3a8b 100644 > --- a/lib/eal/arm/include/rte_atomic_32.h > +++ b/lib/eal/arm/include/rte_atomic_32.h > @@ -5,16 +5,16 @@ > #ifndef _RTE_ATOMIC_ARM32_H_ > #define _RTE_ATOMIC_ARM32_H_ > > -#ifndef RTE_FORCE_INTRINSICS > -# error Platform must be built with RTE_FORCE_INTRINSICS > -#endif > - > #ifdef __cplusplus > extern "C" { > #endif > > #include "generic/rte_atomic.h" > > +#ifndef RTE_FORCE_INTRINSICS > +# error Platform must be built with RTE_FORCE_INTRINSICS > +#endif > + > #define rte_mb() __sync_synchronize() > > #define rte_wmb() do { asm volatile ("dmb st" : : : "memory"); } while (0) > diff --git a/lib/eal/arm/include/rte_atomic_64.h b/lib/eal/arm/include/rte_atomic_64.h > index fa6f334c0d..2907a95196 100644 > --- a/lib/eal/arm/include/rte_atomic_64.h > +++ b/lib/eal/arm/include/rte_atomic_64.h > @@ -6,10 +6,6 @@ > #ifndef _RTE_ATOMIC_ARM64_H_ > #define _RTE_ATOMIC_ARM64_H_ > > -#ifndef RTE_FORCE_INTRINSICS > -# error Platform must be built with RTE_FORCE_INTRINSICS > -#endif > - > #ifdef __cplusplus > extern "C" { > #endif > @@ -19,6 +15,10 @@ extern "C" { > #include > #include > > +#ifndef RTE_FORCE_INTRINSICS > +# error Platform must be built with RTE_FORCE_INTRINSICS > +#endif > + > #define rte_mb() asm volatile("dmb osh" : : : "memory") > > #define rte_wmb() asm volatile("dmb oshst" : : : "memory") > diff --git a/lib/eal/arm/include/rte_byteorder.h b/lib/eal/arm/include/rte_byteorder.h > index df2f1d87ba..c00bebf680 100644 > --- a/lib/eal/arm/include/rte_byteorder.h > +++ b/lib/eal/arm/include/rte_byteorder.h > @@ -5,10 +5,6 @@ > #ifndef _RTE_BYTEORDER_ARM_H_ > #define _RTE_BYTEORDER_ARM_H_ > > -#ifndef RTE_FORCE_INTRINSICS > -# error Platform must be built with RTE_FORCE_INTRINSICS > -#endif > - > #ifdef __cplusplus > extern "C" { > #endif > @@ -17,6 +13,10 @@ extern "C" { > #include > #include "generic/rte_byteorder.h" > > +#ifndef RTE_FORCE_INTRINSICS > +# error Platform must be built with RTE_FORCE_INTRINSICS > +#endif > + > /* fix missing __builtin_bswap16 for gcc older then 4.8 */ > #if !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) > > diff --git a/lib/eal/arm/include/rte_mcslock.h b/lib/eal/arm/include/rte_mcslock.h > index 896d678073..915a3ed647 100644 > --- a/lib/eal/arm/include/rte_mcslock.h > +++ b/lib/eal/arm/include/rte_mcslock.h > @@ -5,16 +5,16 @@ > #ifndef _RTE_MCSLOCK_ARM_H_ > #define _RTE_MCSLOCK_ARM_H_ > > -#ifndef RTE_FORCE_INTRINSICS > -# error Platform must be built with RTE_FORCE_INTRINSICS > -#endif > - > #ifdef __cplusplus > extern "C" { > #endif > > #include "generic/rte_mcslock.h" > > +#ifndef RTE_FORCE_INTRINSICS > +# error Platform must be built with RTE_FORCE_INTRINSICS > +#endif > + > #ifdef __cplusplus > } > #endif > diff --git a/lib/eal/arm/include/rte_spinlock.h b/lib/eal/arm/include/rte_spinlock.h > index a973763c23..e29ddab89a 100644 > --- a/lib/eal/arm/include/rte_spinlock.h > +++ b/lib/eal/arm/include/rte_spinlock.h > @@ -5,10 +5,6 @@ > #ifndef _RTE_SPINLOCK_ARM_H_ > #define _RTE_SPINLOCK_ARM_H_ > > -#ifndef RTE_FORCE_INTRINSICS > -# error Platform must be built with RTE_FORCE_INTRINSICS > -#endif > - > #ifdef __cplusplus > extern "C" { > #endif > @@ -16,6 +12,10 @@ extern "C" { > #include > #include "generic/rte_spinlock.h" > > +#ifndef RTE_FORCE_INTRINSICS > +# error Platform must be built with RTE_FORCE_INTRINSICS > +#endif > + > static inline int rte_tm_supported(void) > { > return 0; > diff --git a/lib/eal/arm/include/rte_ticketlock.h b/lib/eal/arm/include/rte_ticketlock.h > index e66beefbe2..22eb40fb66 100644 > --- a/lib/eal/arm/include/rte_ticketlock.h > +++ b/lib/eal/arm/include/rte_ticketlock.h > @@ -5,16 +5,16 @@ > #ifndef _RTE_TICKETLOCK_ARM_H_ > #define _RTE_TICKETLOCK_ARM_H_ > > -#ifndef RTE_FORCE_INTRINSICS > -# error Platform must be built with RTE_FORCE_INTRINSICS > -#endif > - > #ifdef __cplusplus > extern "C" { > #endif > > #include "generic/rte_ticketlock.h" > > +#ifndef RTE_FORCE_INTRINSICS > +# error Platform must be built with RTE_FORCE_INTRINSICS > +#endif > + > #ifdef __cplusplus > } > #endif > -- > 2.32.0 >