From patchwork Thu Apr 28 09:52:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 739041 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3S9qinK013901 for ; Thu, 28 Apr 2011 09:53:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758038Ab1D1JwL (ORCPT ); Thu, 28 Apr 2011 05:52:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61035 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756077Ab1D1JwK (ORCPT ); Thu, 28 Apr 2011 05:52:10 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3S9q5hD014214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 28 Apr 2011 05:52:05 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p3S9q408018917; Thu, 28 Apr 2011 05:52:04 -0400 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 13519) id 7FEC318D3EA; Thu, 28 Apr 2011 12:52:03 +0300 (IDT) From: Gleb Natapov To: linux-kernel@vger.kernel.org Cc: paulmck@linux.vnet.ibm.com, avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org Subject: [PATCH 1/2] rcu: export rcu_note_context_switch() function Date: Thu, 28 Apr 2011 12:52:02 +0300 Message-Id: <1303984323-3203-2-git-send-email-gleb@redhat.com> In-Reply-To: <1303984323-3203-1-git-send-email-gleb@redhat.com> References: <1303984323-3203-1-git-send-email-gleb@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 28 Apr 2011 09:53:17 +0000 (UTC) Signed-off-by: Gleb Natapov --- include/linux/rcutiny.h | 6 +----- kernel/rcutiny.c | 7 +++++++ kernel/rcutree.c | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 30ebd7c..8e5f7cf 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h @@ -93,11 +93,7 @@ static inline int rcu_needs_cpu(int cpu) #endif /* #else #ifdef CONFIG_TINY_RCU */ -static inline void rcu_note_context_switch(int cpu) -{ - rcu_sched_qs(cpu); - rcu_preempt_note_context_switch(); -} +extern void rcu_note_context_switch(int cpu); /* * Return the number of grace periods. diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c index 0c343b9..3d715a4 100644 --- a/kernel/rcutiny.c +++ b/kernel/rcutiny.c @@ -78,6 +78,13 @@ void rcu_exit_nohz(void) #endif /* #ifdef CONFIG_NO_HZ */ +void rcu_note_context_switch(int cpu) +{ + rcu_sched_qs(cpu); + rcu_preempt_note_context_switch(); +} +EXPORT_SYMBOL_GPL(rcu_note_context_switch); + /* * Helper function for rcu_qsctr_inc() and rcu_bh_qsctr_inc(). * Also disable irqs to avoid confusion due to interrupt handlers diff --git a/kernel/rcutree.c b/kernel/rcutree.c index dd4aea8..0837d63 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -124,6 +124,7 @@ void rcu_note_context_switch(int cpu) rcu_sched_qs(cpu); rcu_preempt_note_context_switch(cpu); } +EXPORT_SYMBOL_GPL(rcu_note_context_switch); #ifdef CONFIG_NO_HZ DEFINE_PER_CPU(struct rcu_dynticks, rcu_dynticks) = {