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