From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop Date: Thu, 30 Jan 2014 19:06:59 +0100 Message-ID: <20140130180659.GI5002@laptop.programming.kicks-ass.net> References: <1391017513-12995-1-git-send-email-nicolas.pitre@linaro.org> <1391017513-12995-2-git-send-email-nicolas.pitre@linaro.org> <52E9C946.50704@linux.vnet.ibm.com> <52EA5720.8010000@linaro.org> <52EA8BD4.6020803@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <52EA8BD4.6020803@linaro.org> Sender: linux-sh-owner@vger.kernel.org To: Daniel Lezcano Cc: Nicolas Pitre , Preeti U Murthy , Olof Johansson , Russell King , Benjamin Herrenschmidt , Paul Mundt , Thomas Gleixner , Ingo Molnar , "Rafael J. Wysocki" , linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org List-Id: linux-pm@vger.kernel.org On Thu, Jan 30, 2014 at 06:28:52PM +0100, Daniel Lezcano wrote: > Ok, I think the mess is coming from 'default_idle' which does not re-enable > the local_irq but used from different places like amd_e400_idle and > apm_cpu_idle. > > void default_idle(void) > { > trace_cpu_idle_rcuidle(1, smp_processor_id()); > safe_halt(); > trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); > } > > Considering the system configured without cpuidle because this one *always* > enable the local irq, we have the different cases: > > x86_idle = default_idle(); > ==> local_irq_enable is missing > safe_halt() is "sti; hlt" and so very much does the irq_enable. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Date: Thu, 30 Jan 2014 18:06:59 +0000 Subject: Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop Message-Id: <20140130180659.GI5002@laptop.programming.kicks-ass.net> List-Id: References: <1391017513-12995-1-git-send-email-nicolas.pitre@linaro.org> <1391017513-12995-2-git-send-email-nicolas.pitre@linaro.org> <52E9C946.50704@linux.vnet.ibm.com> <52EA5720.8010000@linaro.org> <52EA8BD4.6020803@linaro.org> In-Reply-To: <52EA8BD4.6020803@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-arm-kernel@lists.infradead.org On Thu, Jan 30, 2014 at 06:28:52PM +0100, Daniel Lezcano wrote: > Ok, I think the mess is coming from 'default_idle' which does not re-enable > the local_irq but used from different places like amd_e400_idle and > apm_cpu_idle. > > void default_idle(void) > { > trace_cpu_idle_rcuidle(1, smp_processor_id()); > safe_halt(); > trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); > } > > Considering the system configured without cpuidle because this one *always* > enable the local irq, we have the different cases: > > x86_idle = default_idle(); > => local_irq_enable is missing > safe_halt() is "sti; hlt" and so very much does the irq_enable. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from merlin.infradead.org (unknown [IPv6:2001:4978:20e::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B3ED2C02FD for ; Fri, 31 Jan 2014 05:07:32 +1100 (EST) Date: Thu, 30 Jan 2014 19:06:59 +0100 From: Peter Zijlstra To: Daniel Lezcano Subject: Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop Message-ID: <20140130180659.GI5002@laptop.programming.kicks-ass.net> References: <1391017513-12995-1-git-send-email-nicolas.pitre@linaro.org> <1391017513-12995-2-git-send-email-nicolas.pitre@linaro.org> <52E9C946.50704@linux.vnet.ibm.com> <52EA5720.8010000@linaro.org> <52EA8BD4.6020803@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <52EA8BD4.6020803@linaro.org> Cc: Nicolas Pitre , linaro-kernel@lists.linaro.org, Russell King , linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Olof Johansson , Paul Mundt , Preeti U Murthy , Thomas Gleixner , linuxppc-dev@lists.ozlabs.org, Ingo Molnar , linux-arm-kernel@lists.infradead.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, Jan 30, 2014 at 06:28:52PM +0100, Daniel Lezcano wrote: > Ok, I think the mess is coming from 'default_idle' which does not re-enable > the local_irq but used from different places like amd_e400_idle and > apm_cpu_idle. > > void default_idle(void) > { > trace_cpu_idle_rcuidle(1, smp_processor_id()); > safe_halt(); > trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); > } > > Considering the system configured without cpuidle because this one *always* > enable the local irq, we have the different cases: > > x86_idle = default_idle(); > ==> local_irq_enable is missing > safe_halt() is "sti; hlt" and so very much does the irq_enable. From mboxrd@z Thu Jan 1 00:00:00 1970 From: peterz@infradead.org (Peter Zijlstra) Date: Thu, 30 Jan 2014 19:06:59 +0100 Subject: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop In-Reply-To: <52EA8BD4.6020803@linaro.org> References: <1391017513-12995-1-git-send-email-nicolas.pitre@linaro.org> <1391017513-12995-2-git-send-email-nicolas.pitre@linaro.org> <52E9C946.50704@linux.vnet.ibm.com> <52EA5720.8010000@linaro.org> <52EA8BD4.6020803@linaro.org> Message-ID: <20140130180659.GI5002@laptop.programming.kicks-ass.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Jan 30, 2014 at 06:28:52PM +0100, Daniel Lezcano wrote: > Ok, I think the mess is coming from 'default_idle' which does not re-enable > the local_irq but used from different places like amd_e400_idle and > apm_cpu_idle. > > void default_idle(void) > { > trace_cpu_idle_rcuidle(1, smp_processor_id()); > safe_halt(); > trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); > } > > Considering the system configured without cpuidle because this one *always* > enable the local irq, we have the different cases: > > x86_idle = default_idle(); > ==> local_irq_enable is missing > safe_halt() is "sti; hlt" and so very much does the irq_enable.