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=-4.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED autolearn=ham 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 60328C43381 for ; Tue, 26 Mar 2019 16:59:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E21020823 for ; Tue, 26 Mar 2019 16:59:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ov3xi1Fs"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Kj77aelH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E21020823 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Date:Message-ID:To:Subject:From: References:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=X5K1eIZikEOvyivkJlBymSodlFKlyj3jW30iS+9qTVI=; b=Ov3xi1FshFLhGR 0iAkWTdzxAwi3qMfBupWfLYkHs0UFz9REDzEb41Vjh8QWQzf2HbxIc2h7G1Byh7R7/F4VRljWX6rS ab6V79845UYHeifWcbeaPDCBwQBledpPaYfVcw+jYEzYBgUweqJxix7COs0OD1DhQLF2eQEzcfuJI KltTQmswoCVrp4LhTxOlw7NZCusnD2kYcGsAsUJwSVmYe9J/WrTtGp6hITcNBrrYARJJXEacWjZPe siDBp+29xUcXmDVB54PC261ZQ2TBRHjYZI0vGSLYZmXoczmtzcDGBzB7YGMNMqXEIAR9ACNbbhCzV BcWqQW7fTtYyBmJxeMKg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8pPf-0000av-VW; Tue, 26 Mar 2019 16:58:59 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8pPc-0000aE-8m for linux-arm-kernel@lists.infradead.org; Tue, 26 Mar 2019 16:58:59 +0000 Received: by mail-pf1-x441.google.com with SMTP id c8so8336107pfd.10 for ; Tue, 26 Mar 2019 09:58:56 -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:from :subject:cc:to:message-id:user-agent:date; bh=/qyfPsW7gKCbvRlxk8/hqHHM+WTgixIZCzfz1ObNHKw=; b=Kj77aelHKEp5JKhJMzxvuv+6XzDAuJmYWOsBSd+cR6RJ4b3x5UctW5f4l45xdMwwTC xFGuueoyCPWEHkBYZZQ3HQFY0MKfmHq282iTio95b/pkj3e38CAxC/h1Gg/4HskOc4IZ nKuB8eTwNIrm8YWXHZxugiCPsZGhyGnWOBK+w= 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:from:subject:cc:to:message-id:user-agent :date; bh=/qyfPsW7gKCbvRlxk8/hqHHM+WTgixIZCzfz1ObNHKw=; b=Ol+OrADd6GQgB42f4MMwqGpbcPBIezTYaaO+L4Xwcb5aCCik2dfEIZg/es7ANYIrZ6 l/rPlcfu5Ye7xbpM9Tiq9NKbu+6f1kkJPiMbM5SjZqEuQfNaRYGK7odcAYq9/alEMUZT j3mrNnTSyRQE5tM72WgvCpS8vcnB1/49rQ+VFaCUBmlK0J1MU+Nq3/S4y3kdBYU8RJRo rXZDJmERolsKRZkvtpG10dtm5dBgDUwSIshdG3yEupjDBWHpPemirxV/XvgmFDRwT8ZP 8yD95r84pKwN9grRakytMMLJQDx0BnVC9+STMOYwaaMMnq123mxPdvffbQu9Xay7cqLt Rkcw== X-Gm-Message-State: APjAAAXNJZtflQo/NweoWaMODOPNSEWLIoBytHRdvOt1RjXmKHbdDfDq RTikovrgzJnS72gzRJ++4siB0g== X-Google-Smtp-Source: APXvYqyNNyhFt4zjP6GLdbdf15qMmwfOqyE6MMz3K18W8HQWGc0J5jZzSQIUjW7lRm+X93PMlQ+gow== X-Received: by 2002:a65:4547:: with SMTP id x7mr28976718pgr.350.1553619535776; Tue, 26 Mar 2019 09:58:55 -0700 (PDT) Received: from localhost ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id c130sm30405631pfb.145.2019.03.26.09.58.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Mar 2019 09:58:55 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20190325181026.247796-1-swboyd@chromium.org> From: Stephen Boyd Subject: Re: [PATCH v2] genirq: Respect IRQCHIP_SKIP_SET_WAKE in irq_chip_set_wake_parent() To: Marc Zyngier , Thomas Gleixner Message-ID: <155361953432.20095.14563397546308928190@swboyd.mtv.corp.google.com> User-Agent: alot/0.8 Date: Tue, 26 Mar 2019 09:58:54 -0700 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190326_095856_338812_FF7C0010 X-CRM114-Status: GOOD ( 20.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Lina Iyer Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Quoting Marc Zyngier (2019-03-26 04:11:56) > Hi Stephen, > > On 25/03/2019 18:10, Stephen Boyd wrote: > > This function returns an error if a child irqchip calls > > irq_chip_set_wake_parent() but its parent irqchip has the > > IRQCHIP_SKIP_SET_WAKE flag set. Let's return 0 for success here instead > > because there isn't anything to do. > > > > This keeps the behavior consistent with how set_irq_wake_real() is > > implemented. That function returns 0 when the irqchip has the > > IRQCHIP_SKIP_SET_WAKE flag set. It doesn't attempt to walk the chain of > > parents and set irq wake on any chips that don't have the flag set > > either. If the intent is to call the .irq_set_wake() callback of the > > parent irqchip, then we expect irqchip implementations to omit the > > IRQCHIP_SKIP_SET_WAKE flag and implement an .irq_set_wake() function > > that calls irq_chip_set_wake_parent(). > > > > This fixes a problem on my Qualcomm sdm845 device where I can't set wake > > on any GPIO interrupts after I apply work in progress wakeup irq patches > > to the GPIO driver. The chain of chips looks like this: > > > > ARM GIC (skip) -> QCOM PDC (skip) -> QCOM GPIO > > nit: the parenting chain is actually built the other way around (we > don't express the 'child' relationship). This doesn't change anything to > the patch, but would make the reasoning a but easier to understand. I take it you want the sentence below to say 'parent' instead of 'child' then? > > > > > The GPIO controller is a child of the QCOM PDC irqchip which is a child > > of the ARM GIC irqchip. The QCOM PDC irqchip has the > > IRQCHIP_SKIP_SET_WAKE flag set, and so does the grandparent ARM GIC. > > > > The GPIO driver doesn't know if the parent needs to set wake or not, so > > it unconditionally calls irq_chip_set_wake_parent() causing this > > function to return a failure because the parent irqchip (PDC) doesn't > > have the .irq_set_wake() callback set. Returning 0 instead makes > > everything work and irqs from the GPIO controller can be configured for > > wakeup. > > > > Cc: Lina Iyer > > Cc: Marc Zyngier > > Signed-off-by: Stephen Boyd > > Fixes: 08b55e2a9208e ("genirq: Add irqchip_set_wake_parent") > Acked-by: Marc Zyngier > I'm happy to resend with the commit text clarified more and the above tags added. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel