From patchwork Fri Sep 21 11:06:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 147241 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp672904ljw; Fri, 21 Sep 2018 04:09:54 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdar/QuHpnB1qffeQ77bV+Mda6jfdmET0ZArMVChqJpQLLvxUILtliNX/XSFSYDyiGyqyUhY X-Received: by 2002:adf:e792:: with SMTP id n18-v6mr36791390wrm.136.1537528193863; Fri, 21 Sep 2018 04:09:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528193; cv=none; d=google.com; s=arc-20160816; b=VSSUusGFpsDSTKiJw44XB3c5ZZOnBmegm6CdV4GejY4kNvnm9pBKnXj98mzloBVIfn 9+RRzaAFYkqUJUVQjQdd3VDzWziSmTzKwOXCYhdy5Bl9w3MXsX1eUHC3kkNlojRTZAqE j8a4v5hGemRcPTq2f/EmUjIexo5/q2c7ZvIWmh7fcXjznQD8PdLM/4xR0k/70mbF4FPl 0ByLgYBeM64VGoXpGyxHhXuJfsTwGHz4mSkX4DiXTqq7uUBuuCR7BlAE/PMTXTUdx/VU TS+wNiyQgFAzBOUINtoIi6CuyHcX/6LQISJ6Mj7HbEANVefy7rQv7exPMPPkkNIDFXep I7lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from; bh=ce+FZCsHkf0CJamKhb5d4Qd/9/++YzGbhLytFN7wisI=; b=x8h2zWSp3nGY04U47sYsWrxSJDXMrqEsiZ3pNIBAruJznFueoSufqmHQh2uE09V24x tJd5uA9ZvjezeIxxzy7bZaWo1WGKcaLthNvFD7uyZCn/3n+vqvG22w/D9FmtNERapQxU HvRew+xyB61o097BlYEBUnK9nItmHM+aBfC7wFfgpuR6ElzRdO/oS+XWdqdWx8UVhOcU fWsYBUI9ZEl6q109Dr7ha+yQaFuS3Y4K2liyom+Zd0iTDcOy+LnLprwxlnE2wW3EBUo3 8oFR3piLloumflgzGE0AIy9pyeuQvlfuGihLuppXftFMbQqTSKENKVu4jFWtbyyB45Uu 6blQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id a4si6812032wrx.344.2018.09.21.04.09.53; Fri, 21 Sep 2018 04:09:53 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A99335F24; Fri, 21 Sep 2018 13:08:37 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id EF0945681 for ; Fri, 21 Sep 2018 13:08:14 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D35161A0039; Fri, 21 Sep 2018 13:08:14 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id F3D841A02B6; Fri, 21 Sep 2018 13:08:12 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 819F640324; Fri, 21 Sep 2018 19:08:09 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Fri, 21 Sep 2018 16:36:01 +0530 Message-Id: <1537527962-25757-13-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 12/13] bus/dpaa: add check for re-definition in compat 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" Few fields in compat are giving re-defination error with new drivers such as caam_jr. Checks have been added. Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/include/compat.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/bus/dpaa/include/compat.h b/drivers/bus/dpaa/include/compat.h index 92241d2..4122657 100644 --- a/drivers/bus/dpaa/include/compat.h +++ b/drivers/bus/dpaa/include/compat.h @@ -57,8 +57,9 @@ #ifndef __packed #define __packed __rte_packed #endif +#ifndef noinline #define noinline __attribute__((noinline)) - +#endif #define L1_CACHE_BYTES 64 #define ____cacheline_aligned __attribute__((aligned(L1_CACHE_BYTES))) #define __stringify_1(x) #x @@ -75,20 +76,25 @@ printf(fmt, ##args); \ fflush(stdout); \ } while (0) - +#ifndef pr_crit #define pr_crit(fmt, args...) prflush("CRIT:" fmt, ##args) +#endif +#ifndef pr_err #define pr_err(fmt, args...) prflush("ERR:" fmt, ##args) +#endif +#ifndef pr_warn #define pr_warn(fmt, args...) prflush("WARN:" fmt, ##args) +#endif +#ifndef pr_info #define pr_info(fmt, args...) prflush(fmt, ##args) - -#ifdef RTE_LIBRTE_DPAA_DEBUG_BUS -#ifdef pr_debug -#undef pr_debug #endif +#ifndef pr_debug +#ifdef RTE_LIBRTE_DPAA_DEBUG_BUS #define pr_debug(fmt, args...) printf(fmt, ##args) #else #define pr_debug(fmt, args...) {} #endif +#endif #define DPAA_BUG_ON(x) RTE_ASSERT(x) @@ -256,7 +262,9 @@ __bswap_24(uint32_t x) #define be16_to_cpu(x) rte_be_to_cpu_16(x) #define cpu_to_be64(x) rte_cpu_to_be_64(x) +#if !defined(cpu_to_be32) #define cpu_to_be32(x) rte_cpu_to_be_32(x) +#endif #define cpu_to_be16(x) rte_cpu_to_be_16(x) #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN