summaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/con3215.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-12-15 01:22:26 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2020-12-15 01:22:26 +0100
commit586592478b1fa8bb8cd6875a9191468e9b1a8b13 (patch)
treeb93ea8074b11ffa3c10ec4c0ed910479a6564bb0 /drivers/s390/char/con3215.c
parentMerge tag 'm68k-for-v5.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
parents390/mm: add support to allocate gigantic hugepages using CMA (diff)
downloadlinux-586592478b1fa8bb8cd6875a9191468e9b1a8b13.tar.xz
linux-586592478b1fa8bb8cd6875a9191468e9b1a8b13.zip
Merge tag 's390-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Heiko Carstens: - Add support for the hugetlb_cma command line option to allocate gigantic hugepages using CMA - Add arch_get_random_long() support. - Add ap bus userspace notifications. - Increase default size of vmalloc area to 512GB and otherwise let it increase dynamically by the size of physical memory. This should fix all occurrences where the vmalloc area was not large enough. - Completely get rid of set_fs() (aka select SET_FS) and rework address space handling while doing that; making address space handling much more simple. - Reimplement getcpu vdso syscall in C. - Add support for extended SCLP responses (> 4k). This allows e.g. to handle also potential large system configurations. - Simplify KASAN by removing 3-level page table support and only supporting 4-levels from now on. - Improve debug-ability of the kernel decompressor code, which now prints also stack traces and symbols in case of problems to the console. - Remove more power management leftovers. - Other various fixes and improvements all over the place. * tag 's390-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (62 commits) s390/mm: add support to allocate gigantic hugepages using CMA s390/crypto: add arch_get_random_long() support s390/smp: perform initial CPU reset also for SMT siblings s390/mm: use invalid asce for user space when switching to init_mm s390/idle: fix accounting with machine checks s390/idle: add missing mt_cycles calculation s390/boot: add build-id to decompressor s390/kexec_file: fix diag308 subcode when loading crash kernel s390/cio: fix use-after-free in ccw_device_destroy_console s390/cio: remove pm support from ccw bus driver s390/cio: remove pm support from css-bus driver s390/cio: remove pm support from IO subchannel drivers s390/cio: remove pm support from chsc subchannel driver s390/vmur: remove unused pm related functions s390/tape: remove unsupported PM functions s390/cio: remove pm support from eadm-sch drivers s390: remove pm support from console drivers s390/dasd: remove unused pm related functions s390/zfcp: remove pm support from zfcp driver s390/ap: let bus_register() add the AP bus sysfs attributes ...
Diffstat (limited to 'drivers/s390/char/con3215.c')
-rw-r--r--drivers/s390/char/con3215.c85
1 files changed, 9 insertions, 76 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
index d8acabbb1ed3..1354c42d95aa 100644
--- a/drivers/s390/char/con3215.c
+++ b/drivers/s390/char/con3215.c
@@ -289,16 +289,14 @@ static void raw3215_timeout(struct timer_list *t)
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
raw->flags &= ~RAW3215_TIMER_RUNS;
- if (!tty_port_suspended(&raw->port)) {
- raw3215_mk_write_req(raw);
- raw3215_start_io(raw);
- if ((raw->queued_read || raw->queued_write) &&
- !(raw->flags & RAW3215_WORKING) &&
- !(raw->flags & RAW3215_TIMER_RUNS)) {
- raw->timer.expires = RAW3215_TIMEOUT + jiffies;
- add_timer(&raw->timer);
- raw->flags |= RAW3215_TIMER_RUNS;
- }
+ raw3215_mk_write_req(raw);
+ raw3215_start_io(raw);
+ if ((raw->queued_read || raw->queued_write) &&
+ !(raw->flags & RAW3215_WORKING) &&
+ !(raw->flags & RAW3215_TIMER_RUNS)) {
+ raw->timer.expires = RAW3215_TIMEOUT + jiffies;
+ add_timer(&raw->timer);
+ raw->flags |= RAW3215_TIMER_RUNS;
}
spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);
}
@@ -311,7 +309,7 @@ static void raw3215_timeout(struct timer_list *t)
*/
static inline void raw3215_try_io(struct raw3215_info *raw)
{
- if (!tty_port_initialized(&raw->port) || tty_port_suspended(&raw->port))
+ if (!tty_port_initialized(&raw->port))
return;
if (raw->queued_read != NULL)
raw3215_start_io(raw);
@@ -464,26 +462,6 @@ put_tty:
}
/*
- * Drop the oldest line from the output buffer.
- */
-static void raw3215_drop_line(struct raw3215_info *raw)
-{
- int ix;
- char ch;
-
- BUG_ON(raw->written != 0);
- ix = (raw->head - raw->count) & (RAW3215_BUFFER_SIZE - 1);
- while (raw->count > 0) {
- ch = raw->buffer[ix];
- ix = (ix + 1) & (RAW3215_BUFFER_SIZE - 1);
- raw->count--;
- if (ch == 0x15)
- break;
- }
- raw->head = ix;
-}
-
-/*
* Wait until length bytes are available int the output buffer.
* Has to be called with the s390irq lock held. Can be called
* disabled.
@@ -491,13 +469,6 @@ static void raw3215_drop_line(struct raw3215_info *raw)
static void raw3215_make_room(struct raw3215_info *raw, unsigned int length)
{
while (RAW3215_BUFFER_SIZE - raw->count < length) {
- /* While console is frozen for suspend we have no other
- * choice but to drop message from the buffer to make
- * room for even more messages. */
- if (tty_port_suspended(&raw->port)) {
- raw3215_drop_line(raw);
- continue;
- }
/* there might be a request pending */
raw->flags |= RAW3215_FLUSHING;
raw3215_mk_write_req(raw);
@@ -763,36 +734,6 @@ static int raw3215_set_offline (struct ccw_device *cdev)
return 0;
}
-static int raw3215_pm_stop(struct ccw_device *cdev)
-{
- struct raw3215_info *raw;
- unsigned long flags;
-
- /* Empty the output buffer, then prevent new I/O. */
- raw = dev_get_drvdata(&cdev->dev);
- spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
- raw3215_make_room(raw, RAW3215_BUFFER_SIZE);
- tty_port_set_suspended(&raw->port, 1);
- spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);
- return 0;
-}
-
-static int raw3215_pm_start(struct ccw_device *cdev)
-{
- struct raw3215_info *raw;
- unsigned long flags;
-
- /* Allow I/O again and flush output buffer. */
- raw = dev_get_drvdata(&cdev->dev);
- spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
- tty_port_set_suspended(&raw->port, 0);
- raw->flags |= RAW3215_FLUSHING;
- raw3215_try_io(raw);
- raw->flags &= ~RAW3215_FLUSHING;
- spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);
- return 0;
-}
-
static struct ccw_device_id raw3215_id[] = {
{ CCW_DEVICE(0x3215, 0) },
{ /* end of list */ },
@@ -808,9 +749,6 @@ static struct ccw_driver raw3215_ccw_driver = {
.remove = &raw3215_remove,
.set_online = &raw3215_set_online,
.set_offline = &raw3215_set_offline,
- .freeze = &raw3215_pm_stop,
- .thaw = &raw3215_pm_start,
- .restore = &raw3215_pm_start,
.int_class = IRQIO_C15,
};
@@ -858,11 +796,6 @@ static void con3215_flush(void)
unsigned long flags;
raw = raw3215[0]; /* console 3215 is the first one */
- if (tty_port_suspended(&raw->port))
- /* The console is still frozen for suspend. */
- if (ccw_device_force_console(raw->cdev))
- /* Forcing didn't work, no panic message .. */
- return;
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
raw3215_make_room(raw, RAW3215_BUFFER_SIZE);
spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);