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

[PATCH] xen/arm: ffa: fix build with clang/ATfE


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Dmytro Prokopchuk1 <dmytro_prokopchuk1@xxxxxxxx>
  • Date: Tue, 21 Apr 2026 08:13:35 +0000
  • Accept-language: en-US, uk-UA, ru-RU
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • 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=MuwN+CYQN7LwYacx1s2AYxOvF1H40MlBjXXkluvlta8=; b=HVZU6F8fgNr972O8AYUaJ1X9Nllyumow+DPc4BX1zrlOeCmcl344fcBwaXg5xzeg9bZR43FQqGNH9jjhcpp58d2rBPEDMGu59C6BmEIx88BpYpcLJNnwrEwSQOg0FPb0hIHmB3u5mfwgmNNQ4lV6aQ2jn5U3VfJj/+p3SVxuL8bbztrHaf120xmYbEy54+AS0ADgvU2lYzcelXtPWxBwbAPGTYvAXyDkZvuO5s/GdNJGZqXJwC0UC1dkEJqaGJ5HDuUUwHDhao1pnX2MNXGTYAAhGxh4Jyi/q4uufJDO54dMD3gaFNnXZXXLudybaONzgKEzLIyjSbsVGPw57HuSBg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EPTS/jURHYyLW5Xye5BGObWBb3Br+6QAJwL+xH7wClq5O/WMaSw/NB4Dn/e9EyqsOeEiT1yfU30AqOjPTnt4koXucpPLrWj37WUbQrBsEYAIDIspY95OJHKo4b6ARdfTl2EmVrYaVJJ3tR9FciKtg8d8MGbZ7CADNkHoIMIApYtE/mTsKWTWPvzE2cp4mG5FRE5Fg5TamVArtBf2J3qrA/El4NOlyVvtyFzmylDVIWjxCwkcSYIFRxwr2LIaj7agDLsNVFpMkQqn82cXdD0qWp1XyQxPoHa6E30u40bxqPPvrZKrE53bKiAmSz99yLGlfzXQvoeA41cJwFXDHEK2QA==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Dmytro Prokopchuk1 <dmytro_prokopchuk1@xxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Jens Wiklander <jens.wiklander@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>
  • Delivery-date: Tue, 21 Apr 2026 08:13:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHc0WbA/s1rIXoAmU6+7rPJ118Z7Q==
  • Thread-topic: [PATCH] xen/arm: ffa: fix build with clang/ATfE

Clang 22.x.x or Arm Toolchain for Embedded 22.x.x reports:

In file included from arch/arm/tee/ffa.c:75:
arch/arm/tee/ffa_private.h:439:17: error: 'used' attribute ignored on a 
non-definition declaration [-Werror,-Wignored-attributes]
  439 | extern uint32_t __ro_after_init ffa_fw_version;
      |                 ^

There is a fix for clang 16 in the git history:
a1a1e2b7dc4f ("xen/arm: ffa: fix build with clang")
which was broken by the following commit:
a90376c6adbc ("xen/arm: ffa: Add FF-A 1.2 endpoint memory access descriptors")

Remove __ro_after_init from the extern declaration of ffa_fw_version.
The attribute is already present on the definition in ffa.c, which is
sufficient and correct.

Fixes: a90376c6adbc ("xen/arm: ffa: Add FF-A 1.2 endpoint memory access 
descriptors")
Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@xxxxxxxx>
---
Test CI pipeline:
https://gitlab.com/xen-project/people/dimaprkp4k/xen/-/pipelines/2467446333
---
 xen/arch/arm/tee/ffa_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/tee/ffa_private.h b/xen/arch/arm/tee/ffa_private.h
index c291f32b56..e16bc0d83d 100644
--- a/xen/arch/arm/tee/ffa_private.h
+++ b/xen/arch/arm/tee/ffa_private.h
@@ -436,7 +436,7 @@ struct ffa_ctx {
 };
 
 extern DECLARE_BITMAP(ffa_fw_abi_supported, FFA_ABI_BITMAP_SIZE);
-extern uint32_t __ro_after_init ffa_fw_version;
+extern uint32_t ffa_fw_version;
 
 extern struct list_head ffa_ctx_head;
 extern rwlock_t ffa_ctx_list_rwlock;
-- 
2.43.0



 


Rackspace

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