Skip to contentSkip to conversation

fpga: stratix10-soc: fix compilation + COMPILE_TEST

PATCH In review Rosen Penev 3 participants 11 messages Nov 6, 2025 – Nov 10, 2025 FPGA manager framework

lore
Share & tools
lore
#0 lore raw

cover fpga: stratix10-soc: fix compilation + COMPILE_TEST

Add missing header and add COMPILE_TEST to prevent future build failures.

Rosen Penev (2):
fpga: stratix10-soc: add missing header
fpga: stratix10-soc: add COMPILE_TEST support

 drivers/fpga/Kconfig         | 2 +-
 drivers/fpga/stratix10-soc.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

--
2.51.2

#1 lore raw

PATCH 1/2 fpga: stratix10-soc: add missing header

linux/sizes.h is needed for SZ_512K.

---
 drivers/fpga/stratix10-soc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/fpga/stratix10-soc.c +1 -0
index 0a295ccf1644..ab309cbf21c6 100644
@@ -11,6 +11,7 @@
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/platform_device.h>
+#include <linux/sizes.h>
 
 /*
  * FPGA programming requires a higher level of privilege (EL3), per the SoC
Signature · 1 line
2.51.2
#4 lore raw

PATCH 2/2 fpga: stratix10-soc: add COMPILE_TEST support

In reply to Rosen Penev

Allow the buildbots to find compilation issues.

---
 drivers/fpga/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/Kconfig +1 -1
index 311313f3b282..f2e2776acdd5 100644
@@ -60,7 +60,7 @@ config FPGA_MGR_ZYNQ_FPGA
 
 config FPGA_MGR_STRATIX10_SOC
 	tristate "Intel Stratix10 SoC FPGA Manager"
-	depends on (ARCH_INTEL_SOCFPGA && INTEL_STRATIX10_SERVICE)
+	depends on (ARCH_INTEL_SOCFPGA && INTEL_STRATIX10_SERVICE) || COMPILE_TEST
 	help
 	  FPGA manager driver support for the Intel Stratix10 SoC.
 
Signature · 1 line
2.51.2
#2 lore raw

Re: [PATCH 1/2] fpga: stratix10-soc: add missing header

In reply to Rosen Penev
Quoted 1 line · Rosen Penev

linux/sizes.h is needed for SZ_512K.

Does it always fail or only with COMPILE_TEST?

Please add "fixes" & Cc stable kernel if it always fail.

Quoted 22 lines
---
 drivers/fpga/stratix10-soc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/fpga/stratix10-soc.c +1 -0
index 0a295ccf1644..ab309cbf21c6 100644
@@ -11,6 +11,7 @@
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/platform_device.h>
+#include <linux/sizes.h>
 
 /*
  * FPGA programming requires a higher level of privilege (EL3), per the SoC
Signature · 1 line
2.51.2
#5 lore raw

Re: [PATCH 2/2] fpga: stratix10-soc: add COMPILE_TEST support

In reply to Rosen Penev
Quoted 12 lines · Rosen Penev

Allow the buildbots to find compilation issues.

---
 drivers/fpga/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/Kconfig +0 -0
index 311313f3b282..f2e2776acdd5 100644

drivers/fpga/Kconfig config FPGA_MGR_ZYNQ_FPGA · line 63

Quoted 5 lines
drivers/fpga/Kconfig +1 -1
@@ -60,7 +60,7 @@ config FPGA_MGR_ZYNQ_FPGA
 
 config FPGA_MGR_STRATIX10_SOC
 	tristate "Intel Stratix10 SoC FPGA Manager"
-	depends on (ARCH_INTEL_SOCFPGA && INTEL_STRATIX10_SERVICE)
+	depends on (ARCH_INTEL_SOCFPGA && INTEL_STRATIX10_SERVICE) || COMPILE_TEST

I don't think it works without INTEL_STRATIX10_SERVICE, maybe:

	depends on ARCH_INTEL_SOCFPGA || COMPILE_TEST
	depends on INTEL_STRATIX10_SERVICE

But INTEL_STRATIX10_SERVICE depends on HAVE_ARM_SMCCC, and they all require arch configurations...

Quoted 7 lines
drivers/fpga/Kconfig +0 -0
 	help
 	  FPGA manager driver support for the Intel Stratix10 SoC.
 
Signature · 1 line
2.51.2
#3 lore raw

Re: [PATCH 1/2] fpga: stratix10-soc: add missing header

In reply to Xu Yilun
Quoted 5 lines · Xu Yilun
Quoted 1 line · Rosen Penev

linux/sizes.h is needed for SZ_512K.

Does it always fail or only with COMPILE_TEST?

Well, COMPILE_TEST under x86. If I had to guess, this header gets included from some ARM header.

Quoted 25 lines

Please add "fixes" & Cc stable kernel if it always fail.

Quoted 22 lines
---
 drivers/fpga/stratix10-soc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/fpga/stratix10-soc.c +1 -1
index 0a295ccf1644..ab309cbf21c6 100644
@@ -11,6 +11,7 @@
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/platform_device.h>
+#include <linux/sizes.h>
 
 /*
  * FPGA programming requires a higher level of privilege (EL3), per the SoC
--

2.51.2

#6 lore raw

Re: [PATCH 2/2] fpga: stratix10-soc: add COMPILE_TEST support

In reply to Xu Yilun
Quoted 22 lines · Xu Yilun
Quoted 12 lines · Rosen Penev

Allow the buildbots to find compilation issues.

---
 drivers/fpga/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/Kconfig +0 -0
index 311313f3b282..f2e2776acdd5 100644

drivers/fpga/Kconfig config FPGA_MGR_ZYNQ_FPGA · line 63

Quoted 5 lines
drivers/fpga/Kconfig +1 -1
@@ -60,7 +60,7 @@ config FPGA_MGR_ZYNQ_FPGA
 
 config FPGA_MGR_STRATIX10_SOC
      tristate "Intel Stratix10 SoC FPGA Manager"
-     depends on (ARCH_INTEL_SOCFPGA && INTEL_STRATIX10_SERVICE)
+     depends on (ARCH_INTEL_SOCFPGA && INTEL_STRATIX10_SERVICE) || COMPILE_TEST

I don't think it works without INTEL_STRATIX10_SERVICE, maybe:

Quoted 5 lines

depends on ARCH_INTEL_SOCFPGA || COMPILE_TEST depends on INTEL_STRATIX10_SERVICE

But INTEL_STRATIX10_SERVICE depends on HAVE_ARM_SMCCC, and they all require arch configurations...

Yeah I don't think INTEL_STRATIX10_SERVICE is needed for COMPILE_TEST.

Quoted 8 lines
Quoted 8 lines
drivers/fpga/Kconfig +0 -1
      help
        FPGA manager driver support for the Intel Stratix10 SoC.
 
--

2.51.2

#7 lore raw

Re: [PATCH 2/2] fpga: stratix10-soc: add COMPILE_TEST support

Quoted 23 lines · Rosen Penev
Quoted 22 lines · Xu Yilun
Quoted 12 lines · Rosen Penev

Allow the buildbots to find compilation issues.

---
 drivers/fpga/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/Kconfig +0 -0
index 311313f3b282..f2e2776acdd5 100644

drivers/fpga/Kconfig config FPGA_MGR_ZYNQ_FPGA · line 63

Quoted 5 lines
drivers/fpga/Kconfig +1 -1
@@ -60,7 +60,7 @@ config FPGA_MGR_ZYNQ_FPGA
 
 config FPGA_MGR_STRATIX10_SOC
      tristate "Intel Stratix10 SoC FPGA Manager"
-     depends on (ARCH_INTEL_SOCFPGA && INTEL_STRATIX10_SERVICE)
+     depends on (ARCH_INTEL_SOCFPGA && INTEL_STRATIX10_SERVICE) || COMPILE_TEST

I don't think it works without INTEL_STRATIX10_SERVICE, maybe:

Quoted 6 lines
Quoted 5 lines

depends on ARCH_INTEL_SOCFPGA || COMPILE_TEST depends on INTEL_STRATIX10_SERVICE

But INTEL_STRATIX10_SERVICE depends on HAVE_ARM_SMCCC, and they all require arch configurations...

Yeah I don't think INTEL_STRATIX10_SERVICE is needed for COMPILE_TEST.

Have you actually passed compilation without INTEL_STRATIX10_SERVICE? I can't image how it works without stratix10_svc_xx kAPI definitions.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/fpga/Kconfig +0 -1
      help
        FPGA manager driver support for the Intel Stratix10 SoC.
 
--

2.51.2

#9 lore raw

Re: [PATCH 2/2] fpga: stratix10-soc: add COMPILE_TEST support

In reply to Rosen Penev
kernel test robot noticed the following build errors:

Hi Rosen,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.18-rc5 next-20251107]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Rosen-Penev/fpga-stratix10-soc-add-missing-header/20251107-030213
base:   linus/master
patch link:    https://lore.kernel.org/r/20251106185938.6419-3-rosenp%40gmail.com
patch subject: [PATCH 2/2] fpga: stratix10-soc: add COMPILE_TEST support
config: nios2-allmodconfig (https://download.01.org/0day-ci/archive/20251110/[email protected]/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251110/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> ERROR: modpost: "stratix10_svc_free_channel" [drivers/fpga/stratix10-soc.ko] undefined!
>> ERROR: modpost: "stratix10_svc_send" [drivers/fpga/stratix10-soc.ko] undefined!
>> ERROR: modpost: "stratix10_svc_request_channel_byname" [drivers/fpga/stratix10-soc.ko] undefined!
>> ERROR: modpost: "stratix10_svc_free_memory" [drivers/fpga/stratix10-soc.ko] undefined!
>> ERROR: modpost: "stratix10_svc_done" [drivers/fpga/stratix10-soc.ko] undefined!
>> ERROR: modpost: "stratix10_svc_allocate_memory" [drivers/fpga/stratix10-soc.ko] undefined!
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#10 lore raw

Re: [PATCH 2/2] fpga: stratix10-soc: add COMPILE_TEST support

In reply to Rosen Penev
kernel test robot noticed the following build errors:

Hi Rosen,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.18-rc5 next-20251110]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Rosen-Penev/fpga-stratix10-soc-add-missing-header/20251107-030213
base:   linus/master
patch link:    https://lore.kernel.org/r/20251106185938.6419-3-rosenp%40gmail.com
patch subject: [PATCH 2/2] fpga: stratix10-soc: add COMPILE_TEST support
config: nios2-allyesconfig (https://download.01.org/0day-ci/archive/20251111/[email protected]/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251111/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

nios2-linux-ld: drivers/fpga/stratix10-soc.o: in function `s10_remove':

>> stratix10-soc.c:(.text+0x1c): undefined reference to `stratix10_svc_free_channel'
>> stratix10-soc.c:(.text+0x1c): relocation truncated to fit: R_NIOS2_CALL26 against `stratix10_svc_free_channel'
   nios2-linux-ld: drivers/fpga/stratix10-soc.o: in function `s10_svc_send_msg':
>> stratix10-soc.c:(.text+0xb4): undefined reference to `stratix10_svc_send'
>> stratix10-soc.c:(.text+0xb4): relocation truncated to fit: R_NIOS2_CALL26 against `stratix10_svc_send'
   nios2-linux-ld: drivers/fpga/stratix10-soc.o: in function `s10_probe':
>> stratix10-soc.c:(.text+0x1d4): undefined reference to `stratix10_svc_request_channel_byname'
>> stratix10-soc.c:(.text+0x1d4): relocation truncated to fit: R_NIOS2_CALL26 against `stratix10_svc_request_channel_byname'
>> nios2-linux-ld: stratix10-soc.c:(.text+0x25c): undefined reference to `stratix10_svc_free_channel'
   stratix10-soc.c:(.text+0x25c): relocation truncated to fit: R_NIOS2_CALL26 against `stratix10_svc_free_channel'
   nios2-linux-ld: drivers/fpga/stratix10-soc.o: in function `s10_free_buffers':
>> stratix10-soc.c:(.text+0x344): undefined reference to `stratix10_svc_free_memory'
>> stratix10-soc.c:(.text+0x344): relocation truncated to fit: R_NIOS2_CALL26 against `stratix10_svc_free_memory'
   nios2-linux-ld: drivers/fpga/stratix10-soc.o: in function `s10_ops_write_complete':
>> stratix10-soc.c:(.text+0x4b0): undefined reference to `stratix10_svc_done'
>> stratix10-soc.c:(.text+0x4b0): relocation truncated to fit: R_NIOS2_CALL26 against `stratix10_svc_done'
   nios2-linux-ld: drivers/fpga/stratix10-soc.o: in function `s10_ops_write_init':
>> stratix10-soc.c:(.text+0x988): undefined reference to `stratix10_svc_allocate_memory'
>> stratix10-soc.c:(.text+0x988): relocation truncated to fit: R_NIOS2_CALL26 against `stratix10_svc_allocate_memory'
>> nios2-linux-ld: stratix10-soc.c:(.text+0x9c0): undefined reference to `stratix10_svc_done'

stratix10-soc.c:(.text+0x9c0): relocation truncated to fit: R_NIOS2_CALL26 against `stratix10_svc_done'

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#8 lore raw

Re: [PATCH 2/2] fpga: stratix10-soc: add COMPILE_TEST support

In reply to Xu Yilun
Quoted 28 lines · Xu Yilun
Quoted 26 lines · Rosen Penev
Quoted 25 lines · Xu Yilun
Quoted 12 lines · Rosen Penev

Allow the buildbots to find compilation issues.

---
 drivers/fpga/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/Kconfig +0 -0
index 311313f3b282..f2e2776acdd5 100644

drivers/fpga/Kconfig config FPGA_MGR_ZYNQ_FPGA · line 63

Quoted 5 lines
drivers/fpga/Kconfig +1 -1
@@ -60,7 +60,7 @@ config FPGA_MGR_ZYNQ_FPGA
 
 config FPGA_MGR_STRATIX10_SOC
      tristate "Intel Stratix10 SoC FPGA Manager"
-     depends on (ARCH_INTEL_SOCFPGA && INTEL_STRATIX10_SERVICE)
+     depends on (ARCH_INTEL_SOCFPGA && INTEL_STRATIX10_SERVICE) || COMPILE_TEST

I don't think it works without INTEL_STRATIX10_SERVICE, maybe:

depends on ARCH_INTEL_SOCFPGA || COMPILE_TEST depends on INTEL_STRATIX10_SERVICE

Quoted 6 lines
Quoted 3 lines
Quoted 2 lines

But INTEL_STRATIX10_SERVICE depends on HAVE_ARM_SMCCC, and they all require arch configurations...

Yeah I don't think INTEL_STRATIX10_SERVICE is needed for COMPILE_TEST.

Have you actually passed compilation without INTEL_STRATIX10_SERVICE? I can't image how it works without stratix10_svc_xx kAPI definitions.

Based on kernel test bot, It seems INTEL_STRATIX10_SERVICE needs COMPILE_TEST too.

It also needs fixing. On 32-bit, I get this output:

drivers/firmware/stratix10-rsu.c: In function ‘rsu_get_spt_callback’:
drivers/firmware/stratix10-rsu.c:285:28: error: left shift count >= width of type [-Werror=shift-count-overflow]
285 | priv->spt0_address <<= 32;
| ^~~
drivers/firmware/stratix10-rsu.c:289:28: error: left shift count >= width of type [-Werror=shift-count-overflow]
289 | priv->spt1_address <<= 32;
| ^~~
In file included from <command-line>:
drivers/firmware/stratix10-rsu.c: In function ‘rsu_status_callback’:
././include/linux/compiler_types.h:597:45: error: call to ‘__compiletime_assert_377’ declared with attribute error: FIELD_GET:
type of reg too small for mask
597 | _compiletime_assert(condition, msg,
__compiletime_assert_, __COUNTER__)
| ^
././include/linux/compiler_types.h:578:25: note: in definition of macro ‘__compiletime_assert’

  578 |                         prefix ## suffix();
         \
      |                         ^~~~~~

././include/linux/compiler_types.h:597:9: note: in expansion of macro ‘_compiletime_assert’
597 | _compiletime_assert(condition, msg,
__compiletime_assert_, __COUNTER__)

      |         ^~~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:39:37: note: in expansion of macro
‘compiletime_assert’
   39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
      |                                     ^~~~~~~~~~~~~~~~~~
./include/linux/bitfield.h:72:17: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
   72 |                 BUILD_BUG_ON_MSG(__bf_cast_unsigned(_mask,
_mask) >     \
      |                 ^~~~~~~~~~~~~~~~
./include/linux/bitfield.h:155:17: note: in expansion of macro
‘__BF_FIELD_CHECK’
  155 |                 __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET:
");       \
      |                 ^~~~~~~~~~~~~~~~

drivers/firmware/stratix10-rsu.c:122:40: note: in expansion of macro ‘FIELD_GET’
122 | priv->status.version = FIELD_GET(RSU_VERSION_MASK,
| ^~~~~~~~~

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/fpga/Kconfig +0 -1
      help
        FPGA manager driver support for the Intel Stratix10 SoC.
 
--

2.51.2