Hi Nicholas,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.12-rc2 next-20170525]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Nicholas-Piggin/watchdog-remove-unused-declaration/20170525-164255
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
        wget 
https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All error/warnings (new ones prefixed by >>):

   kernel/watchdog_hld.c: In function 'watchdog_overflow_callback':
>> kernel/watchdog_hld.c:54:7: error: 'struct perf_event' has no member named 
>> 'hw'
     event->hw.interrupts = 0;
          ^~
   kernel/watchdog_hld.c: In function 'watchdog_nmi_enable':
>> kernel/watchdog_hld.c:123:20: error: 'struct perf_event' has no member named 
>> 'state'
     if (event && event->state > PERF_EVENT_STATE_OFF)
                       ^~
>> kernel/watchdog_hld.c:137:10: error: implicit declaration of function 
>> 'perf_event_create_kernel_counter' [-Werror=implicit-function-declaration]
     event = perf_event_create_kernel_counter(wd_attr, cpu, NULL, 
watchdog_overflow_callback, NULL);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/watchdog_hld.c:137:8: warning: assignment makes pointer from integer 
>> without a cast [-Wint-conversion]
     event = perf_event_create_kernel_counter(wd_attr, cpu, NULL, 
watchdog_overflow_callback, NULL);
           ^
   cc1: some warnings being treated as errors

vim +54 kernel/watchdog_hld.c

73ce0511 Babu Moger      2016-12-14   48  /* Callback function for perf event 
subsystem */
73ce0511 Babu Moger      2016-12-14   49  static void 
watchdog_overflow_callback(struct perf_event *event,
73ce0511 Babu Moger      2016-12-14   50                 struct 
perf_sample_data *data,
73ce0511 Babu Moger      2016-12-14   51                 struct pt_regs *regs)
73ce0511 Babu Moger      2016-12-14   52  {
73ce0511 Babu Moger      2016-12-14   53        /* Ensure the watchdog never 
gets throttled */
73ce0511 Babu Moger      2016-12-14  @54        event->hw.interrupts = 0;
73ce0511 Babu Moger      2016-12-14   55  
b94f5118 Don Zickus      2017-01-24   56        if 
(atomic_read(&watchdog_park_in_progress) != 0)
b94f5118 Don Zickus      2017-01-24   57                return;
b94f5118 Don Zickus      2017-01-24   58  
73ce0511 Babu Moger      2016-12-14   59        if 
(__this_cpu_read(watchdog_nmi_touch) == true) {
73ce0511 Babu Moger      2016-12-14   60                
__this_cpu_write(watchdog_nmi_touch, false);
73ce0511 Babu Moger      2016-12-14   61                return;
73ce0511 Babu Moger      2016-12-14   62        }
73ce0511 Babu Moger      2016-12-14   63  
73ce0511 Babu Moger      2016-12-14   64        /* check for a hardlockup
73ce0511 Babu Moger      2016-12-14   65         * This is done by making sure 
our timer interrupt
73ce0511 Babu Moger      2016-12-14   66         * is incrementing.  The timer 
interrupt should have
73ce0511 Babu Moger      2016-12-14   67         * fired multiple times before 
we overflow'd.  If it hasn't
73ce0511 Babu Moger      2016-12-14   68         * then this is a good 
indication the cpu is stuck
73ce0511 Babu Moger      2016-12-14   69         */
73ce0511 Babu Moger      2016-12-14   70        if (is_hardlockup()) {
73ce0511 Babu Moger      2016-12-14   71                int this_cpu = 
smp_processor_id();
73ce0511 Babu Moger      2016-12-14   72  
73ce0511 Babu Moger      2016-12-14   73                /* only print 
hardlockups once */
73ce0511 Babu Moger      2016-12-14   74                if 
(__this_cpu_read(hard_watchdog_warn) == true)
73ce0511 Babu Moger      2016-12-14   75                        return;
73ce0511 Babu Moger      2016-12-14   76  
73ce0511 Babu Moger      2016-12-14   77                pr_emerg("Watchdog 
detected hard LOCKUP on cpu %d", this_cpu);
73ce0511 Babu Moger      2016-12-14   78                print_modules();
73ce0511 Babu Moger      2016-12-14   79                
print_irqtrace_events(current);
73ce0511 Babu Moger      2016-12-14   80                if (regs)
73ce0511 Babu Moger      2016-12-14   81                        show_regs(regs);
73ce0511 Babu Moger      2016-12-14   82                else
73ce0511 Babu Moger      2016-12-14   83                        dump_stack();
73ce0511 Babu Moger      2016-12-14   84  
73ce0511 Babu Moger      2016-12-14   85                /*
73ce0511 Babu Moger      2016-12-14   86                 * Perform all-CPU dump 
only once to avoid multiple hardlockups
73ce0511 Babu Moger      2016-12-14   87                 * generating 
interleaving traces
73ce0511 Babu Moger      2016-12-14   88                 */
73ce0511 Babu Moger      2016-12-14   89                if 
(sysctl_hardlockup_all_cpu_backtrace &&
73ce0511 Babu Moger      2016-12-14   90                                
!test_and_set_bit(0, &hardlockup_allcpu_dumped))
73ce0511 Babu Moger      2016-12-14   91                        
trigger_allbutself_cpu_backtrace();
73ce0511 Babu Moger      2016-12-14   92  
73ce0511 Babu Moger      2016-12-14   93                if (hardlockup_panic)
73ce0511 Babu Moger      2016-12-14   94                        nmi_panic(regs, 
"Hard LOCKUP");
73ce0511 Babu Moger      2016-12-14   95  
73ce0511 Babu Moger      2016-12-14   96                
__this_cpu_write(hard_watchdog_warn, true);
73ce0511 Babu Moger      2016-12-14   97                return;
73ce0511 Babu Moger      2016-12-14   98        }
73ce0511 Babu Moger      2016-12-14   99  
73ce0511 Babu Moger      2016-12-14  100        
__this_cpu_write(hard_watchdog_warn, false);
73ce0511 Babu Moger      2016-12-14  101        return;
73ce0511 Babu Moger      2016-12-14  102  }
73ce0511 Babu Moger      2016-12-14  103  
73ce0511 Babu Moger      2016-12-14  104  /*
73ce0511 Babu Moger      2016-12-14  105   * People like the simple clean cpu 
node info on boot.
73ce0511 Babu Moger      2016-12-14  106   * Reduce the watchdog noise by only 
printing messages
73ce0511 Babu Moger      2016-12-14  107   * that are different from what cpu0 
displayed.
73ce0511 Babu Moger      2016-12-14  108   */
8dcde9de Prarit Bhargava 2017-02-22  109  static unsigned long firstcpu_err;
8dcde9de Prarit Bhargava 2017-02-22  110  static atomic_t watchdog_cpus;
73ce0511 Babu Moger      2016-12-14  111  
73ce0511 Babu Moger      2016-12-14  112  int watchdog_nmi_enable(unsigned int 
cpu)
73ce0511 Babu Moger      2016-12-14  113  {
73ce0511 Babu Moger      2016-12-14  114        struct perf_event_attr *wd_attr;
73ce0511 Babu Moger      2016-12-14  115        struct perf_event *event = 
per_cpu(watchdog_ev, cpu);
8dcde9de Prarit Bhargava 2017-02-22  116        int firstcpu = 0;
73ce0511 Babu Moger      2016-12-14  117  
73ce0511 Babu Moger      2016-12-14  118        /* nothing to do if the hard 
lockup detector is disabled */
73ce0511 Babu Moger      2016-12-14  119        if (!(watchdog_enabled & 
NMI_WATCHDOG_ENABLED))
73ce0511 Babu Moger      2016-12-14  120                goto out;
73ce0511 Babu Moger      2016-12-14  121  
73ce0511 Babu Moger      2016-12-14  122        /* is it already setup and 
enabled? */
73ce0511 Babu Moger      2016-12-14 @123        if (event && event->state > 
PERF_EVENT_STATE_OFF)
73ce0511 Babu Moger      2016-12-14  124                goto out;
73ce0511 Babu Moger      2016-12-14  125  
73ce0511 Babu Moger      2016-12-14  126        /* it is setup but not enabled 
*/
73ce0511 Babu Moger      2016-12-14  127        if (event != NULL)
73ce0511 Babu Moger      2016-12-14  128                goto out_enable;
73ce0511 Babu Moger      2016-12-14  129  
8dcde9de Prarit Bhargava 2017-02-22  130        if 
(atomic_inc_return(&watchdog_cpus) == 1)
8dcde9de Prarit Bhargava 2017-02-22  131                firstcpu = 1;
8dcde9de Prarit Bhargava 2017-02-22  132  
73ce0511 Babu Moger      2016-12-14  133        wd_attr = &wd_hw_attr;
73ce0511 Babu Moger      2016-12-14  134        wd_attr->sample_period = 
hw_nmi_get_sample_period(watchdog_thresh);
73ce0511 Babu Moger      2016-12-14  135  
73ce0511 Babu Moger      2016-12-14  136        /* Try to register using 
hardware perf events */
73ce0511 Babu Moger      2016-12-14 @137        event = 
perf_event_create_kernel_counter(wd_attr, cpu, NULL, 
watchdog_overflow_callback, NULL);
73ce0511 Babu Moger      2016-12-14  138  
8dcde9de Prarit Bhargava 2017-02-22  139        /* save the first cpu's error 
for future comparision */
8dcde9de Prarit Bhargava 2017-02-22  140        if (firstcpu && IS_ERR(event))

:::::: The code at line 54 was first introduced by commit
:::::: 73ce0511c43686095efd2f65ef564aab952e07bc kernel/watchdog.c: move 
hardlockup detector to separate file

:::::: TO: Babu Moger <[email protected]>
:::::: CC: Linus Torvalds <[email protected]>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to