]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/fsl: Fix mfpmr build errors with newer binutils
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 29 Feb 2024 12:25:19 +0000 (23:25 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Apr 2024 10:50:05 +0000 (12:50 +0200)
commit8f7f583ce3393580eb8a55942d05e3ab6eb161ba
treeced9e8975dca4c769b3b1a73880f7ac0e604a78d
parent99740c4791dc8019b0d758c5389ca6d1c0604d95
powerpc/fsl: Fix mfpmr build errors with newer binutils

[ Upstream commit 5f491356b7149564ab22323ccce79c8d595bfd0c ]

Binutils 2.38 complains about the use of mfpmr when building
ppc6xx_defconfig:

    CC      arch/powerpc/kernel/pmc.o
  {standard input}: Assembler messages:
  {standard input}:45: Error: unrecognized opcode: `mfpmr'
  {standard input}:56: Error: unrecognized opcode: `mtpmr'

This is because by default the kernel is built with -mcpu=powerpc, and
the mt/mfpmr instructions are not defined.

It can be avoided by enabling CONFIG_E300C3_CPU, but just adding that to
the defconfig will leave open the possibility of randconfig failures.

So add machine directives around the mt/mfpmr instructions to tell
binutils how to assemble them.

Cc: stable@vger.kernel.org
Reported-by: Jan-Benedict Glaw <jbglaw@lug-owl.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240229122521.762431-3-mpe@ellerman.id.au
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/include/asm/reg_fsl_emb.h