linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* {standard input}:2316: Error: branch to a symbol in another ISA mode
@ 2021-06-19 15:02 kernel test robot
  2021-06-25 10:49 ` [PATCH] MIPS: MT extensions are not available on MIPS32r1 Paul Cercueil
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-06-19 15:02 UTC (permalink / raw)
  To: Paul Cercueil; +Cc: kbuild-all, linux-kernel, Thomas Bogendoerfer

[-- Attachment #1: Type: text/plain, Size: 1411 bytes --]

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 <lkp@intel.com>

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/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35714 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] MIPS: MT extensions are not available on MIPS32r1
  2021-06-19 15:02 {standard input}:2316: Error: branch to a symbol in another ISA mode kernel test robot
@ 2021-06-25 10:49 ` Paul Cercueil
  2021-06-29  8:31   ` Thomas Bogendoerfer
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Cercueil @ 2021-06-25 10:49 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: list, linux-mips, linux-kernel, Paul Cercueil, stable

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: stable@vger.kernel.org # v5.9
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: MT extensions are not available on MIPS32r1
  2021-06-25 10:49 ` [PATCH] MIPS: MT extensions are not available on MIPS32r1 Paul Cercueil
@ 2021-06-29  8:31   ` Thomas Bogendoerfer
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Bogendoerfer @ 2021-06-29  8:31 UTC (permalink / raw)
  To: Paul Cercueil; +Cc: list, linux-mips, linux-kernel, stable

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: stable@vger.kernel.org # v5.9
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  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 ]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-29  8:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-19 15:02 {standard input}:2316: Error: branch to a symbol in another ISA mode kernel test robot
2021-06-25 10:49 ` [PATCH] MIPS: MT extensions are not available on MIPS32r1 Paul Cercueil
2021-06-29  8:31   ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).