Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1869431ybv; Thu, 6 Feb 2020 11:16:49 -0800 (PST) X-Google-Smtp-Source: APXvYqxQ0v2B7wGSzPXAPOOcfK/EF7wJDZwbfONS7/qPw1hCUwGQddcJRs0PmRCyiAtXO37Qlme3 X-Received: by 2002:a05:6808:658:: with SMTP id z24mr8191033oih.91.1581016609518; Thu, 06 Feb 2020 11:16:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581016609; cv=none; d=google.com; s=arc-20160816; b=ubxqiyLM7Q4byoU6WxbWEY6EVHbfWMJM40VwElQ2QNrHOeJU10QGhL9hllOtuAqL+r WQ08uzsmJH3dBSMJnNBSpyw6mxQYmB+vpVryfWZmjKmDz6D/0BczacDhip1EpeV13vOM UT8Mw92inqyJH12UW1SqqONZ813j1FGcsmw8SMrU57uPpPfuv1JBuCRJfGZc6ZVIZymz FUErRJK5PrzS16YbuOHn+2CQ65Z+jnFd+zFYpjvXMuH0SZd+GoDIoYl71P6frVDQoRGn WRhVdMS5e7CmZDEtek5Fo9iPj6VeQbO53CmtZoBxjhxVj/X7iJL3NWkgJ9VBk3Y48Vp3 rQcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Kttq95JJMgSrLLGiYe2dDFloBfbkzPtd5qLVcbb/oxM=; b=MDdD4Kw/ugL/K1o+QGgP21SZFjoJU+9C8VwB0ldQ9MmSqU2ZaMD5PbUmcg88xlw0jn KAnnV6tjPGDaT4cBGJed5fRf9SH9sJjLEV8LG0h8HcIqlgRu+zfPTMBeAnk1+/iyUdp2 tddXpvcWMfHvAdmXpc6/WPdOZdZO6F4OPI8pNNoj5QJweZXoxmcTcrSd81OFXgji+9MT o+wVp8Z7R1kXjRlSJVs9GOcyV1N1e0tu27iyqM+5VvYy2jQCgTVfVI/h1YJULYthWbGL +uPST11IixqWsmEdw0dX21jxvHmARfuVbPZ00nBthz7mb30xgmWMaKqt32X1FFL+keMt b70w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=iK0F5TKR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s21si267943otr.304.2020.02.06.11.16.36; Thu, 06 Feb 2020 11:16:49 -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; dkim=pass header.i=@chromium.org header.s=google header.b=iK0F5TKR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727896AbgBFTPZ (ORCPT + 99 others); Thu, 6 Feb 2020 14:15:25 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:38602 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726990AbgBFTPZ (ORCPT ); Thu, 6 Feb 2020 14:15:25 -0500 Received: by mail-pf1-f194.google.com with SMTP id x185so3602694pfc.5 for ; Thu, 06 Feb 2020 11:15:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Kttq95JJMgSrLLGiYe2dDFloBfbkzPtd5qLVcbb/oxM=; b=iK0F5TKRcEFCg/q6knGyypxXgg/T5g020rre7/PPnqK99UpUSw3AOb8htr8ceJNCSy Q+Xxby3XbbPIbDtWsK2bvZrmm8Hj3xU3xQR3umcHPQRWg6+wrQQfdKONFJmnHwn/nHOs 5PLXDCARUEdp9HUiBAZ9wTfpeso6EzrJG6RRU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Kttq95JJMgSrLLGiYe2dDFloBfbkzPtd5qLVcbb/oxM=; b=rKJdkILRw2vkvNBNv/AVH0yWQn9X8td9FhrfFdsh3homu6amPC4Lwlzk7fdGexvECu MseLNV6Xuef7H6gpgEwcyOagYrfVOBa1dqov2rqglIdDrVhMqDu1zYWn3/CR5aKEaQpV uQo3BBTn5pHEaVTzoIFp8qhH18nT5PosT05m6PXlHinzRecdEdFX4UCNJr30POFa5/SD QmRx91TgsF2E5okSCaX1NK9w6EFPsFJ370Ty6B+8qz5fnY8BLtr1wEUFKmKRL94mq4DL pzkDuOzkgJycpsSb8oTj+Xhw0hL0Z6p0hT11jqqyFJq35vERTThtPeYFmVO5Bwc0jePF J5dg== X-Gm-Message-State: APjAAAUwyXObzO0wAFVFC8Yb/0lOGLdnEDxUvBuAGXzjPPejRGJicBBl eqmbyAJPyL1XanE/8a8XVC2UpA== X-Received: by 2002:a63:64c5:: with SMTP id y188mr5248612pgb.10.1581016523239; Thu, 06 Feb 2020 11:15:23 -0800 (PST) Received: from smtp.gmail.com ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id r9sm157331pfl.136.2020.02.06.11.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2020 11:15:22 -0800 (PST) From: Stephen Boyd To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, Marc Zyngier , Douglas Anderson , Lina Iyer , Maulik Shah Subject: [PATCH v2] genirq: Clarify that irq wake state is orthogonal to enable/disable Date: Thu, 6 Feb 2020 11:15:21 -0800 Message-Id: <20200206191521.94559-1-swboyd@chromium.org> X-Mailer: git-send-email 2.25.0.341.g760bfbb309-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- Changes from v1: * Added the last sentence from tglx kernel/irq/manage.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 818b2802d3e7..e1e217d7778c 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -731,6 +731,13 @@ 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. If this does not hold, + * then either the underlying irq chip and the related driver + * need to be investigated. */ int irq_set_irq_wake(unsigned int irq, unsigned int on) { -- Sent by a computer, using git, on the internet