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