summaryrefslogtreecommitdiff
path: root/arch/s390/include/uapi/asm/clp.h
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2016-01-13 12:54:28 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-03-07 16:54:32 +0100
commit988b86e69ded17f0f1209fd3ef1c4c7f1567dcc1 (patch)
tree7ef6e69d88c827190cc5f66f417efc04f0d03d6f /arch/s390/include/uapi/asm/clp.h
parentbaebc70a4db86515d55ff1f226088a8e7f5821a0 (diff)
downloadlwn-988b86e69ded17f0f1209fd3ef1c4c7f1567dcc1.tar.gz
lwn-988b86e69ded17f0f1209fd3ef1c4c7f1567dcc1.zip
s390/pci: add ioctl interface for CLP
Provide a user space interface to issue call logical-processor instructions. Only selected CLP commands are allowed, enough to get the full overview of the installed PCI functions. Reviewed-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/uapi/asm/clp.h')
-rw-r--r--arch/s390/include/uapi/asm/clp.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/s390/include/uapi/asm/clp.h b/arch/s390/include/uapi/asm/clp.h
new file mode 100644
index 000000000000..ab72d9d24373
--- /dev/null
+++ b/arch/s390/include/uapi/asm/clp.h
@@ -0,0 +1,28 @@
+/*
+ * ioctl interface for /dev/clp
+ *
+ * Copyright IBM Corp. 2016
+ * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
+ */
+
+#ifndef _ASM_CLP_H
+#define _ASM_CLP_H
+
+#include <linux/types.h>
+#include <linux/ioctl.h>
+
+struct clp_req {
+ unsigned int c : 1;
+ unsigned int r : 1;
+ unsigned int lps : 6;
+ unsigned int cmd : 8;
+ unsigned int : 16;
+ unsigned int reserved;
+ __u64 data_p;
+};
+
+#define CLP_IOCTL_MAGIC 'c'
+
+#define CLP_SYNC _IOWR(CLP_IOCTL_MAGIC, 0xC1, struct clp_req)
+
+#endif