From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake Date: Wed, 23 Sep 2015 05:49:10 +0200 (CEST) Message-ID: References: <1442850433-5903-1-git-send-email-sudeep.holla@arm.com> <1442850433-5903-5-git-send-email-sudeep.holla@arm.com> <1442965805.19102.303.camel@freescale.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: Received: from www.linutronix.de ([62.245.132.108]:44030 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752842AbbIWDtv (ORCPT ); Tue, 22 Sep 2015 23:49:51 -0400 In-Reply-To: Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Wang Dongsheng Cc: Scott Wood , Sudeep Holla , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Rafael J. Wysocki" , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Hongtao Jia , Marc Zyngier , "linuxppc-dev@lists.ozlabs.org" On Wed, 23 Sep 2015, Wang Dongsheng wrote: > > On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote: > > > mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND > > > flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak > > > is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag > > > as it doesn't guarantee wakeup for that interrupt. > > > > > Non-freescale return -ENXIO, is there any issue? If non-freescale > platform does not support it, but IPs still use > enable/disable_irq_wake, we should return a error number. You can just set IRQCHIP_SKIP_SET_WAKE for FSL chips and not for the others. > @Scott: > If set this flag we cannot keep a irq as a wakeup source when system going to > SUSPEND or MEM. > > irq_set_wake() means we can set this irq as a wake source. > IRQCHIP_SKIP_SET_WAKE is ignore irq_set_wake() feature. Nonsense. IRQCHIP_SKIP_SET_WAKE merily tells the core not to bail on !chip->irq_set_wake(), but its still marking the interrupt as wakeup source and therefor not masking it on suspend. IRQF_NO_SUSPEND is the wrong tool. End of story. Thanks, tglx