[kvm-unit-tests,PULL,01/10] s390x: cleanup and add SCLP defines
diff mbox series

Message ID 1548067555-15766-2-git-send-email-thuth@redhat.com
State New
Headers show
Series
  • [kvm-unit-tests,PULL,01/10] s390x: cleanup and add SCLP defines
Related show

Commit Message

Thomas Huth Jan. 21, 2019, 10:45 a.m. UTC
From: David Hildenbrand <david@redhat.com>

Reading the Linux kernel SCLP code, one might wonder what certain magic
values mean and why we don't have to set them in our SCLP code. So
let's define them for us. We might want to make use of them in the
future.

Add two new defines for values used in the linux kernel
- SCLP_FC_SINGLE_INCREMENT_ASSIGN (used to speed up memory hotplug)
- SCLP_FC_DUMP_INDICATOR (used to get more reasonable dumps)

Also rename SCLP_VARIABLE_LENGTH_RESPONSE to
SCLP_CM2_VARIABLE_LENGTH_RESPONSE, so it is clear where this is actually
used. Move the defines to separate sections.

Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 lib/s390x/sclp.h | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

Patch
diff mbox series

diff --git a/lib/s390x/sclp.h b/lib/s390x/sclp.h
index 21d482b..629e9e2 100644
--- a/lib/s390x/sclp.h
+++ b/lib/s390x/sclp.h
@@ -68,14 +68,19 @@ 
 #define SCLP_RC_EVENT_BUFFER_SYNTAX_ERROR       0x73f0
 #define SCLP_RC_INVALID_MASK_LENGTH             0x74f0
 
-/* Service Call Control Block (SCCB) and its elements */
+/* SCLP control mask bits */
+#define SCLP_CM2_VARIABLE_LENGTH_RESPONSE       0x80
 
-#define SCCB_SIZE 4096
+/* SCLP function codes */
+#define SCLP_FC_NORMAL_WRITE                    0
+#define SCLP_FC_SINGLE_INCREMENT_ASSIGN         0x40
+#define SCLP_FC_DUMP_INDICATOR                  0x80
 
-#define SCLP_VARIABLE_LENGTH_RESPONSE           0x80
+/* SCLP event buffer flags */
 #define SCLP_EVENT_BUFFER_ACCEPTED              0x80
 
-#define SCLP_FC_NORMAL_WRITE                    0
+/* Service Call Control Block (SCCB) and its elements */
+#define SCCB_SIZE 4096
 
 typedef struct SCCBHeader {
     uint16_t length;