summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/diag.h
diff options
context:
space:
mode:
authorJulian Wiedmann <jwi@linux.vnet.ibm.com>2017-06-20 16:00:33 +0200
committerDavid S. Miller <davem@davemloft.net>2017-06-20 15:44:15 -0400
commit1b030478166cdbdffe9bcffadc32558b4b511869 (patch)
tree08206f6e31555f7e043c13ff5224dbe7f60cef4e /arch/s390/include/asm/diag.h
parent3cdc8a25297e4e0646c3e72671c95f065117a9fd (diff)
downloadlwn-1b030478166cdbdffe9bcffadc32558b4b511869.tar.gz
lwn-1b030478166cdbdffe9bcffadc32558b4b511869.zip
s390/diag: add diag26c support
Implement support for the hypervisor diagnose 0x26c ('Access Certain System Information'). It passes a request buffer and a subfunction code, and receives a response buffer and a return code. Also add the scaffolding for the 'MAC Services' subfunction. It may be used by network devices to obtain a hypervisor-managed MAC address. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/s390/include/asm/diag.h')
-rw-r--r--arch/s390/include/asm/diag.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/s390/include/asm/diag.h b/arch/s390/include/asm/diag.h
index 8acf482162ed..88162bb5c190 100644
--- a/arch/s390/include/asm/diag.h
+++ b/arch/s390/include/asm/diag.h
@@ -8,6 +8,7 @@
#ifndef _ASM_S390_DIAG_H
#define _ASM_S390_DIAG_H
+#include <linux/if_ether.h>
#include <linux/percpu.h>
enum diag_stat_enum {
@@ -24,6 +25,7 @@ enum diag_stat_enum {
DIAG_STAT_X224,
DIAG_STAT_X250,
DIAG_STAT_X258,
+ DIAG_STAT_X26C,
DIAG_STAT_X288,
DIAG_STAT_X2C4,
DIAG_STAT_X2FC,
@@ -225,6 +227,30 @@ struct diag204_x_phys_block {
struct diag204_x_phys_cpu cpus[];
} __packed;
+enum diag26c_sc {
+ DIAG26C_MAC_SERVICES = 0x00000030
+};
+
+enum diag26c_version {
+ DIAG26C_VERSION2 = 0x00000002 /* z/VM 5.4.0 */
+};
+
+#define DIAG26C_GET_MAC 0x0000
+struct diag26c_mac_req {
+ u32 resp_buf_len;
+ u32 resp_version;
+ u16 op_code;
+ u16 devno;
+ u8 res[4];
+};
+
+struct diag26c_mac_resp {
+ u32 version;
+ u8 mac[ETH_ALEN];
+ u8 res[2];
+} __aligned(8);
+
int diag204(unsigned long subcode, unsigned long size, void *addr);
int diag224(void *ptr);
+int diag26c(void *req, void *resp, enum diag26c_sc subcode);
#endif /* _ASM_S390_DIAG_H */