All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-stable-rc:linux-4.4.y 7217/9999] arch/mips/kernel/smp.c:344:12: error: comparison between signed and unsigned integer expressions
Date: Fri, 12 Feb 2021 09:01:05 +0800	[thread overview]
Message-ID: <202102120955.LphiFs9F-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
head:   95a3867e897abd7811196123f81a119a75aba863
commit: e3484129eb0f7c67c85868d1584f1e6335e86efa [7217/9999] MIPS: VDSO: Prevent use of smp_processor_id()
config: mips-bmips_be_defconfig (attached as .config)
compiler: mips-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/stable/linux-stable-rc.git/commit/?id=e3484129eb0f7c67c85868d1584f1e6335e86efa
        git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
        git fetch --no-tags linux-stable-rc linux-4.4.y
        git checkout e3484129eb0f7c67c85868d1584f1e6335e86efa
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.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/smp.c:156:17: error: no previous prototype for 'start_secondary' [-Werror=missing-prototypes]
    asmlinkage void start_secondary(void)
                    ^~~~~~~~~~~~~~~
   arch/mips/kernel/smp.c:278:5: error: no previous prototype for 'setup_profiling_timer' [-Werror=missing-prototypes]
    int setup_profiling_timer(unsigned int multiplier)
        ^~~~~~~~~~~~~~~~~~~~~
   In file included from arch/mips/include/asm/processor.h:14:0,
                    from arch/mips/include/asm/thread_info.h:15,
                    from include/linux/thread_info.h:54,
                    from include/asm-generic/preempt.h:4,
                    from arch/mips/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:59,
                    from include/linux/interrupt.h:8,
                    from arch/mips/kernel/smp.c:24:
   arch/mips/kernel/smp.c: In function 'flush_tlb_mm':
   include/linux/cpumask.h:221:9: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
      (cpu) < nr_cpu_ids;)
            ^
   include/linux/cpumask.h:725:36: note: in expansion of macro 'for_each_cpu'
    #define for_each_online_cpu(cpu)   for_each_cpu((cpu), cpu_online_mask)
                                       ^~~~~~~~~~~~
   arch/mips/kernel/smp.c:343:3: note: in expansion of macro 'for_each_online_cpu'
      for_each_online_cpu(cpu) {
      ^~~~~~~~~~~~~~~~~~~
>> arch/mips/kernel/smp.c:344:12: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
       if (cpu != smp_processor_id() && cpu_context(cpu, mm))
               ^~
   In file included from arch/mips/include/asm/processor.h:14:0,
                    from arch/mips/include/asm/thread_info.h:15,
                    from include/linux/thread_info.h:54,
                    from include/asm-generic/preempt.h:4,
                    from arch/mips/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:59,
                    from include/linux/interrupt.h:8,
                    from arch/mips/kernel/smp.c:24:
   arch/mips/kernel/smp.c: In function 'flush_tlb_range':
   include/linux/cpumask.h:221:9: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
      (cpu) < nr_cpu_ids;)
            ^
   include/linux/cpumask.h:725:36: note: in expansion of macro 'for_each_cpu'
    #define for_each_online_cpu(cpu)   for_each_cpu((cpu), cpu_online_mask)
                                       ^~~~~~~~~~~~
   arch/mips/kernel/smp.c:382:3: note: in expansion of macro 'for_each_online_cpu'
      for_each_online_cpu(cpu) {
      ^~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/smp.c:383:12: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
       if (cpu != smp_processor_id() && cpu_context(cpu, mm))
               ^~
   In file included from arch/mips/include/asm/processor.h:14:0,
                    from arch/mips/include/asm/thread_info.h:15,
                    from include/linux/thread_info.h:54,
                    from include/asm-generic/preempt.h:4,
                    from arch/mips/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:59,
                    from include/linux/interrupt.h:8,
                    from arch/mips/kernel/smp.c:24:
   arch/mips/kernel/smp.c: In function 'flush_tlb_page':
   include/linux/cpumask.h:221:9: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
      (cpu) < nr_cpu_ids;)
            ^
   include/linux/cpumask.h:725:36: note: in expansion of macro 'for_each_cpu'
    #define for_each_online_cpu(cpu)   for_each_cpu((cpu), cpu_online_mask)
                                       ^~~~~~~~~~~~
   arch/mips/kernel/smp.c:428:3: note: in expansion of macro 'for_each_online_cpu'
      for_each_online_cpu(cpu) {
      ^~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/smp.c:429:12: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
       if (cpu != smp_processor_id() && cpu_context(cpu, vma->vm_mm))
               ^~
   cc1: all warnings being treated as errors


vim +344 arch/mips/kernel/smp.c

25969354a385f3 Ralf Baechle   2006-06-22  320  
^1da177e4c3f41 Linus Torvalds 2005-04-16  321  /*
^1da177e4c3f41 Linus Torvalds 2005-04-16  322   * The following tlb flush calls are invoked when old translations are
^1da177e4c3f41 Linus Torvalds 2005-04-16  323   * being torn down, or pte attributes are changing. For single threaded
^1da177e4c3f41 Linus Torvalds 2005-04-16  324   * address spaces, a new context is obtained on the current cpu, and tlb
^1da177e4c3f41 Linus Torvalds 2005-04-16  325   * context on other cpus are invalidated to force a new context allocation
^1da177e4c3f41 Linus Torvalds 2005-04-16  326   * at switch_mm time, should the mm ever be used on other cpus. For
^1da177e4c3f41 Linus Torvalds 2005-04-16  327   * multithreaded address spaces, intercpu interrupts have to be sent.
^1da177e4c3f41 Linus Torvalds 2005-04-16  328   * Another case where intercpu interrupts are required is when the target
^1da177e4c3f41 Linus Torvalds 2005-04-16  329   * mm might be active on another cpu (eg debuggers doing the flushes on
^1da177e4c3f41 Linus Torvalds 2005-04-16  330   * behalf of debugees, kswapd stealing pages from another process etc).
^1da177e4c3f41 Linus Torvalds 2005-04-16  331   * Kanoj 07/00.
^1da177e4c3f41 Linus Torvalds 2005-04-16  332   */
^1da177e4c3f41 Linus Torvalds 2005-04-16  333  
^1da177e4c3f41 Linus Torvalds 2005-04-16  334  void flush_tlb_mm(struct mm_struct *mm)
^1da177e4c3f41 Linus Torvalds 2005-04-16  335  {
^1da177e4c3f41 Linus Torvalds 2005-04-16  336  	preempt_disable();
^1da177e4c3f41 Linus Torvalds 2005-04-16  337  
^1da177e4c3f41 Linus Torvalds 2005-04-16  338  	if ((atomic_read(&mm->mm_users) != 1) || (current->mm != mm)) {
c50cade95b075e Ralf Baechle   2007-10-04  339  		smp_on_other_tlbs(flush_tlb_mm_ipi, mm);
^1da177e4c3f41 Linus Torvalds 2005-04-16  340  	} else {
b5eb5511453953 Ralf Baechle   2007-10-03  341  		unsigned int cpu;
b5eb5511453953 Ralf Baechle   2007-10-03  342  
0b5f9c005def15 Rusty Russell  2012-03-29  343  		for_each_online_cpu(cpu) {
0b5f9c005def15 Rusty Russell  2012-03-29 @344  			if (cpu != smp_processor_id() && cpu_context(cpu, mm))
b5eb5511453953 Ralf Baechle   2007-10-03  345  				cpu_context(cpu, mm) = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16  346  		}
0b5f9c005def15 Rusty Russell  2012-03-29  347  	}
^1da177e4c3f41 Linus Torvalds 2005-04-16  348  	local_flush_tlb_mm(mm);
^1da177e4c3f41 Linus Torvalds 2005-04-16  349  
^1da177e4c3f41 Linus Torvalds 2005-04-16  350  	preempt_enable();
^1da177e4c3f41 Linus Torvalds 2005-04-16  351  }
^1da177e4c3f41 Linus Torvalds 2005-04-16  352  

:::::: The code at line 344 was first introduced by commit
:::::: 0b5f9c005def154f9c21f9be0223b65b50d54368 remove references to cpu_*_map in arch/

:::::: TO: Rusty Russell <rusty@rustcorp.com.au>
:::::: CC: Rusty Russell <rusty@rustcorp.com.au>

---
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: 11480 bytes --]

                 reply	other threads:[~2021-02-12  1:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202102120955.LphiFs9F-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.