Skip to content

Commit 6caecac

Browse files
committed
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: f01dbd7 ("powerpc/fsl: Modernise mt/mfpmr") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202403051835.iqLGz996-lkp@intel.com/ Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent ca3d3aa commit 6caecac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/powerpc/include/asm/reg_fsl_emb.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#ifndef __ASSEMBLY__
1313
/* Performance Monitor Registers */
14-
static inline unsigned int mfpmr(unsigned int rn)
14+
static __always_inline unsigned int mfpmr(unsigned int rn)
1515
{
1616
unsigned int rval;
1717

@@ -24,7 +24,7 @@ static inline unsigned int mfpmr(unsigned int rn)
2424
return rval;
2525
}
2626

27-
static inline void mtpmr(unsigned int rn, unsigned int val)
27+
static __always_inline void mtpmr(unsigned int rn, unsigned int val)
2828
{
2929
asm (".machine push; "
3030
".machine e300; "

0 commit comments

Comments
 (0)