Hi Serge,
I love your patch! Yet something to improve:
[auto build test ERROR on tip/timers/core]
[also build test ERROR on abelloni/rtc-next tip/irq/core linus/master v5.7-rc6
next-20200519]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see
https://stackoverflow.com/a/37406982]
url:
https://github.com/0day-ci/linux/commits/Serge-Semin/clocksource-Fix-MIPS...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
4479730e9263befbb9ce9563a09563db2acb8f7c
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/asm-generic/percpu.h:7:0,
from arch/x86/include/asm/percpu.h:556,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/clocksource.h:13,
from include/linux/clockchips.h:14,
from include/linux/dw_apb_timer.h:13,
from arch/x86/kernel/apb_timer.c:27:
arch/x86/kernel/apb_timer.c: In function 'apbt_clockevent_register':
> include/linux/percpu-defs.h:444:1: warning: passing argument 1 of
'dw_apb_clockevent_init' makes pointer from integer without a cast
[-Wint-conversion]
({ ^
> arch/x86/include/asm/smp.h:168:30: note: in expansion of macro
'__this_cpu_read'
#define __smp_processor_id() __this_cpu_read(cpu_number)
^~~~~~~~~~~~~~~
> include/linux/smp.h:218:29: note: in expansion of macro
'__smp_processor_id'
# define smp_processor_id() __smp_processor_id()
^~~~~~~~~~~~~~~~~~
> arch/x86/kernel/apb_timer.c:147:39: note: in expansion of macro
'smp_processor_id'
adev->timer =
dw_apb_clockevent_init(smp_processor_id(), "apbt0",
^~~~~~~~~~~~~~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: expected 'const char *' but argument is
of type 'int'
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
> arch/x86/kernel/apb_timer.c:147:59: warning: passing argument 2
of 'dw_apb_clockevent_init' makes integer from pointer without a cast
[-Wint-conversion]
adev->timer = dw_apb_clockevent_init(smp_processor_id(),
"apbt0",
^~~~~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: expected 'unsigned int' but argument is
of type 'char *'
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
> arch/x86/kernel/apb_timer.c:148:3: warning: passing argument 3 of
'dw_apb_clockevent_init' makes pointer from integer without a cast
[-Wint-conversion]
intel_mid_timer_options == INTEL_MID_TIMER_LAPIC_APBT ?
^~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: expected 'void *' but argument is of type
'int'
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/apb_timer.c:150:3: warning: passing argument 4 of
'dw_apb_clockevent_init' makes integer from pointer without a cast
[-Wint-conversion]
adev_virt_addr(adev), 0, apbt_freq);
^~~~~~~~~~~~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: expected 'int' but argument is of type
'void *'
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
> arch/x86/kernel/apb_timer.c:147:16: error: too many arguments to
function 'dw_apb_clockevent_init'
adev->timer =
dw_apb_clockevent_init(smp_processor_id(), "apbt0",
^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: declared here
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/apb_timer.c: In function 'apbt_setup_secondary_clock':
arch/x86/kernel/apb_timer.c:187:40: warning: passing argument 1 of
'dw_apb_clockevent_init' makes pointer from integer without a cast
[-Wint-conversion]
adev->timer = dw_apb_clockevent_init(cpu, adev->name,
^~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: expected 'const char *' but argument is
of type 'int'
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/apb_timer.c:187:45: warning: passing argument 2 of
'dw_apb_clockevent_init' makes integer from pointer without a cast
[-Wint-conversion]
adev->timer = dw_apb_clockevent_init(cpu, adev->name,
^~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: expected 'unsigned int' but argument is
of type 'char *'
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/apb_timer.c:42:33: warning: passing argument 3 of
'dw_apb_clockevent_init' makes pointer from integer without a cast
[-Wint-conversion]
#define APBT_CLOCKEVENT_RATING 110
^
> arch/x86/kernel/apb_timer.c:188:4: note: in expansion of macro
'APBT_CLOCKEVENT_RATING'
APBT_CLOCKEVENT_RATING, adev_virt_addr(adev),
^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: expected 'void *' but argument is of type
'int'
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/apb_timer.c:188:28: warning: passing argument 4 of
'dw_apb_clockevent_init' makes integer from pointer without a cast
[-Wint-conversion]
APBT_CLOCKEVENT_RATING, adev_virt_addr(adev),
^~~~~~~~~~~~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: expected 'int' but argument is of type
'void *'
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/apb_timer.c:187:17: error: too many arguments to function
'dw_apb_clockevent_init'
adev->timer = dw_apb_clockevent_init(cpu, adev->name,
^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: declared here
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
vim +/dw_apb_clockevent_init +147 arch/x86/kernel/apb_timer.c
bb24c4716185f6 Jacob Pan 2009-09-02 133
bb24c4716185f6 Jacob Pan 2009-09-02 134 static int __init
apbt_clockevent_register(void)
bb24c4716185f6 Jacob Pan 2009-09-02 135 {
bb24c4716185f6 Jacob Pan 2009-09-02 136 struct sfi_timer_table_entry
*mtmr;
89cbc76768c2fa Christoph Lameter 2014-08-17 137 struct apbt_dev *adev =
this_cpu_ptr(&cpu_apbt_dev);
bb24c4716185f6 Jacob Pan 2009-09-02 138
bb24c4716185f6 Jacob Pan 2009-09-02 139 mtmr =
sfi_get_mtmr(APBT_CLOCKEVENT0_NUM);
bb24c4716185f6 Jacob Pan 2009-09-02 140 if (mtmr == NULL) {
bb24c4716185f6 Jacob Pan 2009-09-02 141 printk(KERN_ERR "Failed
to get MTMR %d from SFI\n",
bb24c4716185f6 Jacob Pan 2009-09-02 142
APBT_CLOCKEVENT0_NUM);
bb24c4716185f6 Jacob Pan 2009-09-02 143 return -ENODEV;
bb24c4716185f6 Jacob Pan 2009-09-02 144 }
bb24c4716185f6 Jacob Pan 2009-09-02 145
3010673ef5f7be Jacob Pan 2010-03-02 146 adev->num =
smp_processor_id();
06c3df49521c1b Jamie Iles 2011-06-06 @147 adev->timer =
dw_apb_clockevent_init(smp_processor_id(), "apbt0",
712b6aa8731a7e Kuppuswamy Sathyanarayanan 2013-10-17 @148 intel_mid_timer_options ==
INTEL_MID_TIMER_LAPIC_APBT ?
06c3df49521c1b Jamie Iles 2011-06-06 149 APBT_CLOCKEVENT_RATING - 100
: APBT_CLOCKEVENT_RATING,
06c3df49521c1b Jamie Iles 2011-06-06 150 adev_virt_addr(adev), 0,
apbt_freq);
06c3df49521c1b Jamie Iles 2011-06-06 151 /* Firmware does EOI handling
for us. */
06c3df49521c1b Jamie Iles 2011-06-06 152 adev->timer->eoi =
NULL;
bb24c4716185f6 Jacob Pan 2009-09-02 153
712b6aa8731a7e Kuppuswamy Sathyanarayanan 2013-10-17 154 if (intel_mid_timer_options ==
INTEL_MID_TIMER_LAPIC_APBT) {
06c3df49521c1b Jamie Iles 2011-06-06 155 global_clock_event =
&adev->timer->ced;
bb24c4716185f6 Jacob Pan 2009-09-02 156 printk(KERN_DEBUG "%s
clockevent registered as global\n",
bb24c4716185f6 Jacob Pan 2009-09-02 157
global_clock_event->name);
bb24c4716185f6 Jacob Pan 2009-09-02 158 }
bb24c4716185f6 Jacob Pan 2009-09-02 159
06c3df49521c1b Jamie Iles 2011-06-06 160
dw_apb_clockevent_register(adev->timer);
bb24c4716185f6 Jacob Pan 2009-09-02 161
bb24c4716185f6 Jacob Pan 2009-09-02 162 sfi_free_mtmr(mtmr);
bb24c4716185f6 Jacob Pan 2009-09-02 163 return 0;
bb24c4716185f6 Jacob Pan 2009-09-02 164 }
bb24c4716185f6 Jacob Pan 2009-09-02 165
bb24c4716185f6 Jacob Pan 2009-09-02 166 #ifdef CONFIG_SMP
a5ef2e70405c8a Thomas Gleixner 2010-09-28 167
a5ef2e70405c8a Thomas Gleixner 2010-09-28 168 static void
apbt_setup_irq(struct apbt_dev *adev)
a5ef2e70405c8a Thomas Gleixner 2010-09-28 169 {
a5ef2e70405c8a Thomas Gleixner 2010-09-28 170
irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT);
e4d2ebcab11b30 Feng Tang 2010-12-03 171 irq_set_affinity(adev->irq,
cpumask_of(adev->cpu));
a5ef2e70405c8a Thomas Gleixner 2010-09-28 172 }
a5ef2e70405c8a Thomas Gleixner 2010-09-28 173
bb24c4716185f6 Jacob Pan 2009-09-02 174 /* Should be called with per
cpu */
bb24c4716185f6 Jacob Pan 2009-09-02 175 void
apbt_setup_secondary_clock(void)
bb24c4716185f6 Jacob Pan 2009-09-02 176 {
bb24c4716185f6 Jacob Pan 2009-09-02 177 struct apbt_dev *adev;
bb24c4716185f6 Jacob Pan 2009-09-02 178 int cpu;
bb24c4716185f6 Jacob Pan 2009-09-02 179
bb24c4716185f6 Jacob Pan 2009-09-02 180 /* Don't register boot CPU
clockevent */
bb24c4716185f6 Jacob Pan 2009-09-02 181 cpu = smp_processor_id();
f6e9456c9272bb Robert Richter 2010-07-21 182 if (!cpu)
bb24c4716185f6 Jacob Pan 2009-09-02 183 return;
bb24c4716185f6 Jacob Pan 2009-09-02 184
89cbc76768c2fa Christoph Lameter 2014-08-17 185 adev =
this_cpu_ptr(&cpu_apbt_dev);
06c3df49521c1b Jamie Iles 2011-06-06 186 if (!adev->timer) {
06c3df49521c1b Jamie Iles 2011-06-06 187 adev->timer =
dw_apb_clockevent_init(cpu, adev->name,
06c3df49521c1b Jamie Iles 2011-06-06 @188 APBT_CLOCKEVENT_RATING,
adev_virt_addr(adev),
06c3df49521c1b Jamie Iles 2011-06-06 189 adev->irq, apbt_freq);
06c3df49521c1b Jamie Iles 2011-06-06 190 adev->timer->eoi =
NULL;
06c3df49521c1b Jamie Iles 2011-06-06 191 } else {
06c3df49521c1b Jamie Iles 2011-06-06 192
dw_apb_clockevent_resume(adev->timer);
06c3df49521c1b Jamie Iles 2011-06-06 193 }
bb24c4716185f6 Jacob Pan 2009-09-02 194
06c3df49521c1b Jamie Iles 2011-06-06 195 printk(KERN_INFO
"Registering CPU %d clockevent device %s, cpu %08x\n",
06c3df49521c1b Jamie Iles 2011-06-06 196 cpu, adev->name,
adev->cpu);
bb24c4716185f6 Jacob Pan 2009-09-02 197
bb24c4716185f6 Jacob Pan 2009-09-02 198 apbt_setup_irq(adev);
06c3df49521c1b Jamie Iles 2011-06-06 199
dw_apb_clockevent_register(adev->timer);
bb24c4716185f6 Jacob Pan 2009-09-02 200
bb24c4716185f6 Jacob Pan 2009-09-02 201 return;
bb24c4716185f6 Jacob Pan 2009-09-02 202 }
bb24c4716185f6 Jacob Pan 2009-09-02 203
:::::: The code at line 147 was first introduced by commit
:::::: 06c3df49521c1b112b777cc4946e5de057c814ba clocksource: apb: Share APB timer code
with other platforms
:::::: TO: Jamie Iles <jamie(a)jamieiles.com>
:::::: CC: John Stultz <john.stultz(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org