All of lore.kernel.org
 help / color / mirror / Atom feed
* [jfern:coresched 2/13] kernel/sched/core.c:5147:15: error: use of undeclared identifier '_TIF_UNSAFE_RET'
@ 2021-01-15 19:28 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-01-15 19:28 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git coresched
head:   96c7e148eeff83b159e8e4c6d5aa9bed6ea47580
commit: f9ce34d192fc4b26bcb6402f41e534f1776d3832 [2/13] kernel/entry: Add support for core-wide protection of kernel-mode
config: s390-randconfig-r012-20210115 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5b42fd8dd4e7e29125a09a41a33af7c9cb57d144)
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 s390 cross compiling tool for clang build
        # apt-get install binutils-s390x-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git/commit/?id=f9ce34d192fc4b26bcb6402f41e534f1776d3832
        git remote add jfern https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git
        git fetch --no-tags jfern coresched
        git checkout f9ce34d192fc4b26bcb6402f41e534f1776d3832
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390 

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 >>):

                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
           ___constant_swab32(x) :                 \
                              ^
   include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
           (((__u32)(x) & (__u32)0x00ff0000UL) >>  8) |            \
                     ^
   In file included from kernel/sched/core.c:13:
   In file included from kernel/sched/sched.h:17:
   In file included from include/linux/sched/isolation.h:6:
   In file included from include/linux/tick.h:8:
   In file included from include/linux/clockchips.h:14:
   In file included from include/linux/clocksource.h:21:
   In file included from arch/s390/include/asm/io.h:80:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
           ___constant_swab32(x) :                 \
                              ^
   include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
           (((__u32)(x) & (__u32)0xff000000UL) >> 24)))
                     ^
   In file included from kernel/sched/core.c:13:
   In file included from kernel/sched/sched.h:17:
   In file included from include/linux/sched/isolation.h:6:
   In file included from include/linux/tick.h:8:
   In file included from include/linux/clockchips.h:14:
   In file included from include/linux/clocksource.h:21:
   In file included from arch/s390/include/asm/io.h:80:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
           __fswab32(x))
                     ^
   In file included from kernel/sched/core.c:13:
   In file included from kernel/sched/sched.h:17:
   In file included from include/linux/sched/isolation.h:6:
   In file included from include/linux/tick.h:8:
   In file included from include/linux/clockchips.h:14:
   In file included from include/linux/clocksource.h:21:
   In file included from arch/s390/include/asm/io.h:80:
   include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsb(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsw(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsl(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesb(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesw(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesl(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   kernel/sched/core.c:283:6: warning: no previous prototype for function 'sched_core_get' [-Wmissing-prototypes]
   void sched_core_get(void)
        ^
   kernel/sched/core.c:283:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void sched_core_get(void)
   ^
   static 
   kernel/sched/core.c:291:6: warning: no previous prototype for function 'sched_core_put' [-Wmissing-prototypes]
   void sched_core_put(void)
        ^
   kernel/sched/core.c:291:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void sched_core_put(void)
   ^
   static 
   kernel/sched/core.c:3032:6: warning: no previous prototype for function 'sched_set_stop_task' [-Wmissing-prototypes]
   void sched_set_stop_task(int cpu, struct task_struct *stop)
        ^
   kernel/sched/core.c:3032:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void sched_set_stop_task(int cpu, struct task_struct *stop)
   ^
   static 
>> kernel/sched/core.c:5147:15: error: use of undeclared identifier '_TIF_UNSAFE_RET'
           ti_check &= ~_TIF_UNSAFE_RET;
                        ^
   23 warnings and 1 error generated.


vim +/_TIF_UNSAFE_RET +5147 kernel/sched/core.c

  5128	
  5129	/*
  5130	 * sched_core_wait_till_safe - Pause the caller's hyperthread until the core
  5131	 * exits the core-wide unsafe state. Obviously the CPU calling this function
  5132	 * should not be responsible for the core being in the core-wide unsafe state
  5133	 * otherwise it will deadlock.
  5134	 *
  5135	 * @ti_check: We spin here with IRQ enabled and preempt disabled. Break out of
  5136	 *            the loop if TIF flags are set and notify caller about it.
  5137	 *
  5138	 * IRQs should be disabled.
  5139	 */
  5140	bool sched_core_wait_till_safe(unsigned long ti_check)
  5141	{
  5142		bool restart = false;
  5143		struct rq *rq;
  5144		int cpu;
  5145	
  5146		/* We clear the thread flag only at the end, so no need to check for it. */
> 5147		ti_check &= ~_TIF_UNSAFE_RET;
  5148	
  5149		cpu = smp_processor_id();
  5150		rq = cpu_rq(cpu);
  5151	
  5152		if (!sched_core_enabled(rq))
  5153			goto ret;
  5154	
  5155		/* Down grade to allow interrupts to prevent stop_machine lockups.. */
  5156		preempt_disable();
  5157		local_irq_enable();
  5158	
  5159		/*
  5160		 * Wait till the core of this HT is not in an unsafe state.
  5161		 *
  5162		 * Pair with raw_spin_lock/unlock() in sched_core_unsafe_enter/exit().
  5163		 */
  5164		while (smp_load_acquire(&rq->core->core_unsafe_nest) > 0) {
  5165			cpu_relax();
  5166			if (READ_ONCE(current_thread_info()->flags) & ti_check) {
  5167				restart = true;
  5168				break;
  5169			}
  5170		}
  5171	
  5172		/* Upgrade it back to the expectations of entry code. */
  5173		local_irq_disable();
  5174		preempt_enable();
  5175	
  5176	ret:
  5177		if (!restart)
  5178			clear_tsk_thread_flag(current, TIF_UNSAFE_RET);
  5179	
  5180		return restart;
  5181	}
  5182	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-15 19:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 19:28 [jfern:coresched 2/13] kernel/sched/core.c:5147:15: error: use of undeclared identifier '_TIF_UNSAFE_RET' 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.