Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1085235pxf; Thu, 8 Apr 2021 22:42:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+J0U/Q2EP8krbPO4lnLHnvTARp4cBFkDsAfRLqQB81/QSpNC1adPp33ZpaZEUZYVvU0wD X-Received: by 2002:a50:ed17:: with SMTP id j23mr14848973eds.260.1617946955850; Thu, 08 Apr 2021 22:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617946955; cv=none; d=google.com; s=arc-20160816; b=gYLuxtD+DBxrS1bLtk4o8ohePYI3WzrKwYKN0BMXYBe2F77B5GTdCLQ65hjCm5cHYA b9c2Z5zzC8oAZ0w9hT39ysTBRO4tBdOTgqi6/RnRz7jTdd1hHGHUuh/e701asNcWhEpy NjP1GSInPjosTIv9LWsKqAbrD2Md+cboZ2XRerkW/8eStCDWuWIogJH9Cqd8xw3ek24y XAo5VmrGVwYgkYpEq54f0beWMwzW4mjDWHQeoHQ/e4JS41dPM71gQDhEoMBTeWWZIeHs V/m7jMYqy+DztEIHIhYh/AyBDUlKbJatSL+mFScI04pKORzcICxP1Z5eqymUY2d9HXIy bz+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=e9oPPmBiLy5tTYTyGNVbpG+trmVxTdoBQ+VKqchWnrA=; b=vBcIK5y1sRT2mxt5/QhFKJNBSXgX2YG089OGjChZrsUT3VKYhQRu7Xl3uv2hIFByuj tikeugGhQAXjKBU4YJPYrmE7+xMDDVUgjkDSb7rgHtVu/L9FbTc40G+QdKW1L0A51/n7 4ZOmDhz7YkJigDU8djnmEgrRslcnDPGJLib3gv7uPcGoXM/F3yIWlCf0k7chkGRcHs7y pMbNi2yTfysc5W7e3wlZjRu++btfyEEZ/gO0IKIQJMdixewoX9Ly9hYPlHSV3DoMQLyG IW6cnoMs27Jwgf25emFK7thAU9U+5gjw0JEWzp9rUHvOzIRp2YNAFwIuV0O55uwZ10Qq atYA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n10si1266247ejz.72.2021.04.08.22.42.12; Thu, 08 Apr 2021 22:42:35 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231280AbhDIFji (ORCPT + 99 others); Fri, 9 Apr 2021 01:39:38 -0400 Received: from muru.com ([72.249.23.125]:52494 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbhDIFjh (ORCPT ); Fri, 9 Apr 2021 01:39:37 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 1BF1C80E7; Fri, 9 Apr 2021 05:40:32 +0000 (UTC) Date: Fri, 9 Apr 2021 08:39:18 +0300 From: Tony Lindgren To: Chunfeng Yun Cc: "Rafael J. Wysocki" , Rob Herring , Mathias Nyman , Greg Kroah-Hartman , Matthias Brugger , "Rafael J. Wysocki" , Len Brown , Pavel Machek , "open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:" , Linux ARM , "moderated list:ARM/Mediatek SoC..." , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , Linux PM , Tianping Fang , Eddie Hung , Ikjoon Jang , Nicolas Boichat Subject: Re: [PATCH 1/6] PM: runtime: enable wake irq after runtime_suspend hook called Message-ID: References: <1617874514-12282-1-git-send-email-chunfeng.yun@mediatek.com> <1617933211.12105.22.camel@mhfsdcap03> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1617933211.12105.22.camel@mhfsdcap03> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Chunfeng Yun [210409 01:54]: > On Thu, 2021-04-08 at 19:41 +0200, Rafael J. Wysocki wrote: > > On Thu, Apr 8, 2021 at 11:35 AM Chunfeng Yun wrote: > > > > > > When the dedicated wake irq is level trigger, enable it before > > > calling runtime_suspend, will trigger an interrupt. > > > > > > e.g. > > > for a low level trigger type, it's low level at running time (0), > > > and becomes high level when enters suspend (runtime_suspend (1) is > > > called), a wakeup signal at (2) make it become low level, wake irq > > > will be triggered. > > > > > > ------------------ > > > | ^ ^| > > > ---------------- | | -------------- > > > |<---(0)--->|<--(1)--| (3) (2) (4) > > > > > > if we enable the wake irq before calling runtime_suspend during (0), > > > an interrupt will arise, it causes resume immediately; > > > > But that's necessary to avoid missing a wakeup interrupt, isn't it? > That's also what I worry about. Yeah sounds like this patch will lead into missed wakeirqs. Regards, Tony