arch/sparc/kernel/traps_64.c:268:6: error: no previous declaration for 'is_no_fault_exception'
From: kernel test robot
Date: Sun Aug 21 2022 - 01:29:51 EST
Hi Rob,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 15b3f48a4339e3c16acf18624e2b7f60bc5e9a2c
commit: b6fe1089667a7afcc2cf92cdaec590c7b8381715 sparc64: Handle additional cases of no fault loads
date: 4 years, 11 months ago
config: sparc64-randconfig-c033-20220821 (https://download.01.org/0day-ci/archive/20220821/202208211303.SUJk39Cv-lkp@xxxxxxxxx/config)
compiler: sparc64-linux-gcc (GCC) 7.5.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=b6fe1089667a7afcc2cf92cdaec590c7b8381715
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b6fe1089667a7afcc2cf92cdaec590c7b8381715
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross W=1 O=build_dir ARCH=sparc64 SHELL=/bin/bash arch/sparc/kernel/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
>> arch/sparc/kernel/traps_64.c:268:6: error: no previous declaration for 'is_no_fault_exception' [-Werror=missing-declarations]
bool is_no_fault_exception(struct pt_regs *regs)
^~~~~~~~~~~~~~~~~~~~~
arch/sparc/kernel/traps_64.c:2117:6: error: no previous declaration for 'sun4v_nonresum_error_user_handled' [-Werror=missing-declarations]
bool sun4v_nonresum_error_user_handled(struct pt_regs *regs,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/is_no_fault_exception +268 arch/sparc/kernel/traps_64.c
267
> 268 bool is_no_fault_exception(struct pt_regs *regs)
269 {
270 unsigned char asi;
271 u32 insn;
272
273 if (get_user(insn, (u32 __user *)regs->tpc) == -EFAULT)
274 return false;
275
276 /*
277 * Must do a little instruction decoding here in order to
278 * decide on a course of action. The bits of interest are:
279 * insn[31:30] = op, where 3 indicates the load/store group
280 * insn[24:19] = op3, which identifies individual opcodes
281 * insn[13] indicates an immediate offset
282 * op3[4]=1 identifies alternate space instructions
283 * op3[5:4]=3 identifies floating point instructions
284 * op3[2]=1 identifies stores
285 * See "Opcode Maps" in the appendix of any Sparc V9
286 * architecture spec for full details.
287 */
288 if ((insn & 0xc0800000) == 0xc0800000) { /* op=3, op3[4]=1 */
289 if (insn & 0x2000) /* immediate offset */
290 asi = (regs->tstate >> 24); /* saved %asi */
291 else
292 asi = (insn >> 5); /* immediate asi */
293 if ((asi & 0xf2) == ASI_PNF) {
294 if (insn & 0x1000000) { /* op3[5:4]=3 */
295 handle_ldf_stq(insn, regs);
296 return true;
297 } else if (insn & 0x200000) { /* op3[2], stores */
298 return false;
299 }
300 handle_ld_nf(insn, regs);
301 return true;
302 }
303 }
304 return false;
305 }
306
--
0-DAY CI Kernel Test Service
https://01.org/lkp