From: Thomas Gleixner <tglx@linutronix.de>
To: Chuansheng Liu <chuansheng.liu@intel.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] genirq: Do not consider the irqs with disabling and IRQF_NO_SUSPEND
Date: Mon, 11 Mar 2013 22:24:06 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.2.02.1303112217180.22263@ionos> (raw)
In-Reply-To: <1363024631.31506.64.camel@cliu38-desktop-build>
On Tue, 12 Mar 2013, Chuansheng Liu wrote:
> According to commit 9c6079aa1bf(genirq: Do not consider disabled
> wakeup irqs), we should not break the suspend when one irq is pending
> but has been disabled before suspending.
>
> But there is another case missed, that one irq with flag IRQF_NO_SUSPEND,
> which has been disabled before suspending, and irq pending there,
> in this case, we still should not break the suspending, otherwise,
> the suspend abort over and over.
>
> Here also checking if the desc->istate & IRQS_SUSPENDED is true.
So what you are saying is:
If an interrupt which is marked IRQF_NO_SUSPEND has been disabled
before suspend invocation then desc->depth is 1 and therefor it should
not be checked for IRQS_PENDING in check_wakeup_irqs().
Makes sense, though the changelog needs to be more clear and the code
wants to have a proper comment.
Thanks,
tglx
> Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
> ---
> kernel/irq/pm.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
> index cb228bf..1470c1b 100644
> --- a/kernel/irq/pm.c
> +++ b/kernel/irq/pm.c
> @@ -109,7 +109,8 @@ int check_wakeup_irqs(void)
> * can abort suspend.
> */
> if (irqd_is_wakeup_set(&desc->irq_data)) {
> - if (desc->depth == 1 && desc->istate & IRQS_PENDING)
> + if (desc->depth == 1 && (desc->istate & IRQS_PENDING)
> + && (desc->istate & IRQS_SUSPENDED))
> return -EBUSY;
> continue;
> }
> --
> 1.7.0.4
>
>
>
>
next prev parent reply other threads:[~2013-03-11 21:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 17:53 [PATCH 0/3] " Chuansheng Liu
2013-03-11 17:55 ` [PATCH 1/3] x86, io_apic: Adding the flag IRQCHIP_SKIP_SET_WAKE Chuansheng Liu
2013-03-11 17:57 ` [PATCH 2/3] genirq: Do not consider the irqs with disabling and IRQF_NO_SUSPEND Chuansheng Liu
2013-03-11 21:24 ` Thomas Gleixner [this message]
2013-03-12 0:21 ` Liu, Chuansheng
2013-03-12 9:58 ` [PATCH 2/3] genirq: Do not consider the irqs with IRQF_NO_SUSPEND in check_wakeup_irqs() Chuansheng Liu
2013-03-14 0:26 ` Liu, Chuansheng
2013-03-11 17:59 ` [PATCH 3/3] genirq: Give warning in case calling irq_set_irq_wake with _NO_SUSPEND flag Chuansheng Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.02.1303112217180.22263@ionos \
--to=tglx@linutronix.de \
--cc=chuansheng.liu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®