Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp959305pxb; Wed, 3 Mar 2021 22:33:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwd2J8ofLmHUSoOkabj4nPgVcDX/bH+2+OXIHT8BEzGeNj2RX6nHSWNWKRP/Bg1nJM55CSE X-Received: by 2002:a05:6402:4314:: with SMTP id m20mr2603889edc.5.1614839619885; Wed, 03 Mar 2021 22:33:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614839619; cv=none; d=google.com; s=arc-20160816; b=gBfnYNRPluYqsACdF3nqqHvQQPqvNYfNsEve39hYVDHcCVOeIIU1y6RnLTaD9Zw/pJ CqLp3ZBJE0hjH2254gVq/oGfakkM/Au1g7wHdOozPHiE2vNrILwDyszieux55hUbPt8+ MtbeFoBcSUPBtHZ2Fngen+5zOSCl1mQTmpCQiECEmlH5e5e9lZfhOhh5t2fArE0A8nVM HyfkUr41HlB0GgTTHWs5H7OYLvSUNul4MWlGDeQ3k0cjApwjndk6nU2vC/TlJRrWwthn 23n/NmobqNoFXdJTHygdZbk6JkEc3PonQmA1iO4ansW6zm94I9X/Une+wv7qrKbHRbis XW6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=uiSdTAX5fGCQWtRj6bGUy+pKt+qEdnwtHvd6uiLQ99g=; b=UYuHWMezl8efiNXNnqzgb/vKUcLjdqWylGDq46DOE3tTSzd20cRm0bNVGETmUUicqE XwyswOYsjD/MCL7OYNDq3Ed7nqJ+9QRSwdH+eVKA6fRdDMaGrGejOFPgLmVij8dcrdeR A1mEDWvOoG9WsmOEYBT330jSrVR6PaMNLlRHgtuPQDK5oQycY1b3FdWZfWNoiTKvcgLT NzSxKzUAajLqQsQZOrruSOXKhk5tFYJvJyZZkpUMij7ykPvo0jDn3p72y2xQzVxGX7+V M8B8rPhl2BULDRAetwFD1rt8iXuiZszk6Bv1cX9SAR3Kc+l/H7XBBYmZ09hLxeWHKNUc U1kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by3si13329923edb.496.2021.03.03.22.33.16; Wed, 03 Mar 2021 22:33:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351978AbhCBRuz (ORCPT + 99 others); Tue, 2 Mar 2021 12:50:55 -0500 Received: from mail-pl1-f174.google.com ([209.85.214.174]:41753 "EHLO mail-pl1-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1574370AbhCBPPf (ORCPT ); Tue, 2 Mar 2021 10:15:35 -0500 Received: by mail-pl1-f174.google.com with SMTP id d11so12197500plo.8; Tue, 02 Mar 2021 07:15:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=uiSdTAX5fGCQWtRj6bGUy+pKt+qEdnwtHvd6uiLQ99g=; b=JaxAsjWt8qighC4uUM4w7vJlNN8hu9UHndg2iRylsIiSLPGcN1kCZVWrFhwVsXn/eP jpWLKr+XvMXFP2LfcPOIT67qLlCJB16fpemvMikXmbzrb078dvghUxlI/ZpQdbhRgrPF 4nU0kDZ/gOzikDDeNkzPE8h6tgcRQIwnHGJNBz+fbY9HFlYjXVN9iFOzrIVdfDlEC99X 2n5z1KuXhvh3Y/cz/qx3YdI4TgFi5+6UZ4WATXLWSU/vVoIXd1BXeOvnisqmvRS7BfiV WuMaypGbbBa/E8pFVuG/dvU7EU0xoJMkKnGOtnKqGtPf6X7IZgKIEbo4bCn1zj0r8p19 QgGQ== X-Gm-Message-State: AOAM532vWqv71lsyv6Gs97+k+rGpWH3QPJTNKIw0MDeAU0QhhJe5dDIB khzHd2fsaJITzhF9HQC4+3M= X-Received: by 2002:a17:90a:4a0a:: with SMTP id e10mr4640637pjh.112.1614698094479; Tue, 02 Mar 2021 07:14:54 -0800 (PST) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id d75sm18639178pfd.20.2021.03.02.07.14.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Mar 2021 07:14:53 -0800 (PST) Date: Tue, 2 Mar 2021 07:14:52 -0800 From: Moritz Fischer To: Lizhi Hou Cc: Tom Rix , linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org, maxz@xilinx.com, sonal.santan@xilinx.com, michal.simek@xilinx.com, stefanos@xilinx.com, devicetree@vger.kernel.org, mdf@kernel.org, robh@kernel.org, Max Zhen Subject: Re: [PATCH V3 XRT Alveo 03/18] fpga: xrt: xclbin file helper functions Message-ID: References: <20210218064019.29189-1-lizhih@xilinx.com> <20210218064019.29189-4-lizhih@xilinx.com> <4628ef05-27d1-b92f-9126-27a1f810c608@redhat.com> <3b73400c-cca1-60af-4eea-ed85de77a977@xilinx.com> <55ed0169-085c-9706-3b17-23ea582c43c3@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <55ed0169-085c-9706-3b17-23ea582c43c3@xilinx.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 01, 2021 at 04:25:37PM -0800, Lizhi Hou wrote: > Hi Tom, > > > On 02/28/2021 08:54 AM, Tom Rix wrote: > > CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email. > > > > > > On 2/26/21 1:23 PM, Lizhi Hou wrote: > > > Hi Tom, > > > > > > > > snip > > > > > > I also do not see a pragma pack, usually this is set of 1 so the compiler does not shuffle elements, increase size etc. > > > This data structure is shared with other tools. And the structure is well defined with reasonable alignment. It is compatible with all compilers we have tested. So pragma pack is not necessary. > > You can not have possibly tested all the configurations since the kernel supports many arches and compilers. > > > > If the tested existing alignment is ok, pragma pack should be a noop on your tested configurations. > > > > And help cover the untested configurations. > Got it. I will add pragma pack(1). Please do not use pragma pack(), add __packed to the structs in question. - Moritz