Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2783972pxa; Tue, 25 Aug 2020 03:14:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEXQXDpv6d/s2O3zqc/4czHIp4voNiNkv0tjyHH0LKNQOF/wTYRMHhYV/MilwZeJZNFBsm X-Received: by 2002:a17:906:2542:: with SMTP id j2mr9438427ejb.442.1598350449217; Tue, 25 Aug 2020 03:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598350449; cv=none; d=google.com; s=arc-20160816; b=zSCEp67uENzC5tPdAJonhtlUKWi7Fqc8Oz1/sXpXWnqk3FQDFiF87m+M6PCxI0iaXG QEU2jWHWmP1aQJpcKJfT8P50Yu7tJol96YL+Uy6DTLu9RrI2ZLO4FIQzePEkDaL9Gsbd d4Zybybk6RW49ltrrcNLiinpRypPnFJgcg5DK3SLB624fLdkoPOfjBZd3aQqUwATMjom xBHlWBAqW7z48C1tR9EcJM4FeHb8Q42cYcyGsRMelfUlqDnuCf2fCYg+AtoExWKIEU6+ J2DHiDKTe2Pw8cWMB5N1JQzhvwJpFiHtNn9IMoNYljphnzVmcTUDN/vSDGgW2PBPVKrp tzPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:date:to:cc:from :subject:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=xX92bPOZbt3/grqwTKQZiCyjmq/ugCoByLBgnfdVMK8=; b=hj1QiT1GbVIgiROvYwMBjDWYwVhMnYFl8NXqtk12Tps4To1mNqUCN7vUKoR9duVkFu Z+pfmzd8iQp3Digezfai11ZD47pUcrm4G1yEoPMoZTXRR1PATSTUIVwNaSz9OqCMDvbt 1Q7Trqcu1wx4bXSm6gVhm+6655lW8kPFntFLFgavOOXMvG+ubscAu9f7VfBU+/SLLVW6 BpIccv7c/By5KSq3NQrduljotVMR2vcysaC2E/Yi0YCjjMhOnTtJ8Nuc80YDMVjKbo/c NR6/cKKn+ehEJJIHR6fxfeuHFipX4CpY6BNIs0hgmeOC7fMMjE+HzML13XFIQRLhLz4P 64Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lPmqMD62; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id lv10si9108675ejb.215.2020.08.25.03.13.46; Tue, 25 Aug 2020 03:14:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lPmqMD62; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1729704AbgHYKM4 (ORCPT + 99 others); Tue, 25 Aug 2020 06:12:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728117AbgHYKMx (ORCPT ); Tue, 25 Aug 2020 06:12:53 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEA82C061755 for ; Tue, 25 Aug 2020 03:12:52 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id i13so1005828pjv.0 for ; Tue, 25 Aug 2020 03:12:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:in-reply-to:references :subject:from:cc:to:date:message-id:user-agent; bh=xX92bPOZbt3/grqwTKQZiCyjmq/ugCoByLBgnfdVMK8=; b=lPmqMD62bB1Et2NxkmsOc1EqYJlMVHNWvAEVBzcQm65gRI7GM5R46BGVsZI38rmiUV mQbj8fl/c7J5NjdD1LouPoCgMvGoYMWR0LHBE1y3yF2D6oeP/jIqGXgBHSekwFbvA6DH tmIoMtqz5McC5FiU2nAFmb08gCOrNsr0oKNqw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :in-reply-to:references:subject:from:cc:to:date:message-id :user-agent; bh=xX92bPOZbt3/grqwTKQZiCyjmq/ugCoByLBgnfdVMK8=; b=SwqQLqf1mkRuOr0+PIdDuXsZR5g5EOLhR6+f9sGCnKNYBZmpLjJzsjxRg5NIbl3w9X T6KeGUiWAdQ0/q3IdpyRsJbdUCgpXJdcfy6U6ub5N6eIUBdUwEW9orSF6JZf3sDlS2DE ThcTKSZ9sMZ0Z/zdnZyJDC8mW0FvptDK0J3sKP52CY/HNexlQNNecoVk7cDRrWw8QbcG kxF5pnvX1kuMwaWotKdcn7DcLaDBax8KvROKIcG80EKHBf/jzGhOLLyM7hqZY/cA1J+T NBdkHlTh0Bt+KdTnIv40E5rQI4J5bEMZTvmV8lVNgFKYDXt+AQmfesxaDOYCUdPRu7wL x8Gg== X-Gm-Message-State: AOAM530DnLKEk0CxFyC7F67bKKjXLaXCWdO7Rj+rWj1aDLjrAiBq+0xI SJdbfsAVTBxqlfIyJ4I2i8Zv/kneQq3iHw== X-Received: by 2002:a17:90a:b904:: with SMTP id p4mr736867pjr.130.1598350372001; Tue, 25 Aug 2020 03:12:52 -0700 (PDT) Received: from chromium.org ([2620:15c:202:1:3e52:82ff:fe6c:83ab]) by smtp.gmail.com with ESMTPSA id r16sm2511206pfq.173.2020.08.25.03.12.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Aug 2020 03:12:51 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <1598113021-4149-4-git-send-email-mkshah@codeaurora.org> References: <1598113021-4149-1-git-send-email-mkshah@codeaurora.org> <1598113021-4149-4-git-send-email-mkshah@codeaurora.org> Subject: Re: [PATCH v5 3/6] genirq/PM: Introduce IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag From: Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, agross@kernel.org, tglx@linutronix.de, jason@lakedaemon.net, dianders@chromium.org, rnayak@codeaurora.org, ilina@codeaurora.org, lsrao@codeaurora.org, Maulik Shah To: Maulik Shah , bjorn.andersson@linaro.org, evgreen@chromium.org, linus.walleij@linaro.org, maz@kernel.org, mka@chromium.org Date: Tue, 25 Aug 2020 03:12:49 -0700 Message-ID: <159835036999.334488.14725849347753031927@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Maulik Shah (2020-08-22 09:16:58) > diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c > index c6c7e18..2cc800b 100644 > --- a/kernel/irq/pm.c > +++ b/kernel/irq/pm.c > @@ -69,12 +69,17 @@ void irq_pm_remove_action(struct irq_desc *desc, stru= ct irqaction *action) > =20 > static bool suspend_device_irq(struct irq_desc *desc) > { > + unsigned long chipflags =3D irq_desc_get_chip(desc)->flags; > + > if (!desc->action || irq_desc_is_chained(desc) || > desc->no_suspend_depth) > return false; > =20 > if (irqd_is_wakeup_set(&desc->irq_data)) { > irqd_set(&desc->irq_data, IRQD_WAKEUP_ARMED); > + > + if (chipflags & IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND) > + irq_enable(desc); Where is the corresponding change to resume_irq()? Don't we need to disable an irq if it was disabled on suspend and forcibly enabled here? > /* > * We return true here to force the caller to issue > * synchronize_irq(). We need to make sure that the > @@ -93,7 +98,7 @@ static bool suspend_device_irq(struct irq_desc *desc) > * chip level. The chip implementation indicates that with > * IRQCHIP_MASK_ON_SUSPEND. > */ > - if (irq_desc_get_chip(desc)->flags & IRQCHIP_MASK_ON_SUSPEND) > + if (chipflags & IRQCHIP_MASK_ON_SUSPEND) > mask_irq(desc); > return true; > }