On 6/1/23 18:45, Pierre Morel wrote:
When the extended-length-SCCB facility is present use a big
buffer already at first try when calling sclp_read_scp_info()
to avoid the SCLP_RC_INSUFFICIENT_SCCB_LENGTH error.
Signed-off-by: Pierre Morel <pmorel@xxxxxxxxxxxxx>
---
lib/s390x/sclp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/s390x/sclp.c b/lib/s390x/sclp.c
index adf357b..e44d299 100644
--- a/lib/s390x/sclp.c
+++ b/lib/s390x/sclp.c
@@ -17,13 +17,14 @@
#include "sclp.h"
#include <alloc_phys.h>
#include <alloc_page.h>
+#include <asm/facility.h>
extern unsigned long stacktop;
static uint64_t storage_increment_size;
static uint64_t max_ram_size;
static uint64_t ram_size;
-char _read_info[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE)));
+char _read_info[2 * PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE)));
static ReadInfo *read_info;
struct sclp_facilities sclp_facilities;
@@ -114,6 +115,8 @@ static void sclp_read_scp_info(ReadInfo *ri, int length)
void sclp_read_info(void)
{
This line must go away.....v
sclp_read_scp_info((void *)_read_info, SCCB_SIZE);
Sorry for the noise.
+ sclp_read_scp_info((void *)_read_info,
+ test_facility(140) ? sizeof(_read_info) : SCCB_SIZE);
read_info = (ReadInfo *)_read_info;
}