From patchwork Thu Sep 27 05:22:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 1511301 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 898E83FDAE for ; Thu, 27 Sep 2012 05:22:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754671Ab2I0FWz (ORCPT ); Thu, 27 Sep 2012 01:22:55 -0400 Received: from terminus.zytor.com ([198.137.202.10]:53786 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753572Ab2I0FWy (ORCPT ); Thu, 27 Sep 2012 01:22:54 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.14.5/8.14.5) with ESMTP id q8R5MVhi004743 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 26 Sep 2012 22:22:36 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.14.5/8.14.5/Submit) id q8R5MVCu004740; Wed, 26 Sep 2012 22:22:31 -0700 Date: Wed, 26 Sep 2012 22:22:31 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Frederic Weisbecker Message-ID: Cc: hpa@zytor.com, mingo@kernel.org, paulmck@linux.vnet.ibm.com, fweisbec@gmail.com, jejb@parisc-linux.org, josh@joshtriplett.org, tglx@linutronix.de, linux-parisc@vger.kernel.org, deller@gmx.de Reply-To: linux-kernel@vger.kernel.org, mingo@kernel.org, hpa@zytor.com, paulmck@linux.vnet.ibm.com, fweisbec@gmail.com, jejb@parisc-linux.org, josh@joshtriplett.org, tglx@linutronix.de, linux-parisc@vger.kernel.org, deller@gmx.de To: linux-tip-commits@vger.kernel.org Subject: [tip:core/rcu] parisc: Add missing RCU idle APIs on idle loop Git-Commit-ID: fbe752188d5589e7fcbb8e79824e560f77dccc92 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-0.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM, FSL_FREEMAIL_1, FSL_FREEMAIL_2 autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on terminus.zytor.com X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (terminus.zytor.com [127.0.0.1]); Wed, 26 Sep 2012 22:22:37 -0700 (PDT) Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Commit-ID: fbe752188d5589e7fcbb8e79824e560f77dccc92 Gitweb: http://git.kernel.org/tip/fbe752188d5589e7fcbb8e79824e560f77dccc92 Author: Frederic Weisbecker AuthorDate: Wed, 22 Aug 2012 17:27:34 +0200 Committer: Paul E. McKenney CommitDate: Sun, 23 Sep 2012 07:44:49 -0700 parisc: Add missing RCU idle APIs on idle loop In the old times, the whole idle task was considered as an RCU quiescent state. But as RCU became more and more successful overtime, some RCU read side critical section have been added even in the code of some architectures idle tasks, for tracing for example. So nowadays, rcu_idle_enter() and rcu_idle_exit() must be called by the architecture to tell RCU about the part in the idle loop that doesn't make use of rcu read side critical sections, typically the part that puts the CPU in low power mode. This is necessary for RCU to find the quiescent states in idle in order to complete grace periods. Add this missing pair of calls in the parisc's idle loop. Reported-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Cc: James E.J. Bottomley Cc: Helge Deller Cc: Parisc Cc: # 3.3+ Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett --- arch/parisc/kernel/process.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 2c05a92..8c6b6b6 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -48,6 +48,7 @@ #include #include #include +#include #include #include @@ -69,8 +70,10 @@ void cpu_idle(void) /* endless idle loop with no priority at all */ while (1) { + rcu_idle_enter(); while (!need_resched()) barrier(); + rcu_idle_exit(); schedule_preempt_disabled(); check_pgt_cache(); }