summaryrefslogtreecommitdiff
path: root/drivers/s390/char/sclp_early.c
diff options
context:
space:
mode:
authorSumanth Korikkar <sumanthk@linux.ibm.com>2020-11-11 01:03:02 -0600
committerHeiko Carstens <hca@linux.ibm.com>2020-11-18 12:16:02 +0100
commitb971cbd03ee0a24f7af47b681e8f911794c69780 (patch)
treee5eaec17dc4235384324ad7302f1031da587f66f /drivers/s390/char/sclp_early.c
parentd25d23e134a43457759fa602a15c1e9fce741727 (diff)
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_early.c')
-rw-r--r--drivers/s390/char/sclp_early.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/char/sclp_early.c b/drivers/s390/char/sclp_early.c
index cc78b538acbf..2f3515fa242a 100644
--- a/drivers/s390/char/sclp_early.c
+++ b/drivers/s390/char/sclp_early.c
@@ -14,6 +14,7 @@
#include <asm/sclp.h>
#include <asm/ipl.h>
#include <asm/setup.h>
+#include <asm/facility.h>
#include "sclp_sdias.h"
#include "sclp.h"
@@ -114,7 +115,7 @@ void __init sclp_early_get_ipl_info(struct sclp_ipl_info *info)
int __init sclp_early_get_core_info(struct sclp_core_info *info)
{
struct read_cpu_info_sccb *sccb;
- int length = PAGE_SIZE;
+ int length = test_facility(140) ? EXT_SCCB_READ_CPU : PAGE_SIZE;
int rc = 0;
if (!SCLP_HAS_CPU_INFO)