Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/sclp: Remove console power management support

Power management support was removed for s390 with
commit 394216275c7d ("s390: remove broken hibernate / power management
support").

Remove leftover sclp console-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>

authored by

Peter Oberparleiter and committed by
Vasily Gorbik
5602bf8a 21adcf11

+3 -63
+3 -50
drivers/s390/char/sclp_con.c
··· 35 35 static struct sclp_buffer *sclp_conbuf; 36 36 /* Timer for delayed output of console messages */ 37 37 static struct timer_list sclp_con_timer; 38 - /* Suspend mode flag */ 39 - static int sclp_con_suspended; 40 38 /* Flag that output queue is currently running */ 41 39 static int sclp_con_queue_running; 42 40 ··· 61 63 if (!list_empty(&sclp_con_outqueue)) 62 64 buffer = list_first_entry(&sclp_con_outqueue, 63 65 struct sclp_buffer, list); 64 - if (!buffer || sclp_con_suspended) { 66 + if (!buffer) { 65 67 sclp_con_queue_running = 0; 66 68 spin_unlock_irqrestore(&sclp_con_lock, flags); 67 69 break; ··· 83 85 if (sclp_conbuf) 84 86 list_add_tail(&sclp_conbuf->list, &sclp_con_outqueue); 85 87 sclp_conbuf = NULL; 86 - if (sclp_con_queue_running || sclp_con_suspended) 88 + if (sclp_con_queue_running) 87 89 goto out_unlock; 88 90 if (list_empty(&sclp_con_outqueue)) 89 91 goto out_unlock; ··· 177 179 if (list_empty(&sclp_con_pages)) 178 180 sclp_console_full++; 179 181 while (list_empty(&sclp_con_pages)) { 180 - if (sclp_con_suspended) 181 - goto out; 182 182 if (sclp_console_drop_buffer()) 183 183 break; 184 184 spin_unlock_irqrestore(&sclp_con_lock, flags); ··· 209 213 !timer_pending(&sclp_con_timer)) { 210 214 mod_timer(&sclp_con_timer, jiffies + HZ / 10); 211 215 } 212 - out: 213 216 spin_unlock_irqrestore(&sclp_con_lock, flags); 214 217 } 215 218 ··· 229 234 sclp_console_sync_queue(); 230 235 } 231 236 232 - /* 233 - * Resume console: If there are cached messages, emit them. 234 - */ 235 - static void sclp_console_resume(void) 236 - { 237 - unsigned long flags; 238 - 239 - spin_lock_irqsave(&sclp_con_lock, flags); 240 - sclp_con_suspended = 0; 241 - spin_unlock_irqrestore(&sclp_con_lock, flags); 242 - sclp_conbuf_emit(); 243 - } 244 - 245 - /* 246 - * Suspend console: Set suspend flag and flush console 247 - */ 248 - static void sclp_console_suspend(void) 249 - { 250 - unsigned long flags; 251 - 252 - spin_lock_irqsave(&sclp_con_lock, flags); 253 - sclp_con_suspended = 1; 254 - spin_unlock_irqrestore(&sclp_con_lock, flags); 255 - sclp_console_flush(); 256 - } 257 - 258 237 static int sclp_console_notify(struct notifier_block *self, 259 238 unsigned long event, void *data) 260 239 { ··· 238 269 239 270 static struct notifier_block on_panic_nb = { 240 271 .notifier_call = sclp_console_notify, 241 - .priority = SCLP_PANIC_PRIO_CLIENT, 272 + .priority = 1, 242 273 }; 243 274 244 275 static struct notifier_block on_reboot_nb = { ··· 258 289 .flags = CON_PRINTBUFFER, 259 290 .index = 0 /* ttyS0 */ 260 291 }; 261 - 262 - /* 263 - * This function is called for SCLP suspend and resume events. 264 - */ 265 - void sclp_console_pm_event(enum sclp_pm_event sclp_pm_event) 266 - { 267 - switch (sclp_pm_event) { 268 - case SCLP_PM_EVENT_FREEZE: 269 - sclp_console_suspend(); 270 - break; 271 - case SCLP_PM_EVENT_RESTORE: 272 - case SCLP_PM_EVENT_THAW: 273 - sclp_console_resume(); 274 - break; 275 - } 276 - } 277 292 278 293 /* 279 294 * called by console_init() in drivers/char/tty_io.c at boot-time.
-7
drivers/s390/char/sclp_rw.c
··· 26 26 */ 27 27 #define MAX_SCCB_ROOM (PAGE_SIZE - sizeof(struct sclp_buffer)) 28 28 29 - static void sclp_rw_pm_event(struct sclp_register *reg, 30 - enum sclp_pm_event sclp_pm_event) 31 - { 32 - sclp_console_pm_event(sclp_pm_event); 33 - } 34 - 35 29 /* Event type structure for write message and write priority message */ 36 30 static struct sclp_register sclp_rw_event = { 37 31 .send_mask = EVTYP_MSG_MASK, 38 - .pm_event_fn = sclp_rw_pm_event, 39 32 }; 40 33 41 34 /*
-6
drivers/s390/char/sclp_rw.h
··· 88 88 int sclp_emit_buffer(struct sclp_buffer *,void (*)(struct sclp_buffer *,int)); 89 89 int sclp_chars_in_buffer(struct sclp_buffer *); 90 90 91 - #ifdef CONFIG_SCLP_CONSOLE 92 - void sclp_console_pm_event(enum sclp_pm_event sclp_pm_event); 93 - #else 94 - static inline void sclp_console_pm_event(enum sclp_pm_event sclp_pm_event) { } 95 - #endif 96 - 97 91 #endif /* __SCLP_RW_H__ */