Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp222195ybv; Wed, 5 Feb 2020 04:29:51 -0800 (PST) X-Google-Smtp-Source: APXvYqx2ojEleKFMS4n4wfF5VJtu5LRvN0DJ/J6jiSCKeIz0lQVQZogzBpYpCXGzANkoIgobUi64 X-Received: by 2002:a05:6830:22ca:: with SMTP id q10mr27979800otc.280.1580905791730; Wed, 05 Feb 2020 04:29:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580905791; cv=none; d=google.com; s=arc-20160816; b=BSWxHlwjfRmvjmMLPgyBee4Zkc1bViXcbEJ01m6NCg+zrTlnOsfFYYLSgx7DGyu325 WOQuDmkWiTHMfKyQKj4j8raPAMK41RwnHrD7TpPWzk8vB7mNSeuClkeDPDM9dL3QaxCd 9mUQcyzlBKITZEhqaJAFm6J/ywhtqTp0Jba7BCAMaSz9fSKNGeQFSj/iWxVg6R/tZmlL Mx12ZVjVd0bZnneTTDtZRPTRnpCdG/XNbVjeoBjB3pBI+a/gl3PcmwnRWGETsfACiHXf 1d+UyfuGXYqSzSzyP6w8D0zRA3pgDhT0+4HApcqejGDLGQpfKIXoIoznCxQbDcWaVC8a rEEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=WnxzvemeCFJGzkC6T6IEkK3hhqLhhDe9GQa/8EwN+Pg=; b=gx9+8EGUwWrGi3svyAI5+HiQC6FleiOjk1l9q+zUwZCIT7nuWc8b32TWsBUHnqe5Ry Pi73yc0w/f6VqfQFqIIw5froLn9RVbqv7niQEm+eWyLDcbmCX6CaNIjSrdgLM6HMVEEk GMyoDqEeQcF2jxN3d9xrtZV46qRaE1cCn1cetThJCW6++Hzh9I8O69JEKVdlc4fHC9Ea 8PJ83J8AmNrO2oq+d2b1GZwAfmWDq5zFeE4pud/Jk93fua3X86QOXQbhTz5ANye892Ss nL4KJ9Zy+gW5I0ObbnO6IWPkYbCyB/JL7NhDRkyBHiX2jhIO72GSNaLX3ETUBl4U5uz+ C/Kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q28si11653435oij.149.2020.02.05.04.29.39; Wed, 05 Feb 2020 04:29:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728200AbgBEM1Q (ORCPT + 99 others); Wed, 5 Feb 2020 07:27:16 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:35413 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728147AbgBEM1P (ORCPT ); Wed, 5 Feb 2020 07:27:15 -0500 Received: from [212.187.182.163] (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 1izJlv-0000rV-UT; Wed, 05 Feb 2020 13:27:12 +0100 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 52BC0100C31; Wed, 5 Feb 2020 12:27:06 +0000 (GMT) From: Thomas Gleixner To: Stephen Boyd Cc: linux-kernel@vger.kernel.org, Marc Zyngier , Douglas Anderson , Lina Iyer , Maulik Shah Subject: Re: [PATCH] genirq: Clarify that irq wake state is orthogonal to enable/disable In-Reply-To: <20200205060953.49167-1-swboyd@chromium.org> References: <20200205060953.49167-1-swboyd@chromium.org> Date: Wed, 05 Feb 2020 12:27:06 +0000 Message-ID: <87zhdxrzhh.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 Stephen Boyd writes: > There's some confusion around if an irq that's disabled with > disable_irq() can still wake the system from sleep states such as > "suspend to RAM". Let's clarify this in the kernel documentation for > irq_set_irq_wake() so that it's clear that an irq can be disabled and > still wake the system if it has been marked for wakeup. > > Cc: Marc Zyngier > Cc: Douglas Anderson > Cc: Lina Iyer > Cc: Maulik Shah > Signed-off-by: Stephen Boyd > --- > kernel/irq/manage.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c > index 818b2802d3e7..fa8db98c8699 100644 > --- a/kernel/irq/manage.c > +++ b/kernel/irq/manage.c > @@ -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. Thanks, tglx