From patchwork Tue Mar 22 22:45:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Zijlstra X-Patchwork-Id: 8645961 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9B49BC0553 for ; Tue, 22 Mar 2016 22:47:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B5B21202AE for ; Tue, 22 Mar 2016 22:47:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CCA5820279 for ; Tue, 22 Mar 2016 22:47:39 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aiV3w-0006Y2-2f; Tue, 22 Mar 2016 22:46:08 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aiV3t-0006Nl-NV for linux-arm-kernel@bombadil.infradead.org; Tue, 22 Mar 2016 22:46:05 +0000 Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=twins) by casper.infradead.org with esmtpsa (Exim 4.85 #2 (Red Hat Linux)) id 1aiV3o-0007wO-9c; Tue, 22 Mar 2016 22:46:00 +0000 Received: by twins (Postfix, from userid 1000) id 286711257A0D9; Tue, 22 Mar 2016 23:45:57 +0100 (CET) Date: Tue, 22 Mar 2016 23:45:57 +0100 From: Peter Zijlstra To: "Rafael J. Wysocki" Subject: Re: [PATCH v3 4/4] nmi_backtrace: generate one-line reports for idle cpus Message-ID: <20160322224557.GG6356@twins.programming.kicks-ass.net> References: <1458667179-19630-1-git-send-email-cmetcalf@mellanox.com> <1458667179-19630-5-git-send-email-cmetcalf@mellanox.com> <54039485.X1biSGXPBa@vostro.rjw.lan> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <54039485.X1biSGXPBa@vostro.rjw.lan> User-Agent: Mutt/1.5.21 (2012-12-30) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Morton , linux-arch@vger.kernel.org, Daniel Thompson , Russell King , Chris Metcalf , x86@kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , Aaron Tomlin , Thomas Gleixner , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Mar 22, 2016 at 11:31:11PM +0100, Rafael J. Wysocki wrote: > > diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c > > index cd4510a63375..924554f920fb 100644 > > --- a/drivers/idle/intel_idle.c > > +++ b/drivers/idle/intel_idle.c > > @@ -725,8 +725,8 @@ static struct cpuidle_state avn_cstates[] = { > > * > > * Must be called under local_irq_disable(). > > */ > > -static int intel_idle(struct cpuidle_device *dev, > > - struct cpuidle_driver *drv, int index) > > +static __cpuidle int intel_idle(struct cpuidle_device *dev, > > + struct cpuidle_driver *drv, int index) > > { > > unsigned long ecx = 1; /* break on interrupt flag */ > > struct cpuidle_state *state = &drv->states[index]; > > Well, what about intel_idle_freeze()? Or do we not care? I argued against it; when you're suspended the NMI watchdog is stopped too. Then again, you've more experience debugging that thing, so if you think its useful its not much effort adding it. > And analogous stuff in processor_idle.c for that matter? > > acpi_idle_enter()/acpi_idle_enter_freeze() plus stuff called by those? Ah, I only tagged acpi_processor_ffh_cstate_enter() because I went from mwait_idle_with_hints(), I suppose acpi_safe_halt() and acpi_idle_do_entry() itself for the INB method should cover it? (This being one of the reasons I asked Chris to Cc you; you know this stuff far better than I do) --- drivers/acpi/processor_idle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 175c86bee3a9..d5b11fff9e88 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -111,7 +111,7 @@ static const struct dmi_system_id processor_power_dmi_table[] = { * Callers should disable interrupts before the call and enable * interrupts after return. */ -static void acpi_safe_halt(void) +__cpuidle static void acpi_safe_halt(void) { if (!tif_need_resched()) { safe_halt(); @@ -680,7 +680,7 @@ static int acpi_idle_bm_check(void) * * Caller disables interrupt before call and enables interrupt after return. */ -static void acpi_idle_do_entry(struct acpi_processor_cx *cx) +__cpuidle static void acpi_idle_do_entry(struct acpi_processor_cx *cx) { if (cx->entry_method == ACPI_CSTATE_FFH) { /* Call into architectural FFH based C-state */