Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Auxtrace support for s390 CPU measurement sampling facility
0004  *
0005  *  Copyright IBM Corp. 2018
0006  *  Author(s): Hendrik Brueckner <brueckner@linux.ibm.com>
0007  *         Thomas Richter <tmricht@linux.ibm.com>
0008  */
0009 #ifndef S390_CPUMSF_KERNEL_H
0010 #define S390_CPUMSF_KERNEL_H
0011 
0012 #define S390_CPUMSF_PAGESZ  4096    /* Size of sample block units */
0013 #define S390_CPUMSF_DIAG_DEF_FIRST  0x8001  /* Diagnostic entry lowest id */
0014 
0015 struct hws_basic_entry {
0016     unsigned int def:16;        /* 0-15  Data Entry Format       */
0017     unsigned int R:4;       /* 16-19 reserved            */
0018     unsigned int U:4;       /* 20-23 Number of unique instruct.  */
0019     unsigned int z:2;       /* zeros                 */
0020     unsigned int T:1;       /* 26 PSW DAT mode           */
0021     unsigned int W:1;       /* 27 PSW wait state         */
0022     unsigned int P:1;       /* 28 PSW Problem state      */
0023     unsigned int AS:2;      /* 29-30 PSW address-space control   */
0024     unsigned int I:1;       /* 31 entry valid or invalid     */
0025     unsigned int CL:2;      /* 32-33 Configuration Level     */
0026     unsigned int:14;
0027     unsigned int prim_asn:16;   /* primary ASN           */
0028     unsigned long long ia;      /* Instruction Address       */
0029     unsigned long long gpp;     /* Guest Program Parameter       */
0030     unsigned long long hpp;     /* Host Program Parameter        */
0031 };
0032 
0033 struct hws_diag_entry {
0034     unsigned int def:16;        /* 0-15  Data Entry Format       */
0035     unsigned int R:15;      /* 16-19 and 20-30 reserved      */
0036     unsigned int I:1;       /* 31 entry valid or invalid     */
0037     u8       data[];        /* Machine-dependent sample data     */
0038 };
0039 
0040 struct hws_combined_entry {
0041     struct hws_basic_entry  basic;  /* Basic-sampling data entry */
0042     struct hws_diag_entry   diag;   /* Diagnostic-sampling data entry */
0043 };
0044 
0045 struct hws_trailer_entry {
0046     union {
0047         struct {
0048             unsigned int f:1;   /* 0 - Block Full Indicator   */
0049             unsigned int a:1;   /* 1 - Alert request control  */
0050             unsigned int t:1;   /* 2 - Timestamp format       */
0051             unsigned int:29;    /* 3 - 31: Reserved       */
0052             unsigned int bsdes:16;  /* 32-47: size of basic SDE   */
0053             unsigned int dsdes:16;  /* 48-63: size of diagnostic SDE */
0054         };
0055         unsigned long long flags;   /* 0 - 64: All indicators     */
0056     };
0057     unsigned long long overflow;     /* 64 - sample Overflow count        */
0058     unsigned char timestamp[16];     /* 16 - 31 timestamp             */
0059     unsigned long long reserved1;    /* 32 -Reserved              */
0060     unsigned long long reserved2;    /*                   */
0061     union {              /* 48 - reserved for programming use */
0062         struct {
0063             unsigned long long clock_base:1; /* in progusage2 */
0064             unsigned long long progusage1:63;
0065             unsigned long long progusage2;
0066         };
0067         unsigned long long progusage[2];
0068     };
0069 };
0070 
0071 #endif