From: Michal Hocko <mhocko@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kbuild test robot <fengguang.wu@intel.com>,
Johannes Weiner <hannes@cmpxchg.org>,
kbuild-all@01.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [mmotm:master 69/312] kernel/watchdog.c:518:2: error: implicit declaration of function '__smp_call_function_single'
Date: Thu, 1 Aug 2013 10:02:40 +0200 [thread overview]
Message-ID: <20130801080240.GA1534@dhcp22.suse.cz> (raw)
In-Reply-To: <51f9aee9.oN9jdesofL65t+iX%fengguang.wu@intel.com>
On Thu 01-08-13 08:42:17, Wu Fengguang wrote:
> tree: git://git.cmpxchg.org/linux-mmotm.git master
> head: 01db8fe7b3c8461274e4c9257789514987e7abc8
> commit: 5701031ddea61c051fb8309cbf372dd94e540f22 [69/312] watchdog: update watchdog_tresh properly
> config: i386-randconfig-c00-0801 (attached as .config)
>
> All error/warnings:
>
> kernel/watchdog.c: In function 'update_timers':
> >> kernel/watchdog.c:518:2: error: implicit declaration of function '__smp_call_function_single' [-Werror=implicit-function-declaration]
> __smp_call_function_single(cpu, &data, 1);
> ^
> cc1: some warnings being treated as errors
>
> vim +/__smp_call_function_single +518 kernel/watchdog.c
>
> 512 * be much nicer but we do not have an API for that now so
> 513 * let's use a big hammer.
> 514 * Hrtimer will adopt the new period on the next tick but this
> 515 * might be late already so we have to restart the timer as well.
> 516 */
> 517 watchdog_nmi_disable(cpu);
> > 518 __smp_call_function_single(cpu, &data, 1);
> 519 watchdog_nmi_enable(cpu);
> 520 }
> 521
Ohh, !CONFIG_SMP
The patch below should fix up the mess. Sorry about that. I have added
this UP config to my testing configs.
Andrew, could you pick up the following patch, please?
---
>From 94048cdb5f8370987a08ea07289854a4eb41d57b Mon Sep 17 00:00:00 2001
From: Michal Hocko <mhocko@suse.cz>
Date: Thu, 1 Aug 2013 09:50:28 +0200
Subject: [PATCH] include/linux/smp.h: define __smp_call_function_single for
!CONFIG_SMP
This function was not needed until (watchdog: update watchdog_tresh
properly) which cannot use on_each_cpu unfortunately as
watchdog_nmi_enable relies on perf_event_alloc which is might sleep.
Export it as an alias to on_each_cpu for !CONFIG_SMP.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Michal Hocko <mhocko@suse.cz>
---
include/linux/smp.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/smp.h b/include/linux/smp.h
index c848876..3d12d72 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -151,6 +151,12 @@ static inline int on_each_cpu(smp_call_func_t func, void *info, int wait)
return 0;
}
+static inline void __smp_call_function_single(int cpuid,
+ struct call_single_data *data, int wait)
+{
+ on_each_cpu(data->func, data->info, wait);
+}
+
/*
* Note we still need to test the mask even for UP
* because we actually can get an empty mask from
--
1.8.3.2
--
Michal Hocko
SUSE Labs
parent reply other threads:[~2013-08-01 8:02 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <51f9aee9.oN9jdesofL65t+iX%fengguang.wu@intel.com>]
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=20130801080240.GA1534@dhcp22.suse.cz \
--to=mhocko@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=fengguang.wu@intel.com \
--cc=hannes@cmpxchg.org \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®