[RFC PATCH v2 5/7] s390/runtime-const: Introduce runtime_const_mask_32()

K Prateek Nayak kprateek.nayak at amd.com
Mon Mar 16 18:55:25 PDT 2026


Hello Heiko,

On 3/17/2026 12:49 AM, Heiko Carstens wrote:
>> +#define runtime_const_mask_32(val, sym)				\
>> +({								\
>> +	unsigned int __ret = (val);				\
>> +								\
>> +	asm_inline(						\
>> +		"0:	nilf	%[__ret],12\n"			\
>> +		".pushsection runtime_mask_" #sym ",\"a\"\n"	\
>> +		".long 0b - .\n"				\
>> +		".popsection"					\
>> +		: [__ret] "+d" (__ret));			\
>> +	__ret;							\
>> +})
> 
> The nilf instruction changes the condition code and this must be reflected in
> the clobber list.

Thanks a ton for catching that!

> Besides that I would also appreciate if you would move the
> existing comment above __runtime_fixup_32().
> 
> Or in other words, if you merge the patch below into this one feel free to
> add:

I'll fold in the suggested diff when spinning up the next version.

> 
> Acked-by: Heiko Carstens <hca at linux.ibm.com>

Thanks a ton for taking a look at the series!

-- 
Thanks and Regards,
Prateek




More information about the linux-riscv mailing list