2021-06-19 20:43:09

by kernel test robot

[permalink] [raw]
Subject: {standard input}:2316: Error: branch to a symbol in another ISA mode

Hi Paul,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9ed13a17e38e0537e24d9b507645002bf8d0201f
commit: c434b9f80b0923e6460031b0fd964f8b0bf3c6a6 MIPS: Kconfig: add MIPS_GENERIC_KERNEL symbol
date: 9 months ago
config: mips-randconfig-r013-20210619 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c434b9f80b0923e6460031b0fd964f8b0bf3c6a6
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout c434b9f80b0923e6460031b0fd964f8b0bf3c6a6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

{standard input}: Assembler messages:
>> {standard input}:2316: Error: branch to a symbol in another ISA mode

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


Attachments:
(No filename) (1.41 kB)
.config.gz (34.88 kB)
Download all attachments

2021-06-25 10:51:31

by Paul Cercueil

[permalink] [raw]
Subject: [PATCH] MIPS: MT extensions are not available on MIPS32r1

MIPS MT extensions were added with the MIPS 34K processor, which was
based on the MIPS32r2 ISA.

This fixes a build error when building a generic kernel for a MIPS32r1
CPU.

Fixes: c434b9f80b09 ("MIPS: Kconfig: add MIPS_GENERIC_KERNEL symbol")
Cc: [email protected] # v5.9
Signed-off-by: Paul Cercueil <[email protected]>
---
arch/mips/include/asm/cpu-features.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h
index 78cf7e300f12..f98892fd8f1d 100644
--- a/arch/mips/include/asm/cpu-features.h
+++ b/arch/mips/include/asm/cpu-features.h
@@ -64,6 +64,8 @@
((MIPS_ISA_REV >= (ge)) && (MIPS_ISA_REV < (lt)))
#define __isa_range_or_flag(ge, lt, flag) \
(__isa_range(ge, lt) || ((MIPS_ISA_REV < (lt)) && __isa(flag)))
+#define __isa_range_and_ase(ge, lt, ase) \
+ (__isa_range(ge, lt) && __ase(ase))

/*
* SMP assumption: Options of CPU 0 are a superset of all processors.
@@ -426,7 +428,7 @@
#endif

#ifndef cpu_has_mipsmt
-#define cpu_has_mipsmt __isa_lt_and_ase(6, MIPS_ASE_MIPSMT)
+#define cpu_has_mipsmt __isa_range_and_ase(2, 6, MIPS_ASE_MIPSMT)
#endif

#ifndef cpu_has_vp
--
2.30.2

2021-06-29 08:35:14

by Thomas Bogendoerfer

[permalink] [raw]
Subject: Re: [PATCH] MIPS: MT extensions are not available on MIPS32r1

On Fri, Jun 25, 2021 at 11:49:29AM +0100, Paul Cercueil wrote:
> MIPS MT extensions were added with the MIPS 34K processor, which was
> based on the MIPS32r2 ISA.
>
> This fixes a build error when building a generic kernel for a MIPS32r1
> CPU.
>
> Fixes: c434b9f80b09 ("MIPS: Kconfig: add MIPS_GENERIC_KERNEL symbol")
> Cc: [email protected] # v5.9
> Signed-off-by: Paul Cercueil <[email protected]>
> ---
> arch/mips/include/asm/cpu-features.h | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)

applied to mips-next.

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]