From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6BDFC352A1 for ; Wed, 5 Feb 2020 15:53:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 975F820702 for ; Wed, 5 Feb 2020 15:53:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727441AbgBEPxG (ORCPT ); Wed, 5 Feb 2020 10:53:06 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:35897 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726413AbgBEPxG (ORCPT ); Wed, 5 Feb 2020 10:53:06 -0500 Received: from [212.187.182.165] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1izMz8-0004hJ-2L; Wed, 05 Feb 2020 16:53:02 +0100 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 8BAD0100C31; Wed, 5 Feb 2020 15:52:56 +0000 (GMT) From: Thomas Gleixner To: Lina Iyer Cc: Stephen Boyd , linux-kernel@vger.kernel.org, Marc Zyngier , Douglas Anderson , Maulik Shah Subject: Re: [PATCH] genirq: Clarify that irq wake state is orthogonal to enable/disable In-Reply-To: <20200205153410.GA3898@codeaurora.org> References: <20200205060953.49167-1-swboyd@chromium.org> <87zhdxrzhh.fsf@nanos.tec.linutronix.de> <20200205153410.GA3898@codeaurora.org> Date: Wed, 05 Feb 2020 15:52:56 +0000 Message-ID: <87tv45rpyf.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Lina Iyer writes: > On Wed, Feb 05 2020 at 05:27 -0700, Thomas Gleixner wrote: >>> @@ -731,6 +731,11 @@ static int set_irq_wake_real(unsigned int irq, unsigned int on) >>> * >>> * Wakeup mode lets this IRQ wake the system from sleep >>> * states like "suspend to RAM". >>> + * >>> + * Note: irq enable/disable state is completely orthogonal >>> + * to the enable/disable state of irq wake. An irq can be >>> + * disabled with disable_irq() and still wake the system as >>> + * long as the irq has wake enabled. >> >>It clearly should say that this is really depending on the hardware >>implementation of the particual interrupt chip whether disabled + wake >>mode is supported. >> > Could an irqchip flag be used to warn users that we may not wakeup from > suspend/resume if the interrupt if the hardware does not support wakeup > when disabled ? There are also magic ways of wakeup for irqchips which do not have wake setup functions and still wake the system up when the interrupt line is disabled by the kernel on suspend. :) Thanks, tglx