From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0075.outbound.protection.outlook.com [104.47.1.75]) by dpdk.org (Postfix) with ESMTP id 4F8541BB1B for ; Fri, 13 Apr 2018 09:37:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=hcYzSzxrIPMC1yEWaoplYWqLb5ZHIvdw0GPim0FD1e8=; b=bG7AAij8VMJZFpZ1WqkvSt0w7HlyC5WoAbfDiLmFckuYBdU+tP2lXET34ZC1gT/JoF7kYLMpAxgoS4oTdhapGWJ+DSdvZl4mD50ife5Zr2C90g70sxTRarJJ+uSDkE+CzI8uZe9z2Gg40ED0bPyi5SBcAi86onjDOOTvbnYwE7Y= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from [10.232.133.65] (14.142.187.166) by DB4PR04MB0767.eurprd04.prod.outlook.com (2a01:111:e400:984d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.10; Fri, 13 Apr 2018 07:37:52 +0000 To: Gowrishankar , Hemant Agrawal , Shreyansh Jain Cc: Anatoly Burakov , dev@dpdk.org, Thomas Monjalon References: <5438d3242ebb9d995d0a52a63feba80efd783e6f.1523595487.git.gowrishankar.m@linux.vnet.ibm.com> From: Hemant Agrawal Message-ID: <7f634248-2ec5-6c60-0015-a65888b41d01@nxp.com> Date: Fri, 13 Apr 2018 13:07:40 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <5438d3242ebb9d995d0a52a63feba80efd783e6f.1523595487.git.gowrishankar.m@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR01CA0075.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::15) To DB4PR04MB0767.eurprd04.prod.outlook.com (2a01:111:e400:984d::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:DB4PR04MB0767; X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0767; 3:gMduC7ivjnVBBeDLJaA0LYLcZiS/fdXCu3GHjVeJSxmby7Ff9+/ZLdCArCCbQ8VeyfE2cRow++cWSYgca0OEjvaykuhyHv6S8ilZANKH/F/yagWuBOVBYovaxllfAS0JP9YKhEQMzTd0uIy9wR79S20X0l8d1pwpXrrAhNJN20m+XFWoNysvKvmnHrYo5DO3v5klmdiY7xm5ZbPwWsfMkw3XA3BXukEJZfQSFOBOq4oVWa0+oCxN4g8X6RiM7t9h; 25:tFvtEksEpXbMOg9MXvxIx+EBzjgbCtIyC1K6/TUyBy2Vu+ZtP7mdWPBhaYvah9C4E3aJgLjdc+yPF4yYzC7TW7CHUFQIoGHE0LzahWP1cJhNsCVh8/3sDsEr4eZYMjRYl7UQOw9vf4tHEamPGfbuTQzboUCPXL5VLwN3dNtXYM7E9NQP3yrfZFgAvRYChEppxfYLBwFGUuwZ0bxar5+nm+3dV2naHH5Nj79cZyhRmtFdM4pSZlQVniJ08wcGJvUUOPxzRmDahBwAFc/ntX9YLbLZuC9YmcarcAm4ynFjRivQ7ly3JRsMZoecJ/Wnzdnm7W0YhMN7fDZj9UmC2joLmg==; 31:nqlkBOrprn/HykC+DDl40xAi3RZYayClKqIhAlrsXJEpnFjEu9wQ8OvC9ZH/K64VTpxWP/lG3JyYc1k2iMTbIwr8eJlL45zjCx+cu42T6g+mWaua0bY6kdpsAfbMKbrrggkOotFQyntZ/Z3DID7DUul3dnjJoK9aKf5F4TVf5eNkKDX1NCUCM1rYVlmCH2ND6v3p9zFnoRDMTZ2fitc36VzFede1RDWW4xVsySeHeYg= X-MS-TrafficTypeDiagnostic: DB4PR04MB0767: X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0767; 20:SnCYzBMgogi5po71ylfxmjp4oka98PONBRJozaeGIkVtI64+tei3iNV4tyCUTkOEe/1IypqsSWj5twnIxtzbLSkbIDI59vPDx9VpFCzMawIr9EOMO7JpzUR/UZ3ZFw1nwFdNqQajESaMwzNmJBkkXOvDzBHYqEoRld8+TKTGxnmlKXMUxO+GbH29F+6FV+F20qxfiUJFo4aa3Wug7eZcxLuXvh+rvk9vN4anvItW3uJnhtfh97zKRmSYdPtZfHb1VkNGDuTtJd+AHE2PDLuCpjpPISQY1CLNhf2n43373cpWGa9p8RkXgFUdtqDSiV8V4lUaly/99UgNusUQEBL1y4m9bfyidujxyELMr0+iG2W9h6IVGxQvLeBl9Kv4zwJLKLN7vaokpD8TOP4NEm39u2oZK2Ku2ufIo7IiikLNv6c8O32ilNS3LS2X5LLKxMI4oI+kLYJ4AR5BzCpaQKi4m/nK6Q2TttgqH0Vc89dHEGE5T6qeTnpqq0z3RdQyDkKh; 4:b+jNK2irCkLZqn77AUsSzGUyxDpb6j+ipvMKa9MRODSnu3JptEc/cTjNXsZntdhPLz/IM/Drm6H7bDrH70OyPn9DBwLUU9uRJmo5wUfUyg2/Yjv0mn50LUT46nFByUMQ1y2dWiu+ZZ+8wfKJC05HbQdQkLz2fXwLTSJCc7smwgXT0XwABvh4y1P221X50518qVX6jcdiWZDmyNKk9I0IMOxQ9MjQsebK887Ar9o5t0/hENtGROuc876tWqWWPdjQDo1uhfj1/hWzBw3pvrnaq5cj3YcOiRttS/oZ81sSXmYQ5MllTwZ16y4oaiZXzoH3 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(104084551191319); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231232)(944501327)(52105095)(10201501046)(93006095)(93001095)(6055026)(6041310)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DB4PR04MB0767; BCL:0; PCL:0; RULEID:; SRVR:DB4PR04MB0767; X-Forefront-PRVS: 0641678E68 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(346002)(39860400002)(39380400002)(376002)(396003)(366004)(189003)(199004)(54906003)(52116002)(55236004)(5009440100003)(16526019)(23676004)(77096007)(11346002)(956004)(2486003)(446003)(2616005)(486006)(86362001)(26005)(6116002)(3846002)(53546011)(4326008)(186003)(476003)(58126008)(16576012)(52146003)(65956001)(53936002)(6246003)(65806001)(67846002)(25786009)(50466002)(36756003)(76176011)(6486002)(110136005)(31696002)(316002)(47776003)(2906002)(478600001)(31686004)(105586002)(8936002)(97736004)(5660300001)(229853002)(106356001)(2870700001)(305945005)(68736007)(7736002)(65826007)(8676002)(6666003)(59450400001)(6636002)(64126003)(81156014)(81166006)(66066001)(386003)(44832011)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR04MB0767; H:[10.232.133.65]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjRQUjA0TUIwNzY3OzIzOnVSTkVybGp6V0t2VWNpRkV6WllIVXBobVph?= =?utf-8?B?SzkvSGRoSVB0ME9XbnZXTDQ3azdNcHNWaHdBbzN4V2F2Z1UrNlRUZVRwQ1E5?= =?utf-8?B?OWxGMUxnRHhibk96M1ZVMm9YTkJNa1BnWWtnc2kvdE1VczRvcnV3WmgycUNF?= =?utf-8?B?NzJDczhMamxiaCtDeWdnQzlDU2dzM2o4UnBs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qrC7a97NsAMUx9+B5O1LGP8Eqnre6+fl8v6niCL5lxtj5X6UAt1FS+GW6ACnaxSurG7rITHe9Ce2rgBwa2Pg8s8ltXTI=; 24:sG708FeetmHnVV0V8U0ULQoxQD9lvuRYy6xV9K0KqNkbB14UGdBk2pFVL2nvajyj4c1Lz0J88/7K16ulhj3dxnReuK05a4i63BePUAfDAZo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0767; 7:XdIO+O3VdAUmYfvhJCY5lq85TpWytb7qWeyF27ZeDSrDzx5trTJU73IQo53zCI2sW2RCavY/Ic8utB+jUZl2RkSzJY+ygX4vquTd98qB9wB5MnOkzSy/ILYLDb70XOLShZmC4HRilnvAhs31KxUA57T9nq5VnU8wC/nViNsRTJTdkWPQCP5TnJyo0PnGbZzDhJiuMxTMO1LwttZyG4Jbiw0UFQOrYhksehcQmzlzMQ0p6mKVdl55OZ3Y4M7QS7D+ X-MS-Office365-Filtering-Correlation-Id: e0610804-4f20-44b0-f1e2-08d5a11177e3 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2018 07:37:52.7142 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e0610804-4f20-44b0-f1e2-08d5a11177e3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB0767 Subject: Re: [dpdk-dev] [PATCH] bus/fslmc: use PRIu64 instead of llX in format specifier 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: , X-List-Received-Date: Fri, 13 Apr 2018 07:37:55 -0000 Hi Gowrishankar, On 4/13/2018 10:34 AM, Gowrishankar wrote: > From: Gowrishankar Muthukrishnan > > Instead of llX, use C99 standard "PRIu64" in format specifier. Former one > breaks compile in ppc64le. > > Fixes: c2c167fdb3 ("bus/fslmc: support memory event callbacks for VFIO") > > Signed-off-by: Gowrishankar Muthukrishnan > -- > In file included from dpdk/drivers/bus/fslmc/fslmc_vfio.c:37:0: > dpdk/drivers/bus/fslmc/fslmc_vfio.c: In function ‘fslmc_map_dma’: > dpdk/drivers/bus/fslmc/fslmc_logs.h:18:44: error: format ‘%llX’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘__u64 {aka long unsigned int}’ [-Werror=format=] So, powerpc64LE is taking __u64 as long unsigned int, while x86_64 compiler is taking it as long long unsigned it. > rte_log(RTE_LOG_DEBUG, dpaa2_logtype_bus, "fslmc: %s(): " fmt "\n", \ > ^ > dpdk/drivers/bus/fslmc/fslmc_vfio.c:272:2: note: in expansion of macro ‘DPAA2_BUS_DEBUG’ > DPAA2_BUS_DEBUG("--> Map address: %llX, size: 0x%llX", > ^~~~~~~~~~~~~~~ > dpdk/drivers/bus/fslmc/fslmc_vfio.c:272:39: note: format string is defined here > DPAA2_BUS_DEBUG("--> Map address: %llX, size: 0x%llX", > ~~~^ > %lX > > drivers/bus/fslmc/fslmc_vfio.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c > index 4036e82..a003a7d 100644 > --- a/drivers/bus/fslmc/fslmc_vfio.c > +++ b/drivers/bus/fslmc/fslmc_vfio.c > @@ -270,7 +270,7 @@ static int vfio_map_irq_region(struct fslmc_vfio_group *group) > return -1; > } > > - DPAA2_BUS_DEBUG("--> Map address: %llX, size: 0x%llX", > + DPAA2_BUS_DEBUG("--> Map address: %"PRIu64", size: 0x%"PRIu64"", > dma_map.vaddr, dma_map.size); You should also type cast the variables to avoid compilation issue on x86. - dma_map.vaddr, dma_map.size); + (uint64_t)dma_map.vaddr, uint64_t)dma_map.size); The same change is to be done at other two places as well in your patch. Please check compilation for x86_64 and i686, the patchwork compilation check is running late. > ret = ioctl(group->container->fd, VFIO_IOMMU_MAP_DMA, &dma_map); > if (ret) { > @@ -303,7 +303,7 @@ static int vfio_map_irq_region(struct fslmc_vfio_group *group) > return -1; > } > > - DPAA2_BUS_DEBUG("--> Unmap address: %llX, size: 0x%llX", > + DPAA2_BUS_DEBUG("--> Unmap address: %"PRIu64", size: 0x%"PRIu64"", > dma_unmap.iova, dma_unmap.size); > ret = ioctl(group->container->fd, VFIO_IOMMU_UNMAP_DMA, &dma_unmap); > if (ret) { > @@ -401,7 +401,7 @@ static int64_t vfio_map_mcp_obj(struct fslmc_vfio_group *group, char *mcp_obj) > goto MC_FAILURE; > } > > - DPAA2_BUS_DEBUG("Region offset = %llx , region size = %llx", > + DPAA2_BUS_DEBUG("Region offset = %"PRIu64" , region size = %"PRIu64"", > reg_info.offset, reg_info.size); > > v_addr = (size_t)mmap(NULL, reg_info.size, >