* [PATCHv2 0/2] firmware: stratix10-rsu: add COMPILE_TEST support @ 2025-11-12 6:30 Rosen Penev 2025-11-12 6:30 ` [PATCHv2 1/2] firmware: stratix10-rsu: fix 32-bit compilation Rosen Penev 2025-11-12 6:30 ` [PATCHv2 2/2] firmware: stratix10-rsu: add COMPILE_TEST support Rosen Penev 0 siblings, 2 replies; 6+ messages in thread From: Rosen Penev @ 2025-11-12 6:30 UTC (permalink / raw) To: linux-kernel; +Cc: Dinh Nguyen First commit fixes 32-bit target compilation. Second adds COMPILE_TEST and cleans up the depends. v2: remove unrelated changes. Rosen Penev (2): firmware: stratix10-rsu: fix 32-bit compilation firmware: stratix10-rsu: add COMPILE_TEST support drivers/firmware/Kconfig | 2 +- drivers/firmware/stratix10-rsu.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) -- 2.51.2 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCHv2 1/2] firmware: stratix10-rsu: fix 32-bit compilation 2025-11-12 6:30 [PATCHv2 0/2] firmware: stratix10-rsu: add COMPILE_TEST support Rosen Penev @ 2025-11-12 6:30 ` Rosen Penev 2025-11-18 3:33 ` Dinh Nguyen 2025-11-12 6:30 ` [PATCHv2 2/2] firmware: stratix10-rsu: add COMPILE_TEST support Rosen Penev 1 sibling, 1 reply; 6+ messages in thread From: Rosen Penev @ 2025-11-12 6:30 UTC (permalink / raw) To: linux-kernel; +Cc: Dinh Nguyen The code uses long which is changes depending on CONFIG settings. However, these longs should really be 64-bit. Fixes at least the following errors: 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, | ^~~~~~~~~ Signed-off-by: Rosen Penev <rosenp@gmail.com> --- drivers/firmware/stratix10-rsu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/firmware/stratix10-rsu.c b/drivers/firmware/stratix10-rsu.c index 1ea39a0a76c7..2b8ad04679f7 100644 --- a/drivers/firmware/stratix10-rsu.c +++ b/drivers/firmware/stratix10-rsu.c @@ -97,8 +97,8 @@ struct stratix10_rsu_priv { unsigned int retry_counter; unsigned int max_retry; - unsigned long spt0_address; - unsigned long spt1_address; + u64 spt0_address; + u64 spt1_address; unsigned int *get_spt_response_buf; }; @@ -120,14 +120,14 @@ static void rsu_status_callback(struct stratix10_svc_client *client, if (data->status == BIT(SVC_STATUS_OK)) { priv->status.version = FIELD_GET(RSU_VERSION_MASK, - res->a2); + (u64) res->a2); priv->status.state = FIELD_GET(RSU_STATE_MASK, res->a2); priv->status.fail_image = res->a1; priv->status.current_image = res->a0; priv->status.error_location = FIELD_GET(RSU_ERROR_LOCATION_MASK, res->a3); priv->status.error_details = - FIELD_GET(RSU_ERROR_DETAIL_MASK, res->a3); + FIELD_GET(RSU_ERROR_DETAIL_MASK, (u64) res->a3); } else { dev_err(client->dev, "COMMAND_RSU_STATUS returned 0x%lX\n", res->a0); @@ -632,7 +632,7 @@ static ssize_t spt0_address_show(struct device *dev, if (priv->spt0_address == INVALID_SPT_ADDRESS) return -EIO; - return scnprintf(buf, PAGE_SIZE, "0x%08lx\n", priv->spt0_address); + return scnprintf(buf, PAGE_SIZE, "0x%08llx\n", priv->spt0_address); } static ssize_t spt1_address_show(struct device *dev, @@ -646,7 +646,7 @@ static ssize_t spt1_address_show(struct device *dev, if (priv->spt1_address == INVALID_SPT_ADDRESS) return -EIO; - return scnprintf(buf, PAGE_SIZE, "0x%08lx\n", priv->spt1_address); + return scnprintf(buf, PAGE_SIZE, "0x%08llx\n", priv->spt1_address); } static DEVICE_ATTR_RO(current_image); -- 2.51.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCHv2 1/2] firmware: stratix10-rsu: fix 32-bit compilation 2025-11-12 6:30 ` [PATCHv2 1/2] firmware: stratix10-rsu: fix 32-bit compilation Rosen Penev @ 2025-11-18 3:33 ` Dinh Nguyen 2025-11-19 1:13 ` Rosen Penev 0 siblings, 1 reply; 6+ messages in thread From: Dinh Nguyen @ 2025-11-18 3:33 UTC (permalink / raw) To: Rosen Penev, linux-kernel Hi Rosen, On 11/12/25 00:30, Rosen Penev wrote: > The code uses long which is changes depending on CONFIG settings. > However, these longs should really be 64-bit. Fixes at least the > following errors: > > drivers/firmware/stratix10-rsu.c: In function ‘rsu_get_spt_callback’: Could you respin this series based on linux-next? There was a couple of patches that was recently merged. Thanks, Dinh ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCHv2 1/2] firmware: stratix10-rsu: fix 32-bit compilation 2025-11-18 3:33 ` Dinh Nguyen @ 2025-11-19 1:13 ` Rosen Penev 0 siblings, 0 replies; 6+ messages in thread From: Rosen Penev @ 2025-11-19 1:13 UTC (permalink / raw) To: Dinh Nguyen; +Cc: linux-kernel On Mon, Nov 17, 2025 at 7:33 PM Dinh Nguyen <dinguyen@kernel.org> wrote: > > Hi Rosen, > > On 11/12/25 00:30, Rosen Penev wrote: > > The code uses long which is changes depending on CONFIG settings. > > However, these longs should really be 64-bit. Fixes at least the > > following errors: > > > > drivers/firmware/stratix10-rsu.c: In function ‘rsu_get_spt_callback’: > Could you respin this series based on linux-next? There was a couple of > patches that was recently merged. Yeah I'm not sure about this anymore. So compilation works on x86 and arm, both 32 and 64 bit, but kbuild complained about the build failing on s390x. I need to think about how to handle this. > > Thanks, > > Dinh ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCHv2 2/2] firmware: stratix10-rsu: add COMPILE_TEST support 2025-11-12 6:30 [PATCHv2 0/2] firmware: stratix10-rsu: add COMPILE_TEST support Rosen Penev 2025-11-12 6:30 ` [PATCHv2 1/2] firmware: stratix10-rsu: fix 32-bit compilation Rosen Penev @ 2025-11-12 6:30 ` Rosen Penev 2025-11-13 11:30 ` kernel test robot 1 sibling, 1 reply; 6+ messages in thread From: Rosen Penev @ 2025-11-12 6:30 UTC (permalink / raw) To: linux-kernel; +Cc: Dinh Nguyen Helps the buildbots catch potential issues. Signed-off-by: Rosen Penev <rosenp@gmail.com> --- drivers/firmware/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index bbd2155d8483..431f1c782158 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig @@ -141,7 +141,7 @@ config FW_CFG_SYSFS_CMDLINE config INTEL_STRATIX10_SERVICE tristate "Intel Stratix10 Service Layer" - depends on ARCH_INTEL_SOCFPGA && ARM64 && HAVE_ARM_SMCCC + depends on (ARCH_INTEL_SOCFPGA && ARM64 && HAVE_ARM_SMCCC) || COMPILE_TEST default n help Intel Stratix10 service layer runs at privileged exception level, -- 2.51.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCHv2 2/2] firmware: stratix10-rsu: add COMPILE_TEST support 2025-11-12 6:30 ` [PATCHv2 2/2] firmware: stratix10-rsu: add COMPILE_TEST support Rosen Penev @ 2025-11-13 11:30 ` kernel test robot 0 siblings, 0 replies; 6+ messages in thread From: kernel test robot @ 2025-11-13 11:30 UTC (permalink / raw) To: Rosen Penev, linux-kernel; +Cc: oe-kbuild-all, Dinh Nguyen 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-20251113] [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/firmware-stratix10-rsu-fix-32-bit-compilation/20251112-143202 base: linus/master patch link: https://lore.kernel.org/r/20251112063033.176276-3-rosenp%40gmail.com patch subject: [PATCHv2 2/2] firmware: stratix10-rsu: add COMPILE_TEST support config: s390-randconfig-r111-20251113 (https://download.01.org/0day-ci/archive/20251113/202511131954.IdQx9gfF-lkp@intel.com/config) compiler: s390-linux-gcc (GCC) 12.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251113/202511131954.IdQx9gfF-lkp@intel.com/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 <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202511131954.IdQx9gfF-lkp@intel.com/ All errors (new ones prefixed by >>): s390-linux-ld: drivers/firmware/stratix10-svc.o: in function `svc_smccc_hvc': >> drivers/firmware/stratix10-svc.c:845:(.text+0x5ba): undefined reference to `__arm_smccc_hvc' vim +845 drivers/firmware/stratix10-svc.c 7ca5ce896524f5 Richard Gong 2018-11-13 826 7ca5ce896524f5 Richard Gong 2018-11-13 827 /** 7ca5ce896524f5 Richard Gong 2018-11-13 828 * svc_smccc_hvc() - hypervisor call between normal and secure world 7ca5ce896524f5 Richard Gong 2018-11-13 829 * @a0: argument passed in registers 0 7ca5ce896524f5 Richard Gong 2018-11-13 830 * @a1: argument passed in registers 1 7ca5ce896524f5 Richard Gong 2018-11-13 831 * @a2: argument passed in registers 2 7ca5ce896524f5 Richard Gong 2018-11-13 832 * @a3: argument passed in registers 3 7ca5ce896524f5 Richard Gong 2018-11-13 833 * @a4: argument passed in registers 4 7ca5ce896524f5 Richard Gong 2018-11-13 834 * @a5: argument passed in registers 5 7ca5ce896524f5 Richard Gong 2018-11-13 835 * @a6: argument passed in registers 6 7ca5ce896524f5 Richard Gong 2018-11-13 836 * @a7: argument passed in registers 7 7ca5ce896524f5 Richard Gong 2018-11-13 837 * @res: result values from register 0 to 3 7ca5ce896524f5 Richard Gong 2018-11-13 838 */ 7ca5ce896524f5 Richard Gong 2018-11-13 839 static void svc_smccc_hvc(unsigned long a0, unsigned long a1, 7ca5ce896524f5 Richard Gong 2018-11-13 840 unsigned long a2, unsigned long a3, 7ca5ce896524f5 Richard Gong 2018-11-13 841 unsigned long a4, unsigned long a5, 7ca5ce896524f5 Richard Gong 2018-11-13 842 unsigned long a6, unsigned long a7, 7ca5ce896524f5 Richard Gong 2018-11-13 843 struct arm_smccc_res *res) 7ca5ce896524f5 Richard Gong 2018-11-13 844 { 7ca5ce896524f5 Richard Gong 2018-11-13 @845 arm_smccc_hvc(a0, a1, a2, a3, a4, a5, a6, a7, res); 7ca5ce896524f5 Richard Gong 2018-11-13 846 } 7ca5ce896524f5 Richard Gong 2018-11-13 847 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-11-19 1:14 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-11-12 6:30 [PATCHv2 0/2] firmware: stratix10-rsu: add COMPILE_TEST support Rosen Penev 2025-11-12 6:30 ` [PATCHv2 1/2] firmware: stratix10-rsu: fix 32-bit compilation Rosen Penev 2025-11-18 3:33 ` Dinh Nguyen 2025-11-19 1:13 ` Rosen Penev 2025-11-12 6:30 ` [PATCHv2 2/2] firmware: stratix10-rsu: add COMPILE_TEST support Rosen Penev 2025-11-13 11:30 ` kernel test robot
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.