From patchwork Mon Dec 18 07:56:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 122185 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2526615qgn; Sun, 17 Dec 2017 23:57:58 -0800 (PST) X-Google-Smtp-Source: ACJfBovD/BgamBaPPxnMmRb3f/TUp2NmWvenRiJPFwYvFz6VP2gcchpkWoyC1gfs/xZR7rWyq6+N X-Received: by 10.28.72.9 with SMTP id v9mr11978871wma.102.1513583878311; Sun, 17 Dec 2017 23:57:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513583878; cv=none; d=google.com; s=arc-20160816; b=IilV8x0/q2Uqv1d+eLO7UKd91Vk/7ON+jlVH6jlz/omaYJo+9OnGEg1YEIKcpqk6da XhZ56JFfYKEcjsE5qQ7Yik/1b+kGrT6RaQN/kP/j5p+3mkefs2RM7AEFOZlLP84SIhbv Bl3MA6Sl87V8P3O86JC8Blc1+33A4u37pKgzanSQtrdaLygD823HE4QhttTIPg8PDKNa W2cH7MddX7Hzz1a6K1X+supJEFJe64NTV1PphUTbnpS9RbHMfjpUsDNo3YCEKZhWZdfA Qxci23ArnvC3Bvg0XhqeHxK+tfdNQSh4a0iZyd2Yzm3dGiOGRZPz6mL3xRKTpQPfz2Zm yR0g== 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:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=mdd5/xk76ICfzbynQyeoe/d3e/zi3l/jZgR1/SIdvtk=; b=rSkh/U3nySixnCFKMBdYjyTkJDIu+td3wB/FSmyuTcxDCjgU/yIfhoeYsQSuUD7/D/ Q9uBwvMfnuZAY7ZC4jgFtxdcjCJAJ4A44kTrXuH0Ckt17cpNxuYgzApWpeVCV0wpO8+y jpf4RjlKtHDkXqLoSJZRnKIyoxNX5KX1LCp82xpcI75Q99XpgT48gUgDCxhsBunSftxH gdvt1cHBfqHTXJ1KqtZztk8woHUDbTK10GqVLgX6d2uWpLf4l2jWTdE72+86hjxB9gQt 8ByI5LE8qdKIRNjXeU4guBpUQrvD3J5k7eunRF0zkRgw/GVMfiThLbeqd90teRTS9Qwq dhjQ== 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 h8si9036506wrh.277.2017.12.17.23.57.58; Sun, 17 Dec 2017 23:57:58 -0800 (PST) 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 13B3429CF; Mon, 18 Dec 2017 08:57:57 +0100 (CET) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0054.outbound.protection.outlook.com [104.47.40.54]) by dpdk.org (Postfix) with ESMTP id 99BF01DBF; Mon, 18 Dec 2017 08:57:54 +0100 (CET) Received: from BN6PR03CA0059.namprd03.prod.outlook.com (10.173.137.21) by CY1PR0301MB0729.namprd03.prod.outlook.com (10.160.159.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Mon, 18 Dec 2017 07:57:52 +0000 Received: from BN1BFFO11OLC001.protection.gbl (2a01:111:f400:7c10::1:145) by BN6PR03CA0059.outlook.office365.com (2603:10b6:404:4c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.323.15 via Frontend Transport; Mon, 18 Dec 2017 07:57:52 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11OLC001.mail.protection.outlook.com (10.58.145.12) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.302.6 via Frontend Transport; Mon, 18 Dec 2017 07:57:40 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vBI7vl6E011541; Mon, 18 Dec 2017 00:57:48 -0700 From: Hemant Agrawal To: CC: , , , , Jun Yang Date: Mon, 18 Dec 2017 13:26:45 +0530 Message-ID: <1513583809-3926-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513169578-28440-1-git-send-email-hemant.agrawal@nxp.com> References: <1513169578-28440-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131580574609984214; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(396003)(376002)(39860400002)(39380400002)(346002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(16586007)(316002)(8936002)(50226002)(68736007)(48376002)(85426001)(51416003)(4326008)(54906003)(77096006)(498600001)(53936002)(86362001)(97736004)(8656006)(575784001)(6666003)(105606002)(5660300001)(8676002)(47776003)(81156014)(104016004)(81166006)(36756003)(2906002)(2351001)(106466001)(50466002)(305945005)(356003)(6916009)(2950100002)(76176011); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB0729; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11OLC001; 1:5YyTWPCk2xef/2Bb+MbOSLzUVl2xtqUkaWQPpNpLZ9wlHnkM/q0ZMuPTxB+HSfkh438dnmvaqfj/uAdfKI8kQV13E1fmv95UtiiGW+yUpY+keY2vGAKu3bcApirYdWBC MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3fc11f5b-3350-411a-4ad6-08d545ed036f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:CY1PR0301MB0729; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0729; 3:KO6Ekdki0Mf/e6mYlTYX8nrROPSl5nnKIhn/DQVmCpT1AQkQHnOJ5fqfOH0syq1vnyafZsKCoJ4gM0GK0Cd69SoZEV/ViPv8YzigRgemZ9FKzF612uxYrRIgZtJTqZ/wGlE1FeMcJdbJ3WLkUtbr7kOQyj4gUaD0fKwLfO3iPi6RoYiYOiT6o8oAZRiDkwofJ1cDAopwYf6cnm2JnCmx2dDUQqXHsZ6TpvRV9seYhLZP0u9cwCeLiS61dUufHYBy+ZrvPYfHZWs9bE446DpFJQ6yrqroO8Sy2WTYCt7A8ebnMp40Q8J/bgLJanh6CudTMY5C0hK/YtEmPf4KvK8g8LHAj7bhryc8x/s0tb7mEVs=; 25:v2CNX2xMVIHQvVzR9yqnKnwj+xQ3VOb7vyxBlFSRDbAS7oFNgz8KNCHnBJghkGgMUiLDwwstcYAccnI12JgntHaMqUFKMMFX5jyenaFRfua7/kQUvetUuYSS+HpU9RRUw+XIdFTVTLBJoUKgvmIo/pQ0yAU/u3ySw2jwBiprX3uj1uKNi821nXqMn34qkpXK8rAf/5rR1ZlZPFlpLHyC5vmImmQFfvFHU/mIk7r5iIqwgaSSPfBUYGUqClKE2Qo8HUZ0QTc+NxLYNJKxaKSo+xIqEaLRMOtGYAHV6uA+7fQyf90ETA4yWIuv2B4w/x15VJvw1n4vTjkgxqKpQQIHRA== X-MS-TrafficTypeDiagnostic: CY1PR0301MB0729: X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0729; 31:uFm8pNd1i/+Gqqu9mmQkfqPGNYm6SCtAxad+Xc0U2snZVjngh6KPERBUJyIdza+nBHRXt94HmGsCaI3jY3thlWjai6VERHteMjtwK8d4Sig64dw6/dE3RfSM9u1WA8/Kf392/cexN0grGvzz2u5gldcTFEDZyJcv6PyVQA8B3FpSw1HH2wePrlperyXo2rjNra2KM91+kEUXyjfVEkaglftT5qlTb1tLjD66yLDsBkQ=; 4:6dRXpFJWD7ROIYM/8Tw63IYT3O4JSi1d+G3EhLd0iZoZGOAHLk5nSDtI53lqpr0DZJnDBLz9ug29Z2ecyFruuFg1yRJgtPWm4tgBL/KBn6RR4fEsAR1uWDX5r39v+T1m+evX9bchMxPYKo7l8bWlbmi2SOPdgwZRYJtybCEEk6rwgQeTGA184LMWW5rreQhT00//LLw5ZExWRSGg/MNNneqOCSxHUW+RJ4fmdw+9DKY3lyLF/uCVghnzwvw0f987el6ygNL7hCjnLJTI+DxRoyegdcdyAt4L4ga0zbTGlwDc5MdcKgzvNaaSpXP66WWCjXiqceVeDPy6BoxSOM/2dmwSq0Uu1w9ZYhAFGE5b516sa1p8Q28ASW0i4a3Iq7ah X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3231023)(3002001)(93006095)(93001095)(10201501046)(6055026)(6096035)(20161123561025)(20161123565025)(20161123556025)(20161123559100)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123563025)(201708071742011); SRVR:CY1PR0301MB0729; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY1PR0301MB0729; X-Forefront-PRVS: 0525BB0ADF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB0729; 23:g7Fzxp2T1MxBP4AT1FEzKd8/Egv4gzu1xywLgSZ?= 1nruLOfTzwgAzOha7aQVITAWYyM+R8dAcP4gbYWNfGRIWRdbJyUwN7VnsYqPm4D74eY4qbv5woIWQdCgU8y6c9HdSp1jGTcXNGVZXHN7XIZgu30m9GwijT3fniT/o0ALsonEM7lRYpMh3dqimK5lB63A/XlCVw1q53cu43+A0cls62JPXzejBWzZtjou78ikBk5PnYHr9tO50Nd4+h8w/DgJH/8m4K9TPwpmXhmbL/fAkjfwI3G1KMuq7yUVqzCKR1HgKyDlV1+/OvnOHSpFWqL1Mdi19JYK1e0181qj86z1nSv02GzyH9KJayXfIW5U0PK32ELxJb11PAI+0r6QLSqL7k45FXz23b059l8S6aFB2q0HpWIFbETYBUkglFP3kRRcHObc4nYGLEvKRHdf6tcbcF85OK/es1Yt0/mefQgKpVHFUMH5fX1AYWiNM0y+jEw44noMn7ogtxEeEzJJA9CuSKaSpy7JfnwK8SDbyTrZp/93+jrxUgwninOOJG0e9ZtYPeN1l3ITxqBZdjmzIyh/+RieJ1LBYdGR6kRr7XjCv70V7OXbE3tDeCewNQSAlqOft+Jn1H3Thly8biI9QWpxadnX2Dp8cdeTMWjGj6QI3X3TtxPNyEyEWn28xKqIsVBaIYrm3dyV1beJQsFqek569dLFNCTAAn1gsv9FLZFKYYxlQgpK//McJL66/aafQq+EuVt/9masOzCfyoyCOeoBnAkT11AoOrQzLeVUyFjtWD9OavBqQH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ru7ualHI+LygDKnELJSM25CuX3M97QMzHNvlW2WhIPH5GJ7MbmLUSanHb8EnMZ8xgTPN5ewfxks1RR4S6tcKQgkLvqPokP9B+a3/yBJrGYSsyZGzJUIsvYOQ4WboDerUJ/aspt/TyK7z2JR7trbfFmnPxj2jevEQkCVZB4rfudND9PTXe330VsjWTbfwnxd2Kn3LNskfi SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2017 07:57:40.8268 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3fc11f5b-3350-411a-4ad6-08d545ed036f X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB0729 Subject: [dpdk-dev] [PATCH v3 1/5] pmdinfogen: fix cross compilation for ARM BE 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" Cross compiling DPDK for BE mode on ARM results into errors "PMDINFO portal/dpaa2_hw_dpio.o.pmd.c No drivers registered" The original code assumes the sh_size to be 32 bit, while it can be Elf32_Word or Elf64_Xword based on 32bit or 64 bit systems. This patches replaces the sh_size conversion routines to use ADDR_SIZE Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility") Cc: Neil Horman Cc: stable@dpdk.org Signed-off-by: Jun Yang Signed-off-by: Hemant Agrawal Acked-by: Bruce Richardson Acked-by: Neil Horman --- buildtools/pmdinfogen/pmdinfogen.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c index 96ccbf3..b07dbcf 100644 --- a/buildtools/pmdinfogen/pmdinfogen.c +++ b/buildtools/pmdinfogen/pmdinfogen.c @@ -158,7 +158,8 @@ static int parse_elf(struct elf_info *info, const char *filename) * There are more than 64k sections, * read count from .sh_size. */ - info->num_sections = TO_NATIVE(endian, 32, sechdrs[0].sh_size); + info->num_sections = + TO_NATIVE(endian, ADDR_SIZE, sechdrs[0].sh_size); } else { info->num_sections = hdr->e_shnum; } @@ -181,7 +182,7 @@ static int parse_elf(struct elf_info *info, const char *filename) sechdrs[i].sh_offset = TO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_offset); sechdrs[i].sh_size = - TO_NATIVE(endian, 32, sechdrs[i].sh_size); + TO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_size); sechdrs[i].sh_link = TO_NATIVE(endian, 32, sechdrs[i].sh_link); sechdrs[i].sh_info =