From patchwork Wed Oct 10 22:52:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 1578551 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 236B6DFB34 for ; Thu, 11 Oct 2012 00:40:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932855Ab2JKAkR (ORCPT ); Wed, 10 Oct 2012 20:40:17 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:42153 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932832Ab2JKAOr (ORCPT ); Wed, 10 Oct 2012 20:14:47 -0400 Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 77B9120E68; Wed, 10 Oct 2012 20:14:47 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute2.internal (MEProxy); Wed, 10 Oct 2012 20:14:47 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:cc:subject:date:message-id :in-reply-to:references; s=smtpout; bh=LZ30HaEmMuktydi83r6RKZZOf C8=; b=uOz6CSdHl09ew41EZfLaV4K8emGJkxSdBwLpo/lbA0Ws/AeyWl1t3pQqc 38zlNn/kjCjubG5v8j979poFU9ua8dsN6uCtTTqZqPZ44ZZzEKfwIdKkdPQUu0qm 5n3Gf6Gd1tEy0a19ZaGKWNgc8EseABUPyLdVxJf9NoOop6d5dA= X-Sasl-enc: 56PMs4RACuiqPUpbVoBWqMj6jw04l9+ZWvoReTXXUcgY 1349914486 Received: from localhost (unknown [222.106.197.10]) by mail.messagingengine.com (Postfix) with ESMTPA id 954AA4827E9; Wed, 10 Oct 2012 20:14:46 -0400 (EDT) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , alan@lxorguk.ukuu.org.uk, "Paul E. McKenney" , Frederic Weisbecker , "James E.J. Bottomley" , Helge Deller , Parisc , Josh Triplett Subject: [ 102/133] parisc: Add missing RCU idle APIs on idle loop Date: Thu, 11 Oct 2012 07:52:08 +0900 Message-Id: <20121010224912.874143177@linuxfoundation.org> X-Mailer: git-send-email 1.8.0.rc0.18.gf84667d In-Reply-To: <20121010224854.313159132@linuxfoundation.org> References: <20121010224854.313159132@linuxfoundation.org> User-Agent: quilt/0.60-2.1.2 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org 3.5-stable review patch. If anyone has any objections, please let me know. ------------------ From: Frederic Weisbecker commit fbe752188d5589e7fcbb8e79824e560f77dccc92 upstream. 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 Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett Signed-off-by: Greg Kroah-Hartman --- arch/parisc/kernel/process.c | 3 +++ 1 file changed, 3 insertions(+) -- 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 --- 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(); }