xref: /openbmc/linux/arch/s390/include/asm/stp.h (revision 8730046c)
1 /*
2  *  Copyright IBM Corp. 2006
3  *  Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
4  */
5 #ifndef __S390_STP_H
6 #define __S390_STP_H
7 
8 /* notifier for syncs */
9 extern struct atomic_notifier_head s390_epoch_delta_notifier;
10 
11 /* STP interruption parameter */
12 struct stp_irq_parm {
13 	unsigned int _pad0	: 14;
14 	unsigned int tsc	: 1;	/* Timing status change */
15 	unsigned int lac	: 1;	/* Link availability change */
16 	unsigned int tcpc	: 1;	/* Time control parameter change */
17 	unsigned int _pad2	: 15;
18 } __attribute__ ((packed));
19 
20 #define STP_OP_SYNC	1
21 #define STP_OP_CTRL	3
22 
23 struct stp_sstpi {
24 	unsigned int rsvd0;
25 	unsigned int rsvd1 : 8;
26 	unsigned int stratum : 8;
27 	unsigned int vbits : 16;
28 	unsigned int leaps : 16;
29 	unsigned int tmd : 4;
30 	unsigned int ctn : 4;
31 	unsigned int rsvd2 : 3;
32 	unsigned int c : 1;
33 	unsigned int tst : 4;
34 	unsigned int tzo : 16;
35 	unsigned int dsto : 16;
36 	unsigned int ctrl : 16;
37 	unsigned int rsvd3 : 16;
38 	unsigned int tto;
39 	unsigned int rsvd4;
40 	unsigned int ctnid[3];
41 	unsigned int rsvd5;
42 	unsigned int todoff[4];
43 	unsigned int rsvd6[48];
44 } __attribute__ ((packed));
45 
46 /* Functions needed by the machine check handler */
47 int stp_sync_check(void);
48 int stp_island_check(void);
49 void stp_queue_work(void);
50 
51 #endif /* __S390_STP_H */
52