Re: {standard input}:577: Error: unsupported relocation against base

From: Feng Tang
Date: Fri Feb 05 2021 - 19:45:47 EST


Hi Christophe and Michael,

On Mon, Jan 18, 2021 at 10:24:08PM +0800, Christophe Leroy wrote:
>
>
> Le 05/01/2021 ? 11:58, kernel test robot a 閏rit :
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62
> > commit: 8b8319b181fd9d6821703fef1228b4dcde613a16 powerpc/44x: Don't support 440 when CONFIG_PPC_47x is set
>
> I see no link with that commit. Looks like the problem has been existing for some time.
> It exists on the commit before that one, it exists on v5.9 and it exists on v5.10 with that commit
> reverted.

Yes, this seems to be a long-standing issue, and we just double checked
this compile error.

It happend when compiling arch/powerpc/platforms/44x/fsp2.c, macro
'mfdcr' requirs an instant number as parameter, while is not met by
show_plbopb_regs(). Changing show_plbopb_regs() from function to
a macro fixes the error, as the patch below:

Thanks,
Feng