Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp111905ybz; Thu, 23 Apr 2020 19:39:48 -0700 (PDT) X-Google-Smtp-Source: APiQypKUUDNkfOvtIlPivGYSwcRlSDRFXMu7g2lRo2qwslgw9PhUh80f6yyOss7TOln1HGJkDOi3 X-Received: by 2002:a17:906:2418:: with SMTP id z24mr5127067eja.42.1587695988214; Thu, 23 Apr 2020 19:39:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587695988; cv=none; d=google.com; s=arc-20160816; b=mskx/CzzKkf6brl+40ot5dWgDHI40WpjsVSssKmAiq8OranIlvaYHOTqy2L7SToTKE OJVkPa0eH1G1uMVhWE6b6PidES4ApJyyuEILvZTvDcVhelLMAZdGj9PE61SBHsVKMw47 0d9+GjvQjx+Ge45AoIlRCSJBWHDQab0wJR7ET69vgPbieNX9n9Fdm7ofEW6uijcK6t+n WGcIWe2Jm7pKmpivDoivXakjCVyCe8ZxGuu+ojdHS1JVcot7kEE78ju0gaKjX1NBwqD6 J2QsGMvt4L6ncxicyJmexDu7u+VrFGQmSvi0ne5yo4aOpA/4L+zWmtDck5svZruZwH5M 2QGA== 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=fEKcHPMVpq7w5QdP3SvOJT0wRkjikmlCTW2T7tBcG4c=; b=otULG1Omgwt0fHo+j187ck2UtCP8uy0KBDc5vb58VkLB3S1RGfbZeaNA5AwqVrdkDk L3igUHa/neW30nNfPxhXS3VfYvhpmdUEEJKwO8uRTPKtlTXoGkz2Uy2vWF3VLpfBo6dd eJnih6SVQAB0oV2Jb80WjZShFI2N1JJyxzk6skPR5BeeX9+s93ikB0ew1dggQJ5MwOQm 4C78XBSRa9d/us6DDN4QqkVXBn3E1gJ5NYZaYlZM2xAIp08Cdm4aZvz3bJSfUNdtZBHO KkaezfuBd4knaVIhb9MGmizBsi9HRlpctBBGiPp5oBwbRxIhCwFETSCPANI7iRc+YTbt 76iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RyTjRiKq; 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 u12si2187001edb.262.2020.04.23.19.39.24; Thu, 23 Apr 2020 19:39:48 -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=RyTjRiKq; 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 S1726259AbgDXChl (ORCPT + 99 others); Thu, 23 Apr 2020 22:37:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725913AbgDXChl (ORCPT ); Thu, 23 Apr 2020 22:37:41 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6365AC09B044 for ; Thu, 23 Apr 2020 19:37:41 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id w65so4053091pfc.12 for ; Thu, 23 Apr 2020 19:37:41 -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=fEKcHPMVpq7w5QdP3SvOJT0wRkjikmlCTW2T7tBcG4c=; b=RyTjRiKqz43EwGmHmvWzKxVzC2fgISK1yibeOGx4dXinZb9g7m3m6BsnClMA2sy8xx UVdneOUncjAH9bZtu73dLPDIDy6rJ4qI3EiaNtoN9fZ8+aZNsH4CFhrVQc48q4ru1iuK vbRmdmXDKFWXYMEYw2mX+R9UfIAFC09dIZPH8= 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=fEKcHPMVpq7w5QdP3SvOJT0wRkjikmlCTW2T7tBcG4c=; b=L9w9nBvxO1SMy4F0jc6P7+XAU/itwPz/6sdNwTEWP2qXUFUSiSXQ8D6leL4y7o0hn5 4tLcT7NNFbdKlIBaURlTxgaL44mrwisevz1LOckjKNhlkV7f8lBeJEBOnJWrBp2TfyfD 3K9ao47gR8d2RPVkpIKU9CrTtX218LGkbBPqT+JPnTCLZMdXE5mxJZtO8iVfNH8Auc1q BGmn634Z+tHwR/CL9ubyVzBw2WK87lYtMMEgVFB9vCshYVc/qOCyTlzRFVPfKE/4rPi/ 9JKmf3BoemOBPVEpIwfiFnkKrSDuIUtVGauqGOZJVG/l+K67A6HnlWjpUQ6E2wAaTxN5 w8HQ== X-Gm-Message-State: AGi0PubUrxHCS8qUkWx5G9pY5CDlJitJp94jUW7r2LSwfb8UyQzaxeNh qsGo+cCEvRagbWQLIaHXVUd0fdN9R60= X-Received: by 2002:a62:1789:: with SMTP id 131mr4003804pfx.287.1587695860466; Thu, 23 Apr 2020 19:37:40 -0700 (PDT) Received: from chromium.org ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id l185sm3932639pfl.104.2020.04.23.19.37.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2020 19:37:39 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <7cb97940-18d6-75b1-f4d2-7a80a6fe68c8@codeaurora.org> References: <1585586460-3272-1-git-send-email-mkshah@codeaurora.org> <1585586460-3272-2-git-send-email-mkshah@codeaurora.org> <158682455899.84447.8337952928773625866@swboyd.mtv.corp.google.com> <1f1322be-c93a-f2f2-c2fe-541f26d8682c@codeaurora.org> <158693796555.105027.4658047860202135403@swboyd.mtv.corp.google.com> <158755213744.163502.17257131401798918469@swboyd.mtv.corp.google.com> <7cb97940-18d6-75b1-f4d2-7a80a6fe68c8@codeaurora.org> Subject: Re: [RFC v3] irqchip: qcom: pdc: Introduce irq_set_wake call From: Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, agross@kernel.org, linus.walleij@linaro.org, tglx@linutronix.de, maz@kernel.org, jason@lakedaemon.net, dianders@chromium.org, rnayak@codeaurora.org, ilina@codeaurora.org, lsrao@codeaurora.org To: Maulik Shah , bjorn.andersson@linaro.org, evgreen@chromium.org, mka@chromium.org Date: Thu, 23 Apr 2020 19:37:38 -0700 Message-ID: <158769585826.135303.15159589318457908652@swboyd.mtv.corp.google.com> User-Agent: alot/0.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Maulik Shah (2020-04-22 05:14:21) >=20 > We discussed this in RFC v2, pasting your reply from same. >=20 >> That looks like a bug. It appears that gpiolib is only hooking the irq >> disable path here so that it can keep track of what irqs are not in use >> by gpiolib and allow them to be used for GPIO purposes when the irqs are >> disabled. See commit 461c1a7d4733 ("gpiolib: override >> irq_enable/disable"). That code in gpiolib should probably see if lazy >> mode has been disabled on the irq and do similar things to what genirq >> does and then let genirq mask the gpios if they trigger during the time >> when the irq is disabled. Regardless of this design though, I don't >> understand why this matters. Yeah. I'm saying that the gpiolib code that forces all gpio irqs to be non-lazy is broken. Please send a patch to fix gpiolib so that irqs can be lazy again. I thought it didn't matter before but now that I've learned more it sounds like we have to use lazy irqs here so that irqs stay enabled on the path to suspend while they're disabled but marked for wakeup. Otherwise I don't know how to make this work.