summaryrefslogtreecommitdiff
path: root/drivers/s390/char/raw3270.h
diff options
context:
space:
mode:
authorSven Schnelle <svens@linux.ibm.com>2022-11-24 22:53:44 +0100
committerHeiko Carstens <hca@linux.ibm.com>2023-01-09 14:34:01 +0100
commit9c138af9b777f466226787cf24a34ff94d4f80e2 (patch)
tree2f9c22b70848a2cc32f3d06ab999357d94c6fdbb /drivers/s390/char/raw3270.h
parentec1b0a33a3828801233683dd4fbd07fe8a0e7909 (diff)
downloadlwn-9c138af9b777f466226787cf24a34ff94d4f80e2.tar.gz
lwn-9c138af9b777f466226787cf24a34ff94d4f80e2.zip
s390/tty3270: convert lines during output
The length of the screen line is variable with the 3270 protocol. For each attribute (foreground, background color, highlighting etc) we need 3 bytes: the set attribute order, the attribute number, and the value of the attribute. This means that depending on screen content, we might end up 3*3 bytes addtional data for a single character. Allocating the maximum possible amount of memory is quite a lot, and we cannot easily extend the lines by allocating memory because we might get called from atomic context. Failing to extend the memory would also be bad as that would mean that we could miss kernel messages in oom conditions. Therefore move the conversion to a 3270 datastream to tty3270_update(), and use only single line buffer. Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Acked-by: Heiko Carstens <hca@linux.ibm.com> Tested-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers/s390/char/raw3270.h')
-rw-r--r--drivers/s390/char/raw3270.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/s390/char/raw3270.h b/drivers/s390/char/raw3270.h
index 23efa6b8be49..5ca1af6df935 100644
--- a/drivers/s390/char/raw3270.h
+++ b/drivers/s390/char/raw3270.h
@@ -219,7 +219,6 @@ void raw3270_unregister_notifier(struct raw3270_notifier *);
struct string
{
struct list_head list;
- struct list_head update;
unsigned long size;
unsigned long len;
char string[];
@@ -245,7 +244,6 @@ alloc_string(struct list_head *free_list, unsigned long len)
list_del(&cs->list);
cs->len = len;
INIT_LIST_HEAD(&cs->list);
- INIT_LIST_HEAD(&cs->update);
return cs;
}
return NULL;