Skip to content

Commit

Permalink
s390: remove broken hibernate / power management support
Browse files Browse the repository at this point in the history
Hibernation is known to be broken for many years on s390. Given that
there aren't any real use cases, remove the code instead of spending
time to fix and maintain it.

Without hibernate support it doesn't make too much sense to keep power
management support; therefore remove it completely.

Acked-by: Christian Borntraeger <[email protected]>
Acked-by: Peter Oberparleiter <[email protected]>
Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Vasily Gorbik <[email protected]>
  • Loading branch information
heicarst authored and Vasily Gorbik committed Mar 23, 2020
1 parent 1b648df commit 3942162
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 660 deletions.
10 changes: 0 additions & 10 deletions arch/s390/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ config S390
select ARCH_INLINE_WRITE_UNLOCK_IRQ
select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
select ARCH_KEEP_MEMBLOCK
select ARCH_SAVE_PAGE_KEYS if HIBERNATION
select ARCH_STACKWALK
select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_SUPPORTS_NUMA_BALANCING
Expand Down Expand Up @@ -810,15 +809,6 @@ config SECCOMP

If unsure, say Y.

menu "Power Management"

config ARCH_HIBERNATION_POSSIBLE
def_bool y

source "kernel/power/Kconfig"

endmenu

config CCW
def_bool y

Expand Down
1 change: 0 additions & 1 deletion arch/s390/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ CFLAGS_REMOVE_nospec-branch.o += $(CC_FLAGS_EXPOLINE)

obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_SCHED_TOPOLOGY) += topology.o
obj-$(CONFIG_HIBERNATION) += suspend.o swsusp.o
obj-$(CONFIG_AUDIT) += audit.o
compat-obj-$(CONFIG_AUDIT) += compat_audit.o
obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o
Expand Down
31 changes: 0 additions & 31 deletions arch/s390/kernel/machine_kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <linux/reboot.h>
#include <linux/ftrace.h>
#include <linux/debug_locks.h>
#include <linux/suspend.h>
#include <asm/cio.h>
#include <asm/setup.h>
#include <asm/pgtable.h>
Expand All @@ -38,36 +37,6 @@ extern const unsigned long long relocate_kernel_len;

#ifdef CONFIG_CRASH_DUMP

/*
* PM notifier callback for kdump
*/
static int machine_kdump_pm_cb(struct notifier_block *nb, unsigned long action,
void *ptr)
{
switch (action) {
case PM_SUSPEND_PREPARE:
case PM_HIBERNATION_PREPARE:
if (kexec_crash_image)
arch_kexec_unprotect_crashkres();
break;
case PM_POST_SUSPEND:
case PM_POST_HIBERNATION:
if (kexec_crash_image)
arch_kexec_protect_crashkres();
break;
default:
return NOTIFY_DONE;
}
return NOTIFY_OK;
}

static int __init machine_kdump_pm_init(void)
{
pm_notifier(machine_kdump_pm_cb, 0);
return 0;
}
arch_initcall(machine_kdump_pm_init);

/*
* Reset the system, copy boot CPU registers to absolute zero,
* and jump to the kdump image
Expand Down
240 changes: 0 additions & 240 deletions arch/s390/kernel/suspend.c

This file was deleted.

Loading

0 comments on commit 3942162

Please sign in to comment.