[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [for-4.20][PATCH 1/2] device-tree: bootfdt: Fix build issue when CONFIG_PHYS_ADDR_T_32=y


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Mon, 27 Jan 2025 13:49:21 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZDVONlOaMzAAscepU/LvtBClbG9Ra6Jrow4jwK4hiYk=; b=H/w0keL1NPSFkoVD+kMG/9S6mWVILOMcNGFx9jcOTmZSQptZDmiYtS58lAHdFYBxSwKeXZ+f/F0RFTvGrEOyG/5VUpDQOdy0Ju0eIOMrpPe1KyBeix0oIUzhE2LjQxR20uGvt2Fk70VFwv9Y3QuPTL0kWTFC0pbLG9+q74lCU6K2wHfDxnflMGXU69gXsFe6nNsZ1UycCqzehU1pyurPKzvAHN228+HYEftcg/CzJIrFK8dZe0rNWlz2uO86AuV4sOo9wlmp5bTNQhlj/ImPmBoJTcuMIJirPmL4AvX1uqHCBrDyUxBzqR78KEACOk3spSw/wCILLfaTxVN9fjJFPA==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZDVONlOaMzAAscepU/LvtBClbG9Ra6Jrow4jwK4hiYk=; b=gcGqOlwylvnlQorEcR+BScvUvfzR3bElsJqm9jaCbt8mv2zJQ5/vqUpo6gVRvqV6ADQwDy+1m6njZXxfjU+ZZRT3Kz7YRf1lY+QMHjcAqy8nwUI5lpLqWW/jcT+g+CNkf3IjrQo1v6OLF/gy9R6aw3s32+qUUDdBibB/u2FihPZLWAANu19ft+lEVT1ciFMNlzRlUg5659F5FkUFs7V3vDoFxrpH/V3E6BaLobW/bXvBHA9STzb6rMQmgGi0s3tB0TUFkOEeNMa1V2kj8Z/ckhPGItfLIL48P9cUrlttGi/GucVqB/imx3h7nTntyaLko5mez/BxJcC8A3ZxaQsYiw==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=ezP/MHPLh0t6+21H+8ewSZbEJVCBfP1J50+kxod5MSKldAsYa5qjfHJpvqClVGewk6XwuP/hL9XpWFalRaoBkdVgyifEhEIxSb3CRmkwD6DrtITEIwwTy/crYyJGbfU5dyCQOtLgmCnCPthCBiaZ7Pj38RNS0kqdA9aUTh01zKXfsKgrOl2+wMX3tE7qpLjytbev9IveUeLDkyEeIiKacEUltw7Nz8WIB+PYXfUmxYWYPkrId49BocYTpgMtaQwcKOoWSRzL7NHbeZMwBcaZufkICS0vi9jnqZg1EmS68/6RHxnc4mmybG0G7YZ/KJbQ5sLTFTKXOBey9LEt1Gn6Vg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Cou9TVYqDwtqhyP2ZFLhZXVJMRVf27VNTBeElRtd38Dq8DqVQru4hqSWrlx9PLV84Cm7PXVJjqha0Cdrkvg+X6zShtKC2MfflfMORP4jKC4AQWEoN7zrLq8Z/oXyj+iLZ19JJy1vtW9ObL7MooGsAid6nVG9GztBDtVKzzfdD95QsCTOnaG2U8ue85ldxk60psTSgk6u2nscK1nQEDIFjCKDVy1f535wKI3zonwYQ9VcrN9gHjzkScmoFKowhAhmGsfYf0wZQccP7P+IdtuiBaXvG66qALK8s4my5PSNu+scaLiUqLaZ/hagZcVUSk0Y4JgaujYAfnl2IF2l/pYFeg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "oleksii.kurochko@xxxxxxxxx" <oleksii.kurochko@xxxxxxxxx>
  • Delivery-date: Mon, 27 Jan 2025 13:50:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHbcKi0NT74rrzyi0qViFqbxBUYTLMqoxIA
  • Thread-topic: [for-4.20][PATCH 1/2] device-tree: bootfdt: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

Hi Michal,

> On 27 Jan 2025, at 10:45, Michal Orzel <michal.orzel@xxxxxxx> wrote:
> 
> On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed:
> common/device-tree/bootfdt.c: In function 'build_assertions':
> ./include/xen/macros.h:47:31: error: static assertion failed: 
> "!(alignof(struct membanks) != 8)"
>   47 | #define BUILD_BUG_ON(cond) ({ _Static_assert(!(cond), "!(" #cond ")"); 
> })
>      |                               ^~~~~~~~~~~~~~
> common/device-tree/bootfdt.c:31:5: note: in expansion of macro 'BUILD_BUG_ON'
>   31 |     BUILD_BUG_ON(alignof(struct membanks) != 8);
> 
> When CONFIG_PHYS_ADDR_T_32 is set, paddr_t is defined as unsigned long,
> therefore the struct membanks alignment is 4B. Fix it.
> 
> Fixes: 2209c1e35b47 ("xen/arm: Introduce a generic way to access memory bank 
> structures")
> Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
> ---


Apart from Julien’s comments for which I’ll leave you both to agree on a 
solution, I’ve reproduced
the issue and tested that your change is fixing it and it’s not breaking a 
different setup (e.g. 64 bit).

Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>
Tested-by: Luca Fancellu <luca.fancellu@xxxxxxx>


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.