mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PM <linux-pm@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PCMCIA / PM: Combine system resume callbacks
Date: Tue, 20 Feb 2018 22:38:39 +0100	[thread overview]
Message-ID: <20180220213839.GA12082@light.dominikbrodowski.net> (raw)
In-Reply-To: <4287858.bFmM5lK9H6@aspire.rjw.lan>

On Tue, Feb 20, 2018 at 12:47:27PM +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> There is a problem with PCMCIA system resume callbacks with respect
> to suspend-to-idle in which the ->suspend_noirq() callback may be
> invoked after the ->resume_noirq() one without resuming the system
> entirely in some cases.  This doesn't work for PCMCIA because of
> the lack of symmetry between its system suspend and system resume
> "noirq" callbacks.
> 
> The system resume handling in PCMCIA is split between
> socket_early_resume() and socket_late_resume() which are called in
> different phases of system resume and both need to run for
> socket_suspend() (invoked by the system suspend "noirq" callback)
> to work.  Specifically, socket_suspend() returns an error when
> called after socket_early_resume() without socket_late_resume(),
> so if the suspend-to-idle core detects a spurious wakeup event and
> attempts to put the system back to sleep, that is aborted by the
> error coming from socket_suspend().
> 
> This design doesn't follow the power management documentation
> stating that the "noirq" resume callback is expected to reverse
> the changes made by the "noirq" suspend one.  Moreover, I don't see
> a reason for splitting the PCMCIA socket system resume handling this
> way

Unless I am mistaken, this split was introduced by commit
9905d1b411946 . So we should take into account the reasons stated
in that commit message.

Thanks,
	Dominik

  reply	other threads:[~2018-02-20 21:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20 11:47 Rafael J. Wysocki
2018-02-20 21:38 ` Dominik Brodowski [this message]
2018-02-21  9:09   ` Rafael J. Wysocki
2018-02-21 12:24   ` [PATCH] PCMCIA / PM: Avoid noirq suspend aborts during suspend-to-idle Rafael J. Wysocki
2018-02-22 16:45     ` Dominik Brodowski
2018-02-22 17:32       ` Rafael J. Wysocki
2018-02-22 21:49         ` Rafael J. Wysocki

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=20180220213839.GA12082@light.dominikbrodowski.net \
    --to=linux@dominikbrodowski.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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®