All of lore.kernel.org
 help / color / mirror / Atom feed
* [sashal-linux-stable:queue-5.8 72/77] arch/mips/kernel/genex.S:572: Error: invalid operands `mfc0 $5, CP0_DIAGNOSTIC1'
@ 2020-08-28  3:50 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-08-28  3:50 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.8
head:   8060d75aa27a18a8c7f73f664102dcd4c6e7d5da
commit: 6f2e3343b9588f7be8e1fc681265f7fecf258d30 [72/77] MIPS: handle Loongson-specific GSExc exception
config: mips-allyesconfig (attached as .config)
compiler: mips-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
        git checkout 6f2e3343b9588f7be8e1fc681265f7fecf258d30
        # 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 >>):

   arch/mips/kernel/genex.S: Assembler messages:
>> arch/mips/kernel/genex.S:572: Error: invalid operands `mfc0 $5,CP0_DIAGNOSTIC1'
--
   arch/mips/kernel/traps.c:438:17: warning: no previous prototype for 'do_be' [-Wmissing-prototypes]
     438 | asmlinkage void do_be(struct pt_regs *regs)
         |                 ^~~~~
   arch/mips/kernel/traps.c:743:17: warning: no previous prototype for 'do_ov' [-Wmissing-prototypes]
     743 | asmlinkage void do_ov(struct pt_regs *regs)
         |                 ^~~~~
   arch/mips/kernel/traps.c:867:17: warning: no previous prototype for 'do_fpe' [-Wmissing-prototypes]
     867 | asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31)
         |                 ^~~~~~
   arch/mips/kernel/traps.c:1020:17: warning: no previous prototype for 'do_bp' [-Wmissing-prototypes]
    1020 | asmlinkage void do_bp(struct pt_regs *regs)
         |                 ^~~~~
   arch/mips/kernel/traps.c:1112:17: warning: no previous prototype for 'do_tr' [-Wmissing-prototypes]
    1112 | asmlinkage void do_tr(struct pt_regs *regs)
         |                 ^~~~~
   arch/mips/kernel/traps.c:1154:17: warning: no previous prototype for 'do_ri' [-Wmissing-prototypes]
    1154 | asmlinkage void do_ri(struct pt_regs *regs)
         |                 ^~~~~
   arch/mips/kernel/traps.c:1393:17: warning: no previous prototype for 'do_cpu' [-Wmissing-prototypes]
    1393 | asmlinkage void do_cpu(struct pt_regs *regs)
         |                 ^~~~~~
   arch/mips/kernel/traps.c:1498:17: warning: no previous prototype for 'do_msa_fpe' [-Wmissing-prototypes]
    1498 | asmlinkage void do_msa_fpe(struct pt_regs *regs, unsigned int msacsr)
         |                 ^~~~~~~~~~
   arch/mips/kernel/traps.c:1518:17: warning: no previous prototype for 'do_msa' [-Wmissing-prototypes]
    1518 | asmlinkage void do_msa(struct pt_regs *regs)
         |                 ^~~~~~
   arch/mips/kernel/traps.c:1539:17: warning: no previous prototype for 'do_mdmx' [-Wmissing-prototypes]
    1539 | asmlinkage void do_mdmx(struct pt_regs *regs)
         |                 ^~~~~~~
   arch/mips/kernel/traps.c:1551:17: warning: no previous prototype for 'do_watch' [-Wmissing-prototypes]
    1551 | asmlinkage void do_watch(struct pt_regs *regs)
         |                 ^~~~~~~~
   arch/mips/kernel/traps.c:1578:17: warning: no previous prototype for 'do_mcheck' [-Wmissing-prototypes]
    1578 | asmlinkage void do_mcheck(struct pt_regs *regs)
         |                 ^~~~~~~~~
   arch/mips/kernel/traps.c: In function 'do_mcheck':
   arch/mips/kernel/traps.c:1581:17: warning: variable 'prev_state' set but not used [-Wunused-but-set-variable]
    1581 |  enum ctx_state prev_state;
         |                 ^~~~~~~~~~
   arch/mips/kernel/traps.c: At top level:
   arch/mips/kernel/traps.c:1609:17: warning: no previous prototype for 'do_mt' [-Wmissing-prototypes]
    1609 | asmlinkage void do_mt(struct pt_regs *regs)
         |                 ^~~~~
   arch/mips/kernel/traps.c:1645:17: warning: no previous prototype for 'do_dsp' [-Wmissing-prototypes]
    1645 | asmlinkage void do_dsp(struct pt_regs *regs)
         |                 ^~~~~~
   arch/mips/kernel/traps.c:1653:17: warning: no previous prototype for 'do_reserved' [-Wmissing-prototypes]
    1653 | asmlinkage void do_reserved(struct pt_regs *regs)
         |                 ^~~~~~~~~~~
   arch/mips/kernel/traps.c:1829:17: warning: no previous prototype for 'cache_parity_error' [-Wmissing-prototypes]
    1829 | asmlinkage void cache_parity_error(void)
         |                 ^~~~~~~~~~~~~~~~~~
   arch/mips/kernel/traps.c:1877:17: warning: no previous prototype for 'do_ftlb' [-Wmissing-prototypes]
    1877 | asmlinkage void do_ftlb(void)
         |                 ^~~~~~~
   arch/mips/kernel/traps.c:1906:17: warning: no previous prototype for 'do_gsexc' [-Wmissing-prototypes]
    1906 | asmlinkage void do_gsexc(struct pt_regs *regs, u32 diag1)
         |                 ^~~~~~~~
   arch/mips/kernel/traps.c: In function 'do_gsexc':
>> arch/mips/kernel/traps.c:1908:25: error: 'LOONGSON_DIAG1_EXCCODE' undeclared (first use in this function); did you mean 'LOONGSON_DIAG_UCAC'?
    1908 |  u32 exccode = (diag1 & LOONGSON_DIAG1_EXCCODE) >>
         |                         ^~~~~~~~~~~~~~~~~~~~~~
         |                         LOONGSON_DIAG_UCAC
   arch/mips/kernel/traps.c:1908:25: note: each undeclared identifier is reported only once for each function it appears in
>> arch/mips/kernel/traps.c:1909:4: error: 'LOONGSON_DIAG1_EXCCODE_SHIFT' undeclared (first use in this function)
    1909 |    LOONGSON_DIAG1_EXCCODE_SHIFT;
         |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/traps.c: At top level:
   arch/mips/kernel/traps.c:1941:6: warning: no previous prototype for 'ejtag_exception_handler' [-Wmissing-prototypes]
    1941 | void ejtag_exception_handler(struct pt_regs *regs)
         |      ^~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/traps.c:1986:17: warning: no previous prototype for 'nmi_exception_handler' [-Wmissing-prototypes]
    1986 | void __noreturn nmi_exception_handler(struct pt_regs *regs)
         |                 ^~~~~~~~~~~~~~~~~~~~~

# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/commit/?id=6f2e3343b9588f7be8e1fc681265f7fecf258d30
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.8
git checkout 6f2e3343b9588f7be8e1fc681265f7fecf258d30
vim +572 arch/mips/kernel/genex.S

   403	
   404	ejtag_return:
   405		back_to_back_c0_hazard
   406		MFC0	k0, CP0_DESAVE
   407		.set	mips32
   408		deret
   409		.set	pop
   410		END(ejtag_debug_handler)
   411	
   412	/*
   413	 * This buffer is reserved for the use of the EJTAG debug
   414	 * handler.
   415	 */
   416		.data
   417	EXPORT(ejtag_debug_buffer)
   418		.fill	LONGSIZE
   419	#ifdef CONFIG_SMP
   420	EXPORT(ejtag_debug_buffer_spinlock)
   421		.fill	LONGSIZE
   422	EXPORT(ejtag_debug_buffer_per_cpu)
   423		.fill	LONGSIZE * NR_CPUS
   424	#endif
   425		.previous
   426	
   427		__INIT
   428	
   429	/*
   430	 * NMI debug exception handler for MIPS reference boards.
   431	 * The NMI debug exception entry point is 0xbfc00000, which
   432	 * normally is in the boot PROM, so the boot PROM must do a
   433	 * unconditional jump to this vector.
   434	 */
   435	NESTED(except_vec_nmi, 0, sp)
   436		j	nmi_handler
   437	#ifdef CONFIG_CPU_MICROMIPS
   438		 nop
   439	#endif
   440		END(except_vec_nmi)
   441	
   442		__FINIT
   443	
   444	NESTED(nmi_handler, PT_SIZE, sp)
   445		.cfi_signal_frame
   446		.set	push
   447		.set	noat
   448		/*
   449		 * Clear ERL - restore segment mapping
   450		 * Clear BEV - required for page fault exception handler to work
   451		 */
   452		mfc0	k0, CP0_STATUS
   453		ori	k0, k0, ST0_EXL
   454		li	k1, ~(ST0_BEV | ST0_ERL)
   455		and	k0, k0, k1
   456		mtc0	k0, CP0_STATUS
   457		_ehb
   458		SAVE_ALL
   459		move	a0, sp
   460		jal	nmi_exception_handler
   461		/* nmi_exception_handler never returns */
   462		.set	pop
   463		END(nmi_handler)
   464	
   465		.macro	__build_clear_none
   466		.endm
   467	
   468		.macro	__build_clear_sti
   469		TRACE_IRQS_ON
   470		STI
   471		.endm
   472	
   473		.macro	__build_clear_cli
   474		CLI
   475		TRACE_IRQS_OFF
   476		.endm
   477	
   478		.macro	__build_clear_fpe
   479		CLI
   480		TRACE_IRQS_OFF
   481		.set	push
   482		/* gas fails to assemble cfc1 for some archs (octeon).*/ \
   483		.set	mips1
   484		SET_HARDFLOAT
   485		cfc1	a1, fcr31
   486		.set	pop
   487		.endm
   488	
   489		.macro	__build_clear_msa_fpe
   490		CLI
   491		TRACE_IRQS_OFF
   492		_cfcmsa	a1, MSA_CSR
   493		.endm
   494	
   495		.macro	__build_clear_ade
   496		MFC0	t0, CP0_BADVADDR
   497		PTR_S	t0, PT_BVADDR(sp)
   498		KMODE
   499		.endm
   500	
   501		.macro __build_clear_gsexc
   502		.set	push
   503		/*
   504		 * We need to specify a selector to access the CP0.Diag1 (GSCause)
   505		 * register. All GSExc-equipped processors have MIPS32.
   506		 */
   507		.set	mips32
   508		mfc0	a1, CP0_DIAGNOSTIC1
   509		.set	pop
   510		TRACE_IRQS_ON
   511		STI
   512		.endm
   513	
   514		.macro	__BUILD_silent exception
   515		.endm
   516	
   517		/* Gas tries to parse the ASM_PRINT argument as a string containing
   518		   string escapes and emits bogus warnings if it believes to
   519		   recognize an unknown escape code.  So make the arguments
   520		   start with an n and gas will believe \n is ok ...  */
   521		.macro	__BUILD_verbose nexception
   522		LONG_L	a1, PT_EPC(sp)
   523	#ifdef CONFIG_32BIT
   524		ASM_PRINT("Got \nexception at %08lx\012")
   525	#endif
   526	#ifdef CONFIG_64BIT
   527		ASM_PRINT("Got \nexception at %016lx\012")
   528	#endif
   529		.endm
   530	
   531		.macro	__BUILD_count exception
   532		LONG_L	t0,exception_count_\exception
   533		LONG_ADDIU	t0, 1
   534		LONG_S	t0,exception_count_\exception
   535		.comm	exception_count\exception, 8, 8
   536		.endm
   537	
   538		.macro	__BUILD_HANDLER exception handler clear verbose ext
   539		.align	5
   540		NESTED(handle_\exception, PT_SIZE, sp)
   541		.cfi_signal_frame
   542		.set	noat
   543		SAVE_ALL
   544		FEXPORT(handle_\exception\ext)
   545		__build_clear_\clear
   546		.set	at
   547		__BUILD_\verbose \exception
   548		move	a0, sp
   549		jal	do_\handler
   550		j	ret_from_exception
   551		END(handle_\exception)
   552		.endm
   553	
   554		.macro	BUILD_HANDLER exception handler clear verbose
   555		__BUILD_HANDLER \exception \handler \clear \verbose _int
   556		.endm
   557	
   558		BUILD_HANDLER adel ade ade silent		/* #4  */
   559		BUILD_HANDLER ades ade ade silent		/* #5  */
   560		BUILD_HANDLER ibe be cli silent			/* #6  */
   561		BUILD_HANDLER dbe be cli silent			/* #7  */
   562		BUILD_HANDLER bp bp sti silent			/* #9  */
   563		BUILD_HANDLER ri ri sti silent			/* #10 */
   564		BUILD_HANDLER cpu cpu sti silent		/* #11 */
   565		BUILD_HANDLER ov ov sti silent			/* #12 */
   566		BUILD_HANDLER tr tr sti silent			/* #13 */
   567		BUILD_HANDLER msa_fpe msa_fpe msa_fpe silent	/* #14 */
   568	#ifdef CONFIG_MIPS_FP_SUPPORT
   569		BUILD_HANDLER fpe fpe fpe silent		/* #15 */
   570	#endif
   571		BUILD_HANDLER ftlb ftlb none silent		/* #16 */
 > 572		BUILD_HANDLER gsexc gsexc gsexc silent		/* #16 */
   573		BUILD_HANDLER msa msa sti silent		/* #21 */
   574		BUILD_HANDLER mdmx mdmx sti silent		/* #22 */
   575	#ifdef	CONFIG_HARDWARE_WATCHPOINTS
   576		/*
   577		 * For watch, interrupts will be enabled after the watch
   578		 * registers are read.
   579		 */
   580		BUILD_HANDLER watch watch cli silent		/* #23 */
   581	#else
   582		BUILD_HANDLER watch watch sti verbose		/* #23 */
   583	#endif
   584		BUILD_HANDLER mcheck mcheck cli verbose		/* #24 */
   585		BUILD_HANDLER mt mt sti silent			/* #25 */
   586		BUILD_HANDLER dsp dsp sti silent		/* #26 */
   587		BUILD_HANDLER reserved reserved sti verbose	/* others */
   588	
   589		.align	5
   590		LEAF(handle_ri_rdhwr_tlbp)
   591		.set	push
   592		.set	noat
   593		.set	noreorder
   594		/* check if TLB contains a entry for EPC */
   595		MFC0	k1, CP0_ENTRYHI
   596		andi	k1, MIPS_ENTRYHI_ASID | MIPS_ENTRYHI_ASIDX
   597		MFC0	k0, CP0_EPC
   598		PTR_SRL	k0, _PAGE_SHIFT + 1
   599		PTR_SLL	k0, _PAGE_SHIFT + 1
   600		or	k1, k0
   601		MTC0	k1, CP0_ENTRYHI
   602		mtc0_tlbw_hazard
   603		tlbp
   604		tlb_probe_hazard
   605		mfc0	k1, CP0_INDEX
   606		.set	pop
   607		bltz	k1, handle_ri	/* slow path */
   608		/* fall thru */
   609		END(handle_ri_rdhwr_tlbp)
   610	
   611		LEAF(handle_ri_rdhwr)
   612		.set	push
   613		.set	noat
   614		.set	noreorder
   615		/* MIPS32:    0x7c03e83b: rdhwr v1,$29 */
   616		/* microMIPS: 0x007d6b3c: rdhwr v1,$29 */
   617		MFC0	k1, CP0_EPC
   618	#if defined(CONFIG_CPU_MICROMIPS) || defined(CONFIG_CPU_MIPS32_R2) || defined(CONFIG_CPU_MIPS64_R2)
   619		and	k0, k1, 1
   620		beqz	k0, 1f
   621		 xor	k1, k0
   622		lhu	k0, (k1)
   623		lhu	k1, 2(k1)
   624		ins	k1, k0, 16, 16
   625		lui	k0, 0x007d
   626		b	docheck
   627		 ori	k0, 0x6b3c
   628	1:
   629		lui	k0, 0x7c03
   630		lw	k1, (k1)
   631		ori	k0, 0xe83b
   632	#else
   633		andi	k0, k1, 1
   634		bnez	k0, handle_ri
   635		 lui	k0, 0x7c03
   636		lw	k1, (k1)
   637		ori	k0, 0xe83b
   638	#endif
   639		.set	reorder
   640	docheck:
   641		bne	k0, k1, handle_ri	/* if not ours */
   642	
   643	isrdhwr:
   644		/* The insn is rdhwr.  No need to check CAUSE.BD here. */
   645		get_saved_sp	/* k1 := current_thread_info */
   646		.set	noreorder
   647		MFC0	k0, CP0_EPC
   648	#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX)
   649		ori	k1, _THREAD_MASK
   650		xori	k1, _THREAD_MASK
   651		LONG_L	v1, TI_TP_VALUE(k1)
   652		LONG_ADDIU	k0, 4
   653		jr	k0
   654		 rfe
   655	#else
   656	#ifndef CONFIG_CPU_DADDI_WORKAROUNDS
   657		LONG_ADDIU	k0, 4		/* stall on $k0 */
   658	#else
   659		.set	at=v1
   660		LONG_ADDIU	k0, 4
   661		.set	noat
   662	#endif
   663		MTC0	k0, CP0_EPC
   664		/* I hope three instructions between MTC0 and ERET are enough... */
   665		ori	k1, _THREAD_MASK
   666		xori	k1, _THREAD_MASK
   667		LONG_L	v1, TI_TP_VALUE(k1)
   668		.set	push
   669		.set	arch=r4000
   670		eret
   671		.set	pop
   672	#endif
   673		.set	pop
   674		END(handle_ri_rdhwr)
   675	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

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

* [sashal-linux-stable:queue-5.8 72/77] arch/mips/kernel/genex.S:572: Error: invalid operands `mfc0 $5, CP0_DIAGNOSTIC1'
@ 2020-08-28  4:20 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-08-28  4:20 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.8
head:   8060d75aa27a18a8c7f73f664102dcd4c6e7d5da
commit: 6f2e3343b9588f7be8e1fc681265f7fecf258d30 [72/77] MIPS: handle Loongson-specific GSExc exception
config: mips-randconfig-r001-20200827 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c10e63677f5d20f18010f8f68c631ddc97546f7d)
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
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        git checkout 6f2e3343b9588f7be8e1fc681265f7fecf258d30
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 >>):

   arch/mips/kernel/genex.S: Assembler messages:
>> arch/mips/kernel/genex.S:572: Error: invalid operands `mfc0 $5,CP0_DIAGNOSTIC1'
   clang-12: error: assembler command failed with exit code 1 (use -v to see invocation)
--
              ^
              static 
   arch/mips/kernel/traps.c:1020:17: warning: no previous prototype for function 'do_bp' [-Wmissing-prototypes]
   asmlinkage void do_bp(struct pt_regs *regs)
                   ^
   arch/mips/kernel/traps.c:1020:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void do_bp(struct pt_regs *regs)
              ^
              static 
   arch/mips/kernel/traps.c:1112:17: warning: no previous prototype for function 'do_tr' [-Wmissing-prototypes]
   asmlinkage void do_tr(struct pt_regs *regs)
                   ^
   arch/mips/kernel/traps.c:1112:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void do_tr(struct pt_regs *regs)
              ^
              static 
   arch/mips/kernel/traps.c:1154:17: warning: no previous prototype for function 'do_ri' [-Wmissing-prototypes]
   asmlinkage void do_ri(struct pt_regs *regs)
                   ^
   arch/mips/kernel/traps.c:1154:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void do_ri(struct pt_regs *regs)
              ^
              static 
   arch/mips/kernel/traps.c:1393:17: warning: no previous prototype for function 'do_cpu' [-Wmissing-prototypes]
   asmlinkage void do_cpu(struct pt_regs *regs)
                   ^
   arch/mips/kernel/traps.c:1393:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void do_cpu(struct pt_regs *regs)
              ^
              static 
   arch/mips/kernel/traps.c:1498:17: warning: no previous prototype for function 'do_msa_fpe' [-Wmissing-prototypes]
   asmlinkage void do_msa_fpe(struct pt_regs *regs, unsigned int msacsr)
                   ^
   arch/mips/kernel/traps.c:1498:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void do_msa_fpe(struct pt_regs *regs, unsigned int msacsr)
              ^
              static 
   arch/mips/kernel/traps.c:1518:17: warning: no previous prototype for function 'do_msa' [-Wmissing-prototypes]
   asmlinkage void do_msa(struct pt_regs *regs)
                   ^
   arch/mips/kernel/traps.c:1518:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void do_msa(struct pt_regs *regs)
              ^
              static 
   arch/mips/kernel/traps.c:1539:17: warning: no previous prototype for function 'do_mdmx' [-Wmissing-prototypes]
   asmlinkage void do_mdmx(struct pt_regs *regs)
                   ^
   arch/mips/kernel/traps.c:1539:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void do_mdmx(struct pt_regs *regs)
              ^
              static 
   arch/mips/kernel/traps.c:1551:17: warning: no previous prototype for function 'do_watch' [-Wmissing-prototypes]
   asmlinkage void do_watch(struct pt_regs *regs)
                   ^
   arch/mips/kernel/traps.c:1551:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void do_watch(struct pt_regs *regs)
              ^
              static 
   arch/mips/kernel/traps.c:1578:17: warning: no previous prototype for function 'do_mcheck' [-Wmissing-prototypes]
   asmlinkage void do_mcheck(struct pt_regs *regs)
                   ^
   arch/mips/kernel/traps.c:1578:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void do_mcheck(struct pt_regs *regs)
              ^
              static 
   arch/mips/kernel/traps.c:1609:17: warning: no previous prototype for function 'do_mt' [-Wmissing-prototypes]
   asmlinkage void do_mt(struct pt_regs *regs)
                   ^
   arch/mips/kernel/traps.c:1609:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void do_mt(struct pt_regs *regs)
              ^
              static 
   arch/mips/kernel/traps.c:1645:17: warning: no previous prototype for function 'do_dsp' [-Wmissing-prototypes]
   asmlinkage void do_dsp(struct pt_regs *regs)
                   ^
   arch/mips/kernel/traps.c:1645:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void do_dsp(struct pt_regs *regs)
              ^
              static 
   arch/mips/kernel/traps.c:1653:17: warning: no previous prototype for function 'do_reserved' [-Wmissing-prototypes]
   asmlinkage void do_reserved(struct pt_regs *regs)
                   ^
   arch/mips/kernel/traps.c:1653:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void do_reserved(struct pt_regs *regs)
              ^
              static 
   arch/mips/kernel/traps.c:1829:17: warning: no previous prototype for function 'cache_parity_error' [-Wmissing-prototypes]
   asmlinkage void cache_parity_error(void)
                   ^
   arch/mips/kernel/traps.c:1829:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void cache_parity_error(void)
              ^
              static 
   arch/mips/kernel/traps.c:1877:17: warning: no previous prototype for function 'do_ftlb' [-Wmissing-prototypes]
   asmlinkage void do_ftlb(void)
                   ^
   arch/mips/kernel/traps.c:1877:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void do_ftlb(void)
              ^
              static 
>> arch/mips/kernel/traps.c:1908:25: error: use of undeclared identifier 'LOONGSON_DIAG1_EXCCODE'
           u32 exccode = (diag1 & LOONGSON_DIAG1_EXCCODE) >>
                                  ^
>> arch/mips/kernel/traps.c:1909:4: error: use of undeclared identifier 'LOONGSON_DIAG1_EXCCODE_SHIFT'
                           LOONGSON_DIAG1_EXCCODE_SHIFT;
                           ^
   arch/mips/kernel/traps.c:1906:17: warning: no previous prototype for function 'do_gsexc' [-Wmissing-prototypes]
   asmlinkage void do_gsexc(struct pt_regs *regs, u32 diag1)
                   ^
   arch/mips/kernel/traps.c:1906:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage void do_gsexc(struct pt_regs *regs, u32 diag1)
              ^
              static 
   arch/mips/kernel/traps.c:1941:6: warning: no previous prototype for function 'ejtag_exception_handler' [-Wmissing-prototypes]
   void ejtag_exception_handler(struct pt_regs *regs)
        ^
   arch/mips/kernel/traps.c:1941:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void ejtag_exception_handler(struct pt_regs *regs)
   ^
   static 
   arch/mips/kernel/traps.c:1986:17: warning: no previous prototype for function 'nmi_exception_handler' [-Wmissing-prototypes]
   void __noreturn nmi_exception_handler(struct pt_regs *regs)
                   ^
   arch/mips/kernel/traps.c:1986:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __noreturn nmi_exception_handler(struct pt_regs *regs)
   ^
   static 
   20 warnings and 2 errors generated.

# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/commit/?id=6f2e3343b9588f7be8e1fc681265f7fecf258d30
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.8
git checkout 6f2e3343b9588f7be8e1fc681265f7fecf258d30
vim +572 arch/mips/kernel/genex.S

   403	
   404	ejtag_return:
   405		back_to_back_c0_hazard
   406		MFC0	k0, CP0_DESAVE
   407		.set	mips32
   408		deret
   409		.set	pop
   410		END(ejtag_debug_handler)
   411	
   412	/*
   413	 * This buffer is reserved for the use of the EJTAG debug
   414	 * handler.
   415	 */
   416		.data
   417	EXPORT(ejtag_debug_buffer)
   418		.fill	LONGSIZE
   419	#ifdef CONFIG_SMP
   420	EXPORT(ejtag_debug_buffer_spinlock)
   421		.fill	LONGSIZE
   422	EXPORT(ejtag_debug_buffer_per_cpu)
   423		.fill	LONGSIZE * NR_CPUS
   424	#endif
   425		.previous
   426	
   427		__INIT
   428	
   429	/*
   430	 * NMI debug exception handler for MIPS reference boards.
   431	 * The NMI debug exception entry point is 0xbfc00000, which
   432	 * normally is in the boot PROM, so the boot PROM must do a
   433	 * unconditional jump to this vector.
   434	 */
   435	NESTED(except_vec_nmi, 0, sp)
   436		j	nmi_handler
   437	#ifdef CONFIG_CPU_MICROMIPS
   438		 nop
   439	#endif
   440		END(except_vec_nmi)
   441	
   442		__FINIT
   443	
   444	NESTED(nmi_handler, PT_SIZE, sp)
   445		.cfi_signal_frame
   446		.set	push
   447		.set	noat
   448		/*
   449		 * Clear ERL - restore segment mapping
   450		 * Clear BEV - required for page fault exception handler to work
   451		 */
   452		mfc0	k0, CP0_STATUS
   453		ori	k0, k0, ST0_EXL
   454		li	k1, ~(ST0_BEV | ST0_ERL)
   455		and	k0, k0, k1
   456		mtc0	k0, CP0_STATUS
   457		_ehb
   458		SAVE_ALL
   459		move	a0, sp
   460		jal	nmi_exception_handler
   461		/* nmi_exception_handler never returns */
   462		.set	pop
   463		END(nmi_handler)
   464	
   465		.macro	__build_clear_none
   466		.endm
   467	
   468		.macro	__build_clear_sti
   469		TRACE_IRQS_ON
   470		STI
   471		.endm
   472	
   473		.macro	__build_clear_cli
   474		CLI
   475		TRACE_IRQS_OFF
   476		.endm
   477	
   478		.macro	__build_clear_fpe
   479		CLI
   480		TRACE_IRQS_OFF
   481		.set	push
   482		/* gas fails to assemble cfc1 for some archs (octeon).*/ \
   483		.set	mips1
   484		SET_HARDFLOAT
   485		cfc1	a1, fcr31
   486		.set	pop
   487		.endm
   488	
   489		.macro	__build_clear_msa_fpe
   490		CLI
   491		TRACE_IRQS_OFF
   492		_cfcmsa	a1, MSA_CSR
   493		.endm
   494	
   495		.macro	__build_clear_ade
   496		MFC0	t0, CP0_BADVADDR
   497		PTR_S	t0, PT_BVADDR(sp)
   498		KMODE
   499		.endm
   500	
   501		.macro __build_clear_gsexc
   502		.set	push
   503		/*
   504		 * We need to specify a selector to access the CP0.Diag1 (GSCause)
   505		 * register. All GSExc-equipped processors have MIPS32.
   506		 */
   507		.set	mips32
   508		mfc0	a1, CP0_DIAGNOSTIC1
   509		.set	pop
   510		TRACE_IRQS_ON
   511		STI
   512		.endm
   513	
   514		.macro	__BUILD_silent exception
   515		.endm
   516	
   517		/* Gas tries to parse the ASM_PRINT argument as a string containing
   518		   string escapes and emits bogus warnings if it believes to
   519		   recognize an unknown escape code.  So make the arguments
   520		   start with an n and gas will believe \n is ok ...  */
   521		.macro	__BUILD_verbose nexception
   522		LONG_L	a1, PT_EPC(sp)
   523	#ifdef CONFIG_32BIT
   524		ASM_PRINT("Got \nexception at %08lx\012")
   525	#endif
   526	#ifdef CONFIG_64BIT
   527		ASM_PRINT("Got \nexception at %016lx\012")
   528	#endif
   529		.endm
   530	
   531		.macro	__BUILD_count exception
   532		LONG_L	t0,exception_count_\exception
   533		LONG_ADDIU	t0, 1
   534		LONG_S	t0,exception_count_\exception
   535		.comm	exception_count\exception, 8, 8
   536		.endm
   537	
   538		.macro	__BUILD_HANDLER exception handler clear verbose ext
   539		.align	5
   540		NESTED(handle_\exception, PT_SIZE, sp)
   541		.cfi_signal_frame
   542		.set	noat
   543		SAVE_ALL
   544		FEXPORT(handle_\exception\ext)
   545		__build_clear_\clear
   546		.set	at
   547		__BUILD_\verbose \exception
   548		move	a0, sp
   549		jal	do_\handler
   550		j	ret_from_exception
   551		END(handle_\exception)
   552		.endm
   553	
   554		.macro	BUILD_HANDLER exception handler clear verbose
   555		__BUILD_HANDLER \exception \handler \clear \verbose _int
   556		.endm
   557	
   558		BUILD_HANDLER adel ade ade silent		/* #4  */
   559		BUILD_HANDLER ades ade ade silent		/* #5  */
   560		BUILD_HANDLER ibe be cli silent			/* #6  */
   561		BUILD_HANDLER dbe be cli silent			/* #7  */
   562		BUILD_HANDLER bp bp sti silent			/* #9  */
   563		BUILD_HANDLER ri ri sti silent			/* #10 */
   564		BUILD_HANDLER cpu cpu sti silent		/* #11 */
   565		BUILD_HANDLER ov ov sti silent			/* #12 */
   566		BUILD_HANDLER tr tr sti silent			/* #13 */
   567		BUILD_HANDLER msa_fpe msa_fpe msa_fpe silent	/* #14 */
   568	#ifdef CONFIG_MIPS_FP_SUPPORT
   569		BUILD_HANDLER fpe fpe fpe silent		/* #15 */
   570	#endif
   571		BUILD_HANDLER ftlb ftlb none silent		/* #16 */
 > 572		BUILD_HANDLER gsexc gsexc gsexc silent		/* #16 */
   573		BUILD_HANDLER msa msa sti silent		/* #21 */
   574		BUILD_HANDLER mdmx mdmx sti silent		/* #22 */
   575	#ifdef	CONFIG_HARDWARE_WATCHPOINTS
   576		/*
   577		 * For watch, interrupts will be enabled after the watch
   578		 * registers are read.
   579		 */
   580		BUILD_HANDLER watch watch cli silent		/* #23 */
   581	#else
   582		BUILD_HANDLER watch watch sti verbose		/* #23 */
   583	#endif
   584		BUILD_HANDLER mcheck mcheck cli verbose		/* #24 */
   585		BUILD_HANDLER mt mt sti silent			/* #25 */
   586		BUILD_HANDLER dsp dsp sti silent		/* #26 */
   587		BUILD_HANDLER reserved reserved sti verbose	/* others */
   588	
   589		.align	5
   590		LEAF(handle_ri_rdhwr_tlbp)
   591		.set	push
   592		.set	noat
   593		.set	noreorder
   594		/* check if TLB contains a entry for EPC */
   595		MFC0	k1, CP0_ENTRYHI
   596		andi	k1, MIPS_ENTRYHI_ASID | MIPS_ENTRYHI_ASIDX
   597		MFC0	k0, CP0_EPC
   598		PTR_SRL	k0, _PAGE_SHIFT + 1
   599		PTR_SLL	k0, _PAGE_SHIFT + 1
   600		or	k1, k0
   601		MTC0	k1, CP0_ENTRYHI
   602		mtc0_tlbw_hazard
   603		tlbp
   604		tlb_probe_hazard
   605		mfc0	k1, CP0_INDEX
   606		.set	pop
   607		bltz	k1, handle_ri	/* slow path */
   608		/* fall thru */
   609		END(handle_ri_rdhwr_tlbp)
   610	
   611		LEAF(handle_ri_rdhwr)
   612		.set	push
   613		.set	noat
   614		.set	noreorder
   615		/* MIPS32:    0x7c03e83b: rdhwr v1,$29 */
   616		/* microMIPS: 0x007d6b3c: rdhwr v1,$29 */
   617		MFC0	k1, CP0_EPC
   618	#if defined(CONFIG_CPU_MICROMIPS) || defined(CONFIG_CPU_MIPS32_R2) || defined(CONFIG_CPU_MIPS64_R2)
   619		and	k0, k1, 1
   620		beqz	k0, 1f
   621		 xor	k1, k0
   622		lhu	k0, (k1)
   623		lhu	k1, 2(k1)
   624		ins	k1, k0, 16, 16
   625		lui	k0, 0x007d
   626		b	docheck
   627		 ori	k0, 0x6b3c
   628	1:
   629		lui	k0, 0x7c03
   630		lw	k1, (k1)
   631		ori	k0, 0xe83b
   632	#else
   633		andi	k0, k1, 1
   634		bnez	k0, handle_ri
   635		 lui	k0, 0x7c03
   636		lw	k1, (k1)
   637		ori	k0, 0xe83b
   638	#endif
   639		.set	reorder
   640	docheck:
   641		bne	k0, k1, handle_ri	/* if not ours */
   642	
   643	isrdhwr:
   644		/* The insn is rdhwr.  No need to check CAUSE.BD here. */
   645		get_saved_sp	/* k1 := current_thread_info */
   646		.set	noreorder
   647		MFC0	k0, CP0_EPC
   648	#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX)
   649		ori	k1, _THREAD_MASK
   650		xori	k1, _THREAD_MASK
   651		LONG_L	v1, TI_TP_VALUE(k1)
   652		LONG_ADDIU	k0, 4
   653		jr	k0
   654		 rfe
   655	#else
   656	#ifndef CONFIG_CPU_DADDI_WORKAROUNDS
   657		LONG_ADDIU	k0, 4		/* stall on $k0 */
   658	#else
   659		.set	at=v1
   660		LONG_ADDIU	k0, 4
   661		.set	noat
   662	#endif
   663		MTC0	k0, CP0_EPC
   664		/* I hope three instructions between MTC0 and ERET are enough... */
   665		ori	k1, _THREAD_MASK
   666		xori	k1, _THREAD_MASK
   667		LONG_L	v1, TI_TP_VALUE(k1)
   668		.set	push
   669		.set	arch=r4000
   670		eret
   671		.set	pop
   672	#endif
   673		.set	pop
   674		END(handle_ri_rdhwr)
   675	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

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

end of thread, other threads:[~2020-08-28  4:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28  3:50 [sashal-linux-stable:queue-5.8 72/77] arch/mips/kernel/genex.S:572: Error: invalid operands `mfc0 $5, CP0_DIAGNOSTIC1' kernel test robot
2020-08-28  4:20 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.