[powerpc:next 231/236] arch/powerpc/kernel/fadump.c:731:28: error: use of undeclared identifier 'INTERRUPT_SYSTEM_RESET'

kernel test robot lkp at intel.com
Tue Apr 20 04:28:08 AEST 2021


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
head:   cbd3d5ba46b68c033986a6087209930f001cbcca
commit: 7153d4bf0b373428d0393c001019da4d0483fddb [231/236] powerpc/traps: Enhance readability for trap types
config: powerpc-randconfig-r016-20210419 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 2b50f5a4343f8fb06acaa5c36355bcf58092c9cd)
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 powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id=7153d4bf0b373428d0393c001019da4d0483fddb
        git remote add powerpc https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
        git fetch --no-tags powerpc next
        git checkout 7153d4bf0b373428d0393c001019da4d0483fddb
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

Note: the powerpc/next HEAD cbd3d5ba46b68c033986a6087209930f001cbcca builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

>> arch/powerpc/kernel/fadump.c:731:28: error: use of undeclared identifier 'INTERRUPT_SYSTEM_RESET'
           if (TRAP(&(fdh->regs)) == INTERRUPT_SYSTEM_RESET) {
                                     ^
   arch/powerpc/kernel/fadump.c:1703:22: error: no previous prototype for function 'arch_reserved_kernel_pages' [-Werror,-Wmissing-prototypes]
   unsigned long __init arch_reserved_kernel_pages(void)
                        ^
   arch/powerpc/kernel/fadump.c:1703:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   unsigned long __init arch_reserved_kernel_pages(void)
   ^
   static 
   2 errors generated.


vim +/INTERRUPT_SYSTEM_RESET +731 arch/powerpc/kernel/fadump.c

   679	
   680	void crash_fadump(struct pt_regs *regs, const char *str)
   681	{
   682		unsigned int msecs;
   683		struct fadump_crash_info_header *fdh = NULL;
   684		int old_cpu, this_cpu;
   685		/* Do not include first CPU */
   686		unsigned int ncpus = num_online_cpus() - 1;
   687	
   688		if (!should_fadump_crash())
   689			return;
   690	
   691		/*
   692		 * old_cpu == -1 means this is the first CPU which has come here,
   693		 * go ahead and trigger fadump.
   694		 *
   695		 * old_cpu != -1 means some other CPU has already on it's way
   696		 * to trigger fadump, just keep looping here.
   697		 */
   698		this_cpu = smp_processor_id();
   699		old_cpu = cmpxchg(&crashing_cpu, -1, this_cpu);
   700	
   701		if (old_cpu != -1) {
   702			atomic_inc(&cpus_in_fadump);
   703	
   704			/*
   705			 * We can't loop here indefinitely. Wait as long as fadump
   706			 * is in force. If we race with fadump un-registration this
   707			 * loop will break and then we go down to normal panic path
   708			 * and reboot. If fadump is in force the first crashing
   709			 * cpu will definitely trigger fadump.
   710			 */
   711			while (fw_dump.dump_registered)
   712				cpu_relax();
   713			return;
   714		}
   715	
   716		fdh = __va(fw_dump.fadumphdr_addr);
   717		fdh->crashing_cpu = crashing_cpu;
   718		crash_save_vmcoreinfo();
   719	
   720		if (regs)
   721			fdh->regs = *regs;
   722		else
   723			ppc_save_regs(&fdh->regs);
   724	
   725		fdh->online_mask = *cpu_online_mask;
   726	
   727		/*
   728		 * If we came in via system reset, wait a while for the secondary
   729		 * CPUs to enter.
   730		 */
 > 731		if (TRAP(&(fdh->regs)) == INTERRUPT_SYSTEM_RESET) {
   732			msecs = CRASH_TIMEOUT;
   733			while ((atomic_read(&cpus_in_fadump) < ncpus) && (--msecs > 0))
   734				mdelay(1);
   735		}
   736	
   737		fw_dump.ops->fadump_trigger(fdh, str);
   738	}
   739	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 38749 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20210420/8c8d4227/attachment-0001.gz>


More information about the Linuxppc-dev mailing list