Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [PATCH] nvmem: airoha: add ARM64 dependency
@ 2026-06-11 12:58 Arnd Bergmann
  2026-06-12  8:13 ` Christian Marangi
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2026-06-11 12:58 UTC (permalink / raw)
  To: Srinivas Kandagatla, Nathan Chancellor, Christian Marangi
  Cc: Arnd Bergmann, Nick Desaulniers, Bill Wendling, Justin Stitt,
	Greg Kroah-Hartman, linux-kernel, llvm

From: Arnd Bergmann <arnd@arndb.de>

The driver already depends on HAVE_ARM_SMCCC and ARCH_AIROHA, but both
are available for 32-bit and 64-bit targets. However, the smccc invocation
fails on thumb2 builds with clang:

drivers/nvmem/airoha-smc-efuses.c:38:2: error: write to reserved register 'R7'
   38 |         arm_smccc_1_1_invoke(AIROHA_SMC_EFUSE_FID,
      |         ^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32'
  215 |         __inst_thumb32(thumb_opcode)
      |         ^

Since the driver is only used on the 64-bit an7581 soc, avoid this
problem with a stricter dependency.

Fixes: 25e001fcc1e6 ("nvmem: airoha: Add support for SMC eFUSE")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/nvmem/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index e10f7ff725ff..f33ee18930ae 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -30,6 +30,7 @@ source "drivers/nvmem/layouts/Kconfig"
 
 config NVMEM_AIROHA_SMC_EFUSES
 	tristate "Airoha SMC eFuse support"
+	depends on ARM64
 	depends on ARCH_AIROHA || COMPILE_TEST
 	depends on HAVE_ARM_SMCCC
 	default ARCH_AIROHA
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-12  8:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-11 12:58 [PATCH] nvmem: airoha: add ARM64 dependency Arnd Bergmann
2026-06-12  8:13 ` Christian Marangi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox