fpga: stratix10-soc: fix compilation + COMPILE_TEST
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
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
@@ -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
PATCH 2/2 fpga: stratix10-soc: add COMPILE_TEST support
In reply to Rosen PenevAllow the buildbots to find compilation issues.
--- drivers/fpga/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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 help FPGA manager driver support for the Intel Stratix10 SoC.
Signature · 1 line
2.51.2
Re: [PATCH 1/2] fpga: stratix10-soc: add missing header
In reply to Rosen PenevQuoted 1 line · Rosen Penev
linux/sizes.his needed forSZ_512K.
Does it always fail or only with COMPILE_TEST?
Please add "fixes" & Cc stable kernel if it always fail.
Quoted 22 lines
Signed-off-by Rosen Penev <[email protected]>--- drivers/fpga/stratix10-soc.c | 1 + 1 file changed, 1 insertion(+)drivers/fpga/stratix10-soc.c +1
-0@@ -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
Re: [PATCH 2/2] fpga: stratix10-soc: add COMPILE_TEST support
In reply to Rosen PenevQuoted 12 lines · Rosen Penev
Allow the buildbots to find compilation issues.
Signed-off-by Rosen Penev <[email protected]>--- drivers/fpga/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/fpga/Kconfig +0
-0
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
-0help FPGA manager driver support for the Intel Stratix10 SoC.Signature · 1 line
2.51.2
Re: [PATCH 1/2] fpga: stratix10-soc: add missing header
In reply to Xu YilunQuoted 5 lines · Xu Yilun
Quoted 1 line · Rosen Penev
linux/sizes.his needed forSZ_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
Signed-off-by Rosen Penev <[email protected]>--- drivers/fpga/stratix10-soc.c | 1 + 1 file changed, 1 insertion(+)drivers/fpga/stratix10-soc.c +1
-1@@ -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
Re: [PATCH 2/2] fpga: stratix10-soc: add COMPILE_TEST support
In reply to Xu YilunQuoted 22 lines · Xu Yilun
Quoted 12 lines · Rosen Penev
Allow the buildbots to find compilation issues.
Signed-off-by Rosen Penev <[email protected]>--- drivers/fpga/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/fpga/Kconfig +0
-0drivers/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_TESTI don't think it works without
INTEL_STRATIX10_SERVICE, maybe:
Quoted 5 lines
depends on
ARCH_INTEL_SOCFPGA||COMPILE_TESTdepends onINTEL_STRATIX10_SERVICEBut
INTEL_STRATIX10_SERVICEdepends onHAVE_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
-1help FPGA manager driver support for the Intel Stratix10 SoC. --2.51.2
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.
Signed-off-by Rosen Penev <[email protected]>--- drivers/fpga/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/fpga/Kconfig +0
-0drivers/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_TESTI don't think it works without
INTEL_STRATIX10_SERVICE, maybe:
Quoted 6 lines
Quoted 5 lines
depends on
ARCH_INTEL_SOCFPGA||COMPILE_TESTdepends onINTEL_STRATIX10_SERVICEBut
INTEL_STRATIX10_SERVICEdepends onHAVE_ARM_SMCCC, and they all require arch configurations...Yeah I don't think
INTEL_STRATIX10_SERVICEis needed forCOMPILE_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
-1help FPGA manager driver support for the Intel Stratix10 SoC. --2.51.2
kernel test robot
build botRe: [PATCH 2/2] fpga: stratix10-soc: add COMPILE_TEST support
In reply to Rosen Penevkernel 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
kernel test robot
build botRe: [PATCH 2/2] fpga: stratix10-soc: add COMPILE_TEST support
In reply to Rosen Penevkernel 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
Re: [PATCH 2/2] fpga: stratix10-soc: add COMPILE_TEST support
In reply to Xu YilunQuoted 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.
Signed-off-by Rosen Penev <[email protected]>--- drivers/fpga/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/fpga/Kconfig +0
-0drivers/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_TESTI don't think it works without
INTEL_STRATIX10_SERVICE, maybe:depends on
ARCH_INTEL_SOCFPGA||COMPILE_TESTdepends onINTEL_STRATIX10_SERVICE
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
But
INTEL_STRATIX10_SERVICEdepends onHAVE_ARM_SMCCC, and they all require arch configurations...Yeah I don't think
INTEL_STRATIX10_SERVICEis needed forCOMPILE_TEST.Have you actually passed compilation without
INTEL_STRATIX10_SERVICE? I can't image how it works withoutstratix10_svc_xxkAPI 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
-1help FPGA manager driver support for the Intel Stratix10 SoC. --2.51.2