Commit 2f554d8b authored by Peter Oberparleiter's avatar Peter Oberparleiter Committed by Vasily Gorbik

s390/sclp: Remove vt220 power management support

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

Remove leftover sclp vt220-related power management code.
Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarPeter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 5602bf8a
...@@ -69,9 +69,6 @@ static LIST_HEAD(sclp_vt220_empty); ...@@ -69,9 +69,6 @@ static LIST_HEAD(sclp_vt220_empty);
/* List of pending requests */ /* List of pending requests */
static LIST_HEAD(sclp_vt220_outqueue); static LIST_HEAD(sclp_vt220_outqueue);
/* Suspend mode flag */
static int sclp_vt220_suspended;
/* Flag that output queue is currently running */ /* Flag that output queue is currently running */
static int sclp_vt220_queue_running; static int sclp_vt220_queue_running;
...@@ -95,15 +92,12 @@ static int __initdata sclp_vt220_init_count; ...@@ -95,15 +92,12 @@ static int __initdata sclp_vt220_init_count;
static int sclp_vt220_flush_later; static int sclp_vt220_flush_later;
static void sclp_vt220_receiver_fn(struct evbuf_header *evbuf); static void sclp_vt220_receiver_fn(struct evbuf_header *evbuf);
static void sclp_vt220_pm_event_fn(struct sclp_register *reg,
enum sclp_pm_event sclp_pm_event);
static int __sclp_vt220_emit(struct sclp_vt220_request *request); static int __sclp_vt220_emit(struct sclp_vt220_request *request);
static void sclp_vt220_emit_current(void); static void sclp_vt220_emit_current(void);
/* Registration structure for SCLP output event buffers */ /* Registration structure for SCLP output event buffers */
static struct sclp_register sclp_vt220_register = { static struct sclp_register sclp_vt220_register = {
.send_mask = EVTYP_VT220MSG_MASK, .send_mask = EVTYP_VT220MSG_MASK,
.pm_event_fn = sclp_vt220_pm_event_fn,
}; };
/* Registration structure for SCLP input event buffers */ /* Registration structure for SCLP input event buffers */
...@@ -135,7 +129,7 @@ sclp_vt220_process_queue(struct sclp_vt220_request *request) ...@@ -135,7 +129,7 @@ sclp_vt220_process_queue(struct sclp_vt220_request *request)
if (!list_empty(&sclp_vt220_outqueue)) if (!list_empty(&sclp_vt220_outqueue))
request = list_entry(sclp_vt220_outqueue.next, request = list_entry(sclp_vt220_outqueue.next,
struct sclp_vt220_request, list); struct sclp_vt220_request, list);
if (!request || sclp_vt220_suspended) { if (!request) {
sclp_vt220_queue_running = 0; sclp_vt220_queue_running = 0;
spin_unlock_irqrestore(&sclp_vt220_lock, flags); spin_unlock_irqrestore(&sclp_vt220_lock, flags);
break; break;
...@@ -241,7 +235,7 @@ sclp_vt220_emit_current(void) ...@@ -241,7 +235,7 @@ sclp_vt220_emit_current(void)
} }
sclp_vt220_flush_later = 0; sclp_vt220_flush_later = 0;
} }
if (sclp_vt220_queue_running || sclp_vt220_suspended) if (sclp_vt220_queue_running)
goto out_unlock; goto out_unlock;
if (list_empty(&sclp_vt220_outqueue)) if (list_empty(&sclp_vt220_outqueue))
goto out_unlock; goto out_unlock;
...@@ -420,7 +414,7 @@ __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, ...@@ -420,7 +414,7 @@ __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule,
if (list_empty(&sclp_vt220_empty)) if (list_empty(&sclp_vt220_empty))
sclp_console_full++; sclp_console_full++;
while (list_empty(&sclp_vt220_empty)) { while (list_empty(&sclp_vt220_empty)) {
if (may_fail || sclp_vt220_suspended) if (may_fail)
goto out; goto out;
if (sclp_vt220_drop_buffer()) if (sclp_vt220_drop_buffer())
break; break;
...@@ -791,46 +785,6 @@ static void __sclp_vt220_flush_buffer(void) ...@@ -791,46 +785,6 @@ static void __sclp_vt220_flush_buffer(void)
spin_unlock_irqrestore(&sclp_vt220_lock, flags); spin_unlock_irqrestore(&sclp_vt220_lock, flags);
} }
/*
* Resume console: If there are cached messages, emit them.
*/
static void sclp_vt220_resume(void)
{
unsigned long flags;
spin_lock_irqsave(&sclp_vt220_lock, flags);
sclp_vt220_suspended = 0;
spin_unlock_irqrestore(&sclp_vt220_lock, flags);
sclp_vt220_emit_current();
}
/*
* Suspend console: Set suspend flag and flush console
*/
static void sclp_vt220_suspend(void)
{
unsigned long flags;
spin_lock_irqsave(&sclp_vt220_lock, flags);
sclp_vt220_suspended = 1;
spin_unlock_irqrestore(&sclp_vt220_lock, flags);
__sclp_vt220_flush_buffer();
}
static void sclp_vt220_pm_event_fn(struct sclp_register *reg,
enum sclp_pm_event sclp_pm_event)
{
switch (sclp_pm_event) {
case SCLP_PM_EVENT_FREEZE:
sclp_vt220_suspend();
break;
case SCLP_PM_EVENT_RESTORE:
case SCLP_PM_EVENT_THAW:
sclp_vt220_resume();
break;
}
}
#ifdef CONFIG_SCLP_VT220_CONSOLE #ifdef CONFIG_SCLP_VT220_CONSOLE
static void static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment