public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Glanzmann <thomas@glanzmann.de>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	Pavel Machek <pavel@kernel.org>,
	linux-pm@vger.kernel.org
Cc: Sven Peter <sven@kernel.org>, asahi@lists.linux.dev
Subject: Proper way to disable hibernate for a platform
Date: Sun, 11 Jan 2026 10:58:12 +0100	[thread overview]
Message-ID: <aWN0NOls6XIj5oXh@glanzmann.de> (raw)

Hallo,
arm based macs do not support hibernation at the moment, sometimes they
crash, sometimes they try to stop the cpu, can't and abort the attempt.
What is the porper way to tell hibernation code that suspend is not
available on that platform?

Looking at the code in kernel/power/hibernate.c it appears that
hibernation_available is the right place to do it:

bool hibernation_available(void)
{
        return nohibernate == 0 &&
                !security_locked_down(LOCKDOWN_HIBERNATION) &&
                !secretmem_active() && !cxl_mem_active();
}

Or is there a better way? How would a platform agnostic interface best look
like, something allong the lines:

dmi_check_system(hibernate_blacklist)

Or ist there a better way?

Cheers,
	Thomas

                 reply	other threads:[~2026-01-11 10:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=aWN0NOls6XIj5oXh@glanzmann.de \
    --to=thomas@glanzmann.de \
    --cc=asahi@lists.linux.dev \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=rafael@kernel.org \
    --cc=sven@kernel.org \
    /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