From 303a3707e2e59e0ad581876db426a52fffa606b0 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Thu, 30 Jan 2020 16:35:51 +0100 Subject: [PATCH] zipl/sclp: add macros for the control-program masks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add macros for the control-program masks and use them. Reviewed-by: Philipp Rudo Reviewed-by: Stefan Haberland Signed-off-by: Marc Hartmayer Signed-off-by: Jan Höppner --- zipl/boot/sclp.c | 16 ++++++++-------- zipl/boot/sclp.h | 6 ++++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/zipl/boot/sclp.c b/zipl/boot/sclp.c index 0326a327..ad6019a3 100644 --- a/zipl/boot/sclp.c +++ b/zipl/boot/sclp.c @@ -126,20 +126,20 @@ int sclp_setup(int initialise) switch (initialise) { case SCLP_INIT: - sccb->receive_mask = 0x80000000; - sccb->send_mask = 0x40000000; + sccb->receive_mask = SCLP_EVENT_MASK_OPCMD; + sccb->send_mask = SCLP_EVENT_MASK_MSG; break; case SCLP_DISABLE: - sccb->receive_mask = 0x0; - sccb->send_mask = 0x0; + sccb->receive_mask = SCLP_EVENT_MASK_DISABLE; + sccb->send_mask = SCLP_EVENT_MASK_DISABLE; break; case SCLP_HSA_INIT: - sccb->receive_mask = 0x0; - sccb->send_mask = 0x40000010; + sccb->receive_mask = SCLP_EVENT_MASK_DISABLE; + sccb->send_mask = SCLP_EVENT_MASK_MSG | SCLP_EVENT_MASK_SDIAS; break; case SCLP_HSA_INIT_ASYNC: - sccb->receive_mask = 0x00000010; - sccb->send_mask = 0x40000010; + sccb->receive_mask = SCLP_EVENT_MASK_SDIAS; + sccb->send_mask = SCLP_EVENT_MASK_MSG | SCLP_EVENT_MASK_SDIAS; break; } diff --git a/zipl/boot/sclp.h b/zipl/boot/sclp.h index 1c8c7139..fa94fd5a 100644 --- a/zipl/boot/sclp.h +++ b/zipl/boot/sclp.h @@ -28,6 +28,12 @@ #define SCLP_CMD_READ_INFO2 0x00020001 #define SCLP_CMD_READ_DATA 0x00770005 +/* SCLP event masks */ +#define SCLP_EVENT_MASK_DISABLE 0x00000000 +#define SCLP_EVENT_MASK_SDIAS 0x00000010 +#define SCLP_EVENT_MASK_MSG 0x40000000 +#define SCLP_EVENT_MASK_OPCMD 0x80000000 + #define PSW_EXT_MASK 0x00080000ULL #define PSW_EXT_ADDR 0x80000000ULL #define PSW_WAIT_MASK 0x010a0000ULL