From patchwork Wed Aug 22 16:23:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 1362401 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 41EF53FC71 for ; Wed, 22 Aug 2012 16:25:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933100Ab2HVQZU (ORCPT ); Wed, 22 Aug 2012 12:25:20 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:36983 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933085Ab2HVQYU (ORCPT ); Wed, 22 Aug 2012 12:24:20 -0400 Received: by mail-ey0-f174.google.com with SMTP id c11so395482eaa.19 for ; Wed, 22 Aug 2012 09:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=tzUOUA0YX/n/9Y2/Y+/E9wDpTqdHx2C0A0kGxmQQ4Hw=; b=Oy62jvK/zFc5e4HbXRfXf3w5JwSklWjInsTXqgkJ7VjYWQVD9ZI9RTC83sK8JtwJxN e5CsT0WzFmjqrv61NuEROLh69oDvaY+ighrcyRuMPOA/3tFEdcrnjzkqniUjZniHaWvN 5aTsE3hHCOenPtbifRvXCnskRBKjD98NKPfi5tVn8XZsHzyOQPcoBPhZGlBgUPEsHMYN Eu2t2CRbFMT98Ali73hCsFrBGsSSJ2irno0ic8YXx7O/AaTtziiAP+nAFTFzYiiVnZWM YRqbOx3+SzMfaVZETkOv25dNLT7fkVoE87vlb/aRbzDUADOJ5r7NBLn/XIe6kF3D48dU FURg== Received: by 10.14.5.67 with SMTP id 43mr18911679eek.15.1345652660171; Wed, 22 Aug 2012 09:24:20 -0700 (PDT) Received: from localhost.localdomain (53.20.196.77.rev.sfr.net. [77.196.20.53]) by mx.google.com with ESMTPS id h2sm14254041eeo.3.2012.08.22.09.24.18 (version=SSLv3 cipher=OTHER); Wed, 22 Aug 2012 09:24:19 -0700 (PDT) From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , "James E.J. Bottomley" , Helge Deller , Parisc , "3.2.x.." , "Paul E. McKenney" Subject: [PATCH 08/10] parisc: Add missing RCU idle APIs on idle loop Date: Wed, 22 Aug 2012 18:23:46 +0200 Message-Id: <1345652628-15060-9-git-send-email-fweisbec@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1345652628-15060-1-git-send-email-fweisbec@gmail.com> References: <1345652628-15060-1-git-send-email-fweisbec@gmail.com> Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org 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.2.x.. Cc: Paul E. McKenney Acked-by: John David Anglin --- arch/parisc/kernel/process.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index d4b94b3..c54a4db 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(); }