diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2015-11-27 12:33:18 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-04-15 18:16:39 +0200 |
commit | 3fa7ee8844c31cb9c78992bb82cfaeb13375345d (patch) | |
tree | e7ed4f0163f3176034b2bc69776cd62fa9ef48a4 /drivers/s390 | |
parent | s390/pci: add report_error attribute (diff) | |
download | linux-3fa7ee8844c31cb9c78992bb82cfaeb13375345d.tar.xz linux-3fa7ee8844c31cb9c78992bb82cfaeb13375345d.zip |
s390/sclp: event type macro cleanup
Sort the sclp event type defines and use a macro to create the
corresponding event type masks. In addition to that one unused
type/mask pair is removed and another previously unused define
is used now (it was probably unused/unknown because it didn't
follow the EVTYP_X EVTYP_X_MASK convention).
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/sclp.h | 38 | ||||
-rw-r--r-- | drivers/s390/char/sclp_cpi_sys.c | 2 |
2 files changed, 20 insertions, 20 deletions
diff --git a/drivers/s390/char/sclp.h b/drivers/s390/char/sclp.h index 6079efa95eaa..7a10c56334bb 100644 --- a/drivers/s390/char/sclp.h +++ b/drivers/s390/char/sclp.h @@ -17,35 +17,35 @@ #define MAX_KMEM_PAGES (sizeof(unsigned long) << 3) #define SCLP_CONSOLE_PAGES 6 +#define SCLP_EVTYP_MASK(T) (1U << (32 - (T))) + #define EVTYP_OPCMD 0x01 #define EVTYP_MSG 0x02 +#define EVTYP_CONFMGMDATA 0x04 #define EVTYP_DIAG_TEST 0x07 #define EVTYP_STATECHANGE 0x08 #define EVTYP_PMSGCMD 0x09 +#define EVTYP_ASYNC 0x0A +#define EVTYP_CTLPROGIDENT 0x0B #define EVTYP_ERRNOTIFY 0x18 -#define EVTYP_CNTLPROGOPCMD 0x20 -#define EVTYP_CNTLPROGIDENT 0x0B -#define EVTYP_SIGQUIESCE 0x1D #define EVTYP_VT220MSG 0x1A -#define EVTYP_CONFMGMDATA 0x04 #define EVTYP_SDIAS 0x1C -#define EVTYP_ASYNC 0x0A +#define EVTYP_SIGQUIESCE 0x1D #define EVTYP_OCF 0x1E -#define EVTYP_OPCMD_MASK 0x80000000 -#define EVTYP_MSG_MASK 0x40000000 -#define EVTYP_DIAG_TEST_MASK 0x02000000 -#define EVTYP_STATECHANGE_MASK 0x01000000 -#define EVTYP_PMSGCMD_MASK 0x00800000 -#define EVTYP_ERRNOTIFY_MASK 0x00000100 -#define EVTYP_CTLPROGOPCMD_MASK 0x00000001 -#define EVTYP_CTLPROGIDENT_MASK 0x00200000 -#define EVTYP_SIGQUIESCE_MASK 0x00000008 -#define EVTYP_VT220MSG_MASK 0x00000040 -#define EVTYP_CONFMGMDATA_MASK 0x10000000 -#define EVTYP_SDIAS_MASK 0x00000010 -#define EVTYP_ASYNC_MASK 0x00400000 -#define EVTYP_OCF_MASK 0x00000004 +#define EVTYP_OPCMD_MASK SCLP_EVTYP_MASK(EVTYP_OPCMD) +#define EVTYP_MSG_MASK SCLP_EVTYP_MASK(EVTYP_MSG) +#define EVTYP_CONFMGMDATA_MASK SCLP_EVTYP_MASK(EVTYP_CONFMGMDATA) +#define EVTYP_DIAG_TEST_MASK SCLP_EVTYP_MASK(EVTYP_DIAG_TEST) +#define EVTYP_STATECHANGE_MASK SCLP_EVTYP_MASK(EVTYP_STATECHANGE) +#define EVTYP_PMSGCMD_MASK SCLP_EVTYP_MASK(EVTYP_PMSGCMD) +#define EVTYP_ASYNC_MASK SCLP_EVTYP_MASK(EVTYP_ASYNC) +#define EVTYP_CTLPROGIDENT_MASK SCLP_EVTYP_MASK(EVTYP_CTLPROGIDENT) +#define EVTYP_ERRNOTIFY_MASK SCLP_EVTYP_MASK(EVTYP_ERRNOTIFY) +#define EVTYP_VT220MSG_MASK SCLP_EVTYP_MASK(EVTYP_VT220MSG) +#define EVTYP_SDIAS_MASK SCLP_EVTYP_MASK(EVTYP_SDIAS) +#define EVTYP_SIGQUIESCE_MASK SCLP_EVTYP_MASK(EVTYP_SIGQUIESCE) +#define EVTYP_OCF_MASK SCLP_EVTYP_MASK(EVTYP_OCF) #define GNRLMSGFLGS_DOM 0x8000 #define GNRLMSGFLGS_SNDALRM 0x4000 diff --git a/drivers/s390/char/sclp_cpi_sys.c b/drivers/s390/char/sclp_cpi_sys.c index f344e5bd2d9f..90d92fbe7b9b 100644 --- a/drivers/s390/char/sclp_cpi_sys.c +++ b/drivers/s390/char/sclp_cpi_sys.c @@ -93,7 +93,7 @@ static struct sclp_req *cpi_prepare_req(void) /* setup SCCB for Control-Program Identification */ sccb->header.length = sizeof(struct cpi_sccb); sccb->cpi_evbuf.header.length = sizeof(struct cpi_evbuf); - sccb->cpi_evbuf.header.type = 0x0b; + sccb->cpi_evbuf.header.type = EVTYP_CTLPROGIDENT; evb = &sccb->cpi_evbuf; /* set system type */ |