From patchwork Wed May 8 21:05:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Bottomley X-Patchwork-Id: 2541701 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 E37E0DF2E5 for ; Wed, 8 May 2013 21:05:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756972Ab3EHVFj (ORCPT ); Wed, 8 May 2013 17:05:39 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:48160 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755820Ab3EHVFi (ORCPT ); Wed, 8 May 2013 17:05:38 -0400 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 7A7A08EE0C9; Wed, 8 May 2013 14:05:38 -0700 (PDT) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wmYZ2yzxC8uf; Wed, 8 May 2013 14:05:38 -0700 (PDT) Received: from [10.0.0.6] (c-24-18-112-117.hsd1.wa.comcast.net [24.18.112.117]) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id 027598EE0AB; Wed, 8 May 2013 14:05:37 -0700 (PDT) Message-ID: <1368047134.8623.5.camel@dabdike> Subject: Re: [PATCH] parisc: avoid WARNING: at kernel/cpu/idle.c:96 From: James Bottomley To: Helge Deller Cc: linux-parisc@vger.kernel.org, John David Anglin , linux-kernel , Thomas Gleixner Date: Wed, 08 May 2013 14:05:34 -0700 In-Reply-To: <20130508204242.GA16254@p100.box> References: <20130508204242.GA16254@p100.box> X-Mailer: Evolution 3.8.1 Mime-Version: 1.0 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org On Wed, 2013-05-08 at 22:42 +0200, Helge Deller wrote: > We need to enable local irqs to avoid this runtime warning. > > Signed-off-by: Helge Deller > > diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c > index 55f92b6..2840d43 100644 > --- a/arch/parisc/kernel/process.c > +++ b/arch/parisc/kernel/process.c > @@ -286,3 +286,8 @@ void *dereference_function_descriptor(void *ptr) > return ptr; > } > #endif > + > +void arch_cpu_idle(void) > +{ > + local_irq_enable(); This is definitely wrong. we'd need at least a cpu_relax() in there. Without that the cpu will bounce around in the idle loop. I'd advise that we simply keep the default cpu_idle_poll(). However, this looks like a kernel bug to me in cpu_idle_loop()? not something we should be working around in the arch code. Thomas, what's going on here? It looks like you can never avoid the WARN_ON_ONCE if you don't provide any arch specific idle functions. If you wish to allow this case then the correct patch (keeping the WARN_ON) would appear to be this one. James ---- Reviewed-by: Srivatsa S. Bhat --- 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/kernel/cpu/idle.c b/kernel/cpu/idle.c index 8b86c0c..829e41f 100644 --- a/kernel/cpu/idle.c +++ b/kernel/cpu/idle.c @@ -56,6 +56,7 @@ void __weak arch_cpu_idle_dead(void) { } void __weak arch_cpu_idle(void) { cpu_idle_force_poll = 1; + local_irq_enable(); } /*