tree:
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
linux-5.4.y-rt
head: 5fbf1e70f11dba64cc05c9d85120a3aa7c67a4a2
commit: 95c50e7fcaa1ebe6e9f8c98b385dcc10653781e9 [213/325] x86: Allow to enable RT
config: x86_64-randconfig-s022-20200808 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-118-ge1578773-dirty
git checkout 95c50e7fcaa1ebe6e9f8c98b385dcc10653781e9
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel//time/hrtimer.c:120:21: warning: initialized field overwritten
[-Woverride-init]
120 | [CLOCK_REALTIME] = HRTIMER_BASE_REALTIME,
| ^~~~~~~~~~~~~~~~~~~~~
kernel//time/hrtimer.c:120:21: note: (near initialization for
'hrtimer_clock_to_base_table[0]')
kernel//time/hrtimer.c:121:22: warning: initialized field overwritten
[-Woverride-init]
121 | [CLOCK_MONOTONIC] = HRTIMER_BASE_MONOTONIC,
| ^~~~~~~~~~~~~~~~~~~~~~
kernel//time/hrtimer.c:121:22: note: (near initialization for
'hrtimer_clock_to_base_table[1]')
kernel//time/hrtimer.c:122:21: warning: initialized field overwritten
[-Woverride-init]
122 | [CLOCK_BOOTTIME] = HRTIMER_BASE_BOOTTIME,
| ^~~~~~~~~~~~~~~~~~~~~
kernel//time/hrtimer.c:122:21: note: (near initialization for
'hrtimer_clock_to_base_table[7]')
kernel//time/hrtimer.c:123:17: warning: initialized field overwritten
[-Woverride-init]
123 | [CLOCK_TAI] = HRTIMER_BASE_TAI,
| ^~~~~~~~~~~~~~~~
kernel//time/hrtimer.c:123:17: note: (near initialization for
'hrtimer_clock_to_base_table[11]')
> kernel//time/hrtimer.c:1986:6: warning: no previous prototype for
'cpu_chill' [-Wmissing-prototypes]
1986 | void cpu_chill(void)
| ^~~~~~~~~
vim +/cpu_chill +1986 kernel//time/hrtimer.c
edbeda46322fbc Al Viro 2017-06-07 1981
32f35d21bf065e Thomas Gleixner 2012-03-07 1982 #ifdef CONFIG_PREEMPT_RT
32f35d21bf065e Thomas Gleixner 2012-03-07 1983 /*
32f35d21bf065e Thomas Gleixner 2012-03-07 1984 * Sleep for 1 ms in hope whoever holds
what we want will let it go.
32f35d21bf065e Thomas Gleixner 2012-03-07 1985 */
32f35d21bf065e Thomas Gleixner 2012-03-07 @1986 void cpu_chill(void)
32f35d21bf065e Thomas Gleixner 2012-03-07 1987 {
32f35d21bf065e Thomas Gleixner 2012-03-07 1988 unsigned int freeze_flag =
current->flags & PF_NOFREEZE;
32f35d21bf065e Thomas Gleixner 2012-03-07 1989 struct task_struct *self = current;
32f35d21bf065e Thomas Gleixner 2012-03-07 1990 ktime_t chill_time;
32f35d21bf065e Thomas Gleixner 2012-03-07 1991
32f35d21bf065e Thomas Gleixner 2012-03-07 1992
raw_spin_lock_irq(&self->pi_lock);
32f35d21bf065e Thomas Gleixner 2012-03-07 1993 self->saved_state = self->state;
32f35d21bf065e Thomas Gleixner 2012-03-07 1994
__set_current_state_no_track(TASK_UNINTERRUPTIBLE);
32f35d21bf065e Thomas Gleixner 2012-03-07 1995
raw_spin_unlock_irq(&self->pi_lock);
32f35d21bf065e Thomas Gleixner 2012-03-07 1996
32f35d21bf065e Thomas Gleixner 2012-03-07 1997 chill_time = ktime_set(0,
NSEC_PER_MSEC);
32f35d21bf065e Thomas Gleixner 2012-03-07 1998
32f35d21bf065e Thomas Gleixner 2012-03-07 1999 current->flags |= PF_NOFREEZE;
32f35d21bf065e Thomas Gleixner 2012-03-07 2000 sleeping_lock_inc();
32f35d21bf065e Thomas Gleixner 2012-03-07 2001 schedule_hrtimeout(&chill_time,
HRTIMER_MODE_REL_HARD);
32f35d21bf065e Thomas Gleixner 2012-03-07 2002 sleeping_lock_dec();
32f35d21bf065e Thomas Gleixner 2012-03-07 2003 if (!freeze_flag)
32f35d21bf065e Thomas Gleixner 2012-03-07 2004 current->flags &= ~PF_NOFREEZE;
32f35d21bf065e Thomas Gleixner 2012-03-07 2005
32f35d21bf065e Thomas Gleixner 2012-03-07 2006
raw_spin_lock_irq(&self->pi_lock);
32f35d21bf065e Thomas Gleixner 2012-03-07 2007
__set_current_state_no_track(self->saved_state);
32f35d21bf065e Thomas Gleixner 2012-03-07 2008 self->saved_state = TASK_RUNNING;
32f35d21bf065e Thomas Gleixner 2012-03-07 2009
raw_spin_unlock_irq(&self->pi_lock);
32f35d21bf065e Thomas Gleixner 2012-03-07 2010 }
32f35d21bf065e Thomas Gleixner 2012-03-07 2011 EXPORT_SYMBOL(cpu_chill);
32f35d21bf065e Thomas Gleixner 2012-03-07 2012 #endif
32f35d21bf065e Thomas Gleixner 2012-03-07 2013
:::::: The code at line 1986 was first introduced by commit
:::::: 32f35d21bf065ee4d525b44e5ba47a674cd12fc3 rt: Introduce cpu_chill()
:::::: TO: Thomas Gleixner <tglx(a)linutronix.de>
:::::: CC: Sebastian Andrzej Siewior <bigeasy(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org