summaryrefslogtreecommitdiff
path: root/drivers/s390/char/sclp.h
diff options
context:
space:
mode:
authorSumanth Korikkar <sumanthk@linux.ibm.com>2020-11-11 10:03:02 +0300
committerHeiko Carstens <hca@linux.ibm.com>2020-11-18 14:16:02 +0300
commitb971cbd03ee0a24f7af47b681e8f911794c69780 (patch)
treee5eaec17dc4235384324ad7302f1031da587f66f /drivers/s390/char/sclp.h
parentd25d23e134a43457759fa602a15c1e9fce741727 (diff)
downloadlinux-b971cbd03ee0a24f7af47b681e8f911794c69780.tar.xz
s390/sclp: provide extended sccb support
As the number of cpus increases, the sccb response can exceed 4k for read cpu and read scp info sclp commands. Hence, all cpu info entries cant be embedded within a sccb response Solution: To overcome this limitation, extended sccb facility is provided by sclp. 1. Check if the extended sccb facility is installed. 2. If extended sccb is installed, perform the read scp and read cpu command considering a max sccb length of three page size. This max length is based on factors like max cpus, sccb header. 3. If extended sccb is not installed, perform the read scp and read cpu sclp command considering a max sccb length of one page size. Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com> Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers/s390/char/sclp.h')
-rw-r--r--drivers/s390/char/sclp.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/s390/char/sclp.h b/drivers/s390/char/sclp.h
index 448ed25bf6b8..6de919944a39 100644
--- a/drivers/s390/char/sclp.h
+++ b/drivers/s390/char/sclp.h
@@ -156,7 +156,11 @@ struct read_cpu_info_sccb {
u16 offset_configured;
u16 nr_standby;
u16 offset_standby;
- u8 reserved[4096 - 16];
+ /*
+ * Without ext sccb, struct size is PAGE_SIZE.
+ * With ext sccb, struct size is EXT_SCCB_READ_CPU.
+ */
+ u8 reserved[];
} __attribute__((packed, aligned(PAGE_SIZE)));
struct read_info_sccb {
@@ -199,7 +203,7 @@ struct read_info_sccb {
u8 byte_134; /* 134 */
u8 cpudirq; /* 135 */
u16 cbl; /* 136-137 */
- u8 _pad_138[4096 - 138]; /* 138-4095 */
+ u8 _pad_138[EXT_SCCB_READ_SCP - 138];
} __packed __aligned(PAGE_SIZE);
struct read_storage_sccb {