From 6caecacc92b9170fa3dd2e5a3b17eaf13cf30065 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Thu, 7 Mar 2024 00:08:30 +1100 Subject: [PATCH] powerpc/fsl: Fix mfpmr() asm constraint error mfpmr() needs to be marked always inline, otherwise the compiler will complain that the rn argument can't be passed to the asm block as an integer: arch/powerpc/include/asm/reg_fsl_emb.h:18:9: warning: 'asm' operand 1 probably does not match constraints 18 | asm (".machine push; " | ^~~ arch/powerpc/include/asm/reg_fsl_emb.h:18:9: error: impossible constraint in 'asm' Mark mtpmr() always inline also to avoid any future problems with it. Fixes: f01dbd73ccf1 ("powerpc/fsl: Modernise mt/mfpmr") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202403051835.iqLGz996-lkp@intel.com/ Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/reg_fsl_emb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/reg_fsl_emb.h b/arch/powerpc/include/asm/reg_fsl_emb.h index b0563c30b0621..9893d2001b680 100644 --- a/arch/powerpc/include/asm/reg_fsl_emb.h +++ b/arch/powerpc/include/asm/reg_fsl_emb.h @@ -11,7 +11,7 @@ #ifndef __ASSEMBLY__ /* Performance Monitor Registers */ -static inline unsigned int mfpmr(unsigned int rn) +static __always_inline unsigned int mfpmr(unsigned int rn) { unsigned int rval; @@ -24,7 +24,7 @@ static inline unsigned int mfpmr(unsigned int rn) return rval; } -static inline void mtpmr(unsigned int rn, unsigned int val) +static __always_inline void mtpmr(unsigned int rn, unsigned int val) { asm (".machine push; " ".machine e300; " -- 2.30.2