From patchwork Wed Oct 10 22:54:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 1578371 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 0391CDFB34 for ; Thu, 11 Oct 2012 00:32:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933393Ab2JKAcK (ORCPT ); Wed, 10 Oct 2012 20:32:10 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:34349 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932836Ab2JKAYv (ORCPT ); Wed, 10 Oct 2012 20:24:51 -0400 Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 4786120E69; Wed, 10 Oct 2012 20:24:51 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute4.internal (MEProxy); Wed, 10 Oct 2012 20:24:51 -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=fSvfnSWItig3p/P2348Nf0nEJ ec=; b=UT3YpXpcl7YzbsBgthadUQ3o5jEvgvIMWPOYqA0EPHRiO+hrtI2PYIaIc 59StPQ6si9WQYjo0ALs6hUm0b1qcBwOce4JiYtjlTvWL6Gy6JWDcjLq6M5rP0XER 8rq/epXLPOgy4iC6hBD0/C6cjKlwAPH74bww9JZMJWPTN/9oAU= X-Sasl-enc: zxi363qvfD1IHYcr60tNiO+arvE9I5J5QHPuOKBkzI1w 1349915090 Received: from localhost (unknown [222.106.197.10]) by mail.messagingengine.com (Postfix) with ESMTPA id 7EF2848255E; Wed, 10 Oct 2012 20:24:50 -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: [ 089/122] parisc: Add missing RCU idle APIs on idle loop Date: Thu, 11 Oct 2012 07:54:15 +0900 Message-Id: <20121010225354.064784157@linuxfoundation.org> X-Mailer: git-send-email 1.8.0.rc0.18.gf84667d In-Reply-To: <20121010225337.989799482@linuxfoundation.org> References: <20121010225337.989799482@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.6-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(); }