]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/sclp: Remove quiesce power management support
authorPeter Oberparleiter <oberpar@linux.ibm.com>
Fri, 11 Jun 2021 09:13:40 +0000 (11:13 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Fri, 18 Jun 2021 14:41:20 +0000 (16:41 +0200)
Power management support was removed for s390 with
commit f5b114f6d22e ("s390: remove broken hibernate / power management
support").

Remove leftover sclp quiesce-related power management code.

Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/s390/char/sclp_quiesce.c

index 76956c2131cd898d26f14ea7afc69a01b7bcc4d3..ade7214678042629a37ce880a85e1d955c80a436 100644 (file)
 
 #include "sclp.h"
 
-static void (*old_machine_restart)(char *);
-static void (*old_machine_halt)(void);
-static void (*old_machine_power_off)(void);
-
 /* Shutdown handler. Signal completion of shutdown by loading special PSW. */
 static void do_machine_quiesce(void)
 {
@@ -37,42 +33,15 @@ static void do_machine_quiesce(void)
 /* Handler for quiesce event. Start shutdown procedure. */
 static void sclp_quiesce_handler(struct evbuf_header *evbuf)
 {
-       if (_machine_restart != (void *) do_machine_quiesce) {
-               old_machine_restart = _machine_restart;
-               old_machine_halt = _machine_halt;
-               old_machine_power_off = _machine_power_off;
-               _machine_restart = (void *) do_machine_quiesce;
-               _machine_halt = do_machine_quiesce;
-               _machine_power_off = do_machine_quiesce;
-       }
+       _machine_restart = (void *) do_machine_quiesce;
+       _machine_halt = do_machine_quiesce;
+       _machine_power_off = do_machine_quiesce;
        ctrl_alt_del();
 }
 
-/* Undo machine restart/halt/power_off modification on resume */
-static void sclp_quiesce_pm_event(struct sclp_register *reg,
-                                 enum sclp_pm_event sclp_pm_event)
-{
-       switch (sclp_pm_event) {
-       case SCLP_PM_EVENT_RESTORE:
-               if (old_machine_restart) {
-                       _machine_restart = old_machine_restart;
-                       _machine_halt = old_machine_halt;
-                       _machine_power_off = old_machine_power_off;
-                       old_machine_restart = NULL;
-                       old_machine_halt = NULL;
-                       old_machine_power_off = NULL;
-               }
-               break;
-       case SCLP_PM_EVENT_FREEZE:
-       case SCLP_PM_EVENT_THAW:
-               break;
-       }
-}
-
 static struct sclp_register sclp_quiesce_event = {
        .receive_mask = EVTYP_SIGQUIESCE_MASK,
        .receiver_fn = sclp_quiesce_handler,
-       .pm_event_fn = sclp_quiesce_pm_event
 };
 
 /* Initialize quiesce driver. */