From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754279AbbFEGw2 (ORCPT ); Fri, 5 Jun 2015 02:52:28 -0400 Received: from mail-wg0-f48.google.com ([74.125.82.48]:34243 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751755AbbFEGwZ (ORCPT ); Fri, 5 Jun 2015 02:52:25 -0400 Date: Fri, 5 Jun 2015 08:52:19 +0200 From: Ingo Molnar To: Andy Lutomirski Cc: Andy Lutomirski , Andy Henroid , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Peter Zijlstra , X86 ML , Matthew Garrett Subject: Re: Getting rid of i7300_idle's idle notifier? Message-ID: <20150605065219.GA19628@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andy Lutomirski wrote: > On Thu, Jun 4, 2015 at 4:32 PM, Andy Lutomirski wrote: > > > AFAICT the sole purpose for the hideous x86_64 idle_notifier mess is to > > support i7300_idle. IMO this junk does not belong in IRQ handling, etc. Can > > we redo this to work in some kind of generic way? > > > > I have no idea why it makes sense to twiddle I/O AT registers in the beginning > > of whatever IRQ wakes up the CPU. > > > > Note that, if absolutely necessary, the ECX bit 0 MWAIT extension can be used > > to reliably execute code before handling interrupts that wake us from idle. > > That is, there could be a real cpuidle driver for that chip that does: > > > > cli; > > poke ioat; > > mwait(ecx = 1); > > poke ioat; > > sti; > > > > Or we could delete the driver entirely. > > It's even easier than that. Just shove the hooks into acpi_idle_do_entry or > similar and remove them from every other exit_idle call site in the kernel. Yes! Interested in doing a patch? Thanks, Ingo