From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0050.outbound.protection.outlook.com [104.47.40.50]) by dpdk.org (Postfix) with ESMTP id 590697CDE; Wed, 13 Dec 2017 13:54:03 +0100 (CET) Received: from BN6PR03CA0009.namprd03.prod.outlook.com (2603:10b6:404:23::19) by BN1PR0301MB0722.namprd03.prod.outlook.com (2a01:111:e400:4c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Wed, 13 Dec 2017 12:54:01 +0000 Received: from BY2FFO11FD028.protection.gbl (2a01:111:f400:7c0c::163) by BN6PR03CA0009.outlook.office365.com (2603:10b6:404:23::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Wed, 13 Dec 2017 12:54:01 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BY2FFO11FD028.mail.protection.outlook.com (10.1.15.217) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Wed, 13 Dec 2017 12:53:52 +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 vBDCrsSf021824; Wed, 13 Dec 2017 05:53:54 -0700 From: Hemant Agrawal To: CC: , Neil Horman , , Jun Yang Date: Wed, 13 Dec 2017 18:22:54 +0530 Message-ID: <1513169578-28440-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509617335-6354-1-git-send-email-hemant.agrawal@nxp.com> References: <1509617335-6354-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131576432330127671; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(376002)(39860400002)(346002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(575784001)(316002)(86362001)(296002)(50466002)(81166006)(36756003)(81156014)(106466001)(4326008)(105606002)(8676002)(48376002)(498600001)(356003)(8656006)(2351001)(77096006)(2950100002)(6916009)(2906002)(53936002)(50226002)(104016004)(5660300001)(47776003)(85426001)(305945005)(76176011)(54906003)(51416003)(16586007)(8936002)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0722; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:ErrorRetry; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD028; 1:1tDVvzITxSa9cZi3zphVy9tqTrzps0PQsD70ZhxVPnECfaVtkbTMjOrdgjuriUZGu+M9mFO9B7Baj2sXClQrGH1hI5NXtLfis2rLUcAYMEjRp0lxmb/ndqlEwYIzMlLT MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6ed263ad-b534-4303-b937-08d542289050 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:BN1PR0301MB0722; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0722; 3:tcTSqdfel8do+dzfl/bo8NPQ+fAoipdkQgu44AawKNB98+NQeRLpIz9ur22FxstpyHXNWa9J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JLVqH8DYQ3SSDTZrZXlndhM6aBSKbnqpwTTqEvkhGMbwvQYn77tEMBs0QrEQiPVMDXKaBl+zDIKmST9JkOvbVsI5+LCPelYBXga1+0OwVJucoWEQVphpvlUIDJoBrDAwyk2r1OeMh4rW3l0oiwtq3KN0lvt/FEPPYC2Nh/BQfGMzYKIqGlAWBZ/q+J+Cjv5wtS02UEJa9lgDCVdyuyBQqgyUE0QTvFlXazAGPzF07UIV4wMrTEY/8fv2+sZbS0vXPVEnQ5G2AE5DVf 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)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231023)(6055026)(6096035)(20161123563025)(20161123561025)(20161123565025)(20161123559100)(20161123556025)(201703131430075)(201703131520075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(201708071742011); SRVR:BN1PR0301MB0722; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN1PR0301MB0722; X-Forefront-PRVS: 052017CAF1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR0301MB0722; 23:uppSYEdY4csZTtZv/vTnPGguFFlulHvhvqL6aC6?= =?us-ascii?Q?EmplQOzqZVLjKsvhY2VAxU0I4wCTVGop60Z+hZvA2w2SXRikfkM4WX0IWS3G?= =?us-ascii?Q?C6P41urvZaBbqNXVpfGtc6wuoKs/oG3aKxjjmRVzvVnA3K3jUKmXxPRBIvDh?= =?us-ascii?Q?Kk+kXQJFyiDk5gxbTFI+JYDY+C+W77QQyv7+No599mU8E2N7rJ5c13E4Tr25?= =?us-ascii?Q?/mBZNwxIm0021Z1V2nY+76QHYSRAc/NQ9/3lIHaBVnsxHl4/MAkzZ4nMGIT9?= =?us-ascii?Q?BPNYx/rr72S/T25hl+w7HNfB1WxpuAJSXnIZOvozB2ucGtxBjZxRu56Oh2K3?= =?us-ascii?Q?pSfjJtWgz+eeAtkvCB4HMXEuVSxMtjGt3injCC489Sxn0T4rdpSw89qfENRi?= =?us-ascii?Q?7TjLpbbBWqDZVwpanKLpoF6dNBDtM3+ksm5TBo6X/NknFUwqBeU/cqkclxxq?= =?us-ascii?Q?jP5A0I9J1OOYgQM60kyxyWx0xHRHKCLmt/6pK3EbaIMBThnAoTgiWuhWqUuO?= =?us-ascii?Q?+N87Mfd32yzmqjV5/1YP42tycO/P56uZYWIZd3fLquhoWci90m2LCl3q4B6d?= =?us-ascii?Q?eJzciE68nzSGdbg0cJmYgRKgaNurnw2h9a3QvP3y2GuERCSXwACa28M0MR27?= =?us-ascii?Q?MXovjdwGzEJH+M0PnSQjFxL1hKhZmInd/qp3E3XIwkd04efMY33UoxN6hDKU?= =?us-ascii?Q?irnY2PZruunFtH9wa3g7UxblTabbB5ZHs91q28pQ6VkKv3grQjIw5dGsl8tS?= =?us-ascii?Q?Pvvc/H5adjniN1bWTJrj7f+QDn12i5wbtCuawML3DOSkgpSNb6EJEdSXWGpe?= =?us-ascii?Q?0PqL1cSKLXsCe7PiYlzTesOezgzjcVjHKDeXiXZZlHZb23+SeRVSZHY3qEO2?= =?us-ascii?Q?NXQLfgrILnCW7rt67RQxBaYGLQL1d3s55bn+G4LSx4f5oo00CjfWA8IRbHX2?= =?us-ascii?Q?xDRNhMnccXWgQGIDSDME8NvUalTFVDFfeaxAZjy6Vk34IhfLtWMp3QB1FCfM?= =?us-ascii?Q?GtLM5lmzSoZ0/nfXvctJHa1y5KBpVE/WJWjiPJGy545ZtfEo0ZRvti2YaQPv?= =?us-ascii?Q?eU1GQlIVOpD7S7CBYKjJB3d8a3Mtx?= X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0722; 6:Gw3pYIgK0Crs30p8cQKn4wnWCx2BUSQVB5Z+c2xECAamHvnAkipdH149cJ+Q76IlUA1dfiz49UBRiZHvOaeI/GKkYRLy7/H5rhAi4e3BBqItemF176yffbGgXTrHbeZKYHc7/72smWxJX8MHD8nCIB0iD7vU8FyzuE+gMkx2GvLI2hvuHtvuKsXdYrWx0feXFw77Mr2s7KYQMP9WBiVx0kaBjvCbb3H67dO5Fmn/8U4kjWA8yCoq3GKL76dcnLca43Hr6y7xLMjTZCR5g/IKvvD7sFR6LyIyM0ABOVmLEkslppLxddvc2CQ5Sy+qmbk4rE4dLR3hQSXyAk0WgcaOeVE/q3UShrsfX3Grf7EOAz4=; 5:INsRt/NpvASnoRMIt3jQsnWxJEgqAAUAPgS5lsToVa53V/XLtqH+RZNGqZ4nIVu7yZizeCCJpT3i1V0TpPjbF7ipz9xYJ6/V2V64d35R2e4rBJt9Vp2F3+QKC4AW+xLp4EoEcrz5FKMmDRfq2UUtxM/EXcmTYDn7SB3br/EsTjo=; 24:ngJvaF793JvWLUU58QHcSl21foG9bFSmmqlLha2712C+A0duqqU3v29980zgmS4/ThQH3np5uX7lQ+n5tcQ239AYBzg2NVwJJBIsLb5BtNE=; 7:G7Og23Jl/RUrUa6jpYD2bOpYwF8bob9P0GffzuOJyxGH140uaIpZTKQexexJLa39pl7QiiJIBjSXIxL3WzMMtyo9w61R9uENBd3Gsu/G+cX59hvp8dV34uq4f4DC60wGlCsVfII6PvPCSmgjwjgpMoJQ+rdPHQ6Ryen+KTqFMHzDgNBwzEFrBdqOxgV3OimHVzHHf/z+WTaiyJ7+eulHQy2RvyvPyb6xkNhHl0uYNsUFDY5tXPFFDaD3+IXzlVwV SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2017 12:53:52.5603 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6ed263ad-b534-4303-b937-08d542289050 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: BN1PR0301MB0722 Subject: [dpdk-stable] [PATCH v2 1/5] pmdinfogen: fix cross compilation for ARM BE X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 12:54:04 -0000 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 -- v2: add descriptions and one more place for fix buildtools/pmdinfogen/pmdinfogen.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 = -- 2.7.4