| .. | .. |
|---|
| 128 | 128 | struct hws_diag_entry diag; /* Diagnostic-sampling data entry */ |
|---|
| 129 | 129 | } __packed; |
|---|
| 130 | 130 | |
|---|
| 131 | | -struct hws_trailer_entry { |
|---|
| 132 | | - union { |
|---|
| 133 | | - struct { |
|---|
| 134 | | - unsigned int f:1; /* 0 - Block Full Indicator */ |
|---|
| 135 | | - unsigned int a:1; /* 1 - Alert request control */ |
|---|
| 136 | | - unsigned int t:1; /* 2 - Timestamp format */ |
|---|
| 137 | | - unsigned int :29; /* 3 - 31: Reserved */ |
|---|
| 138 | | - unsigned int bsdes:16; /* 32-47: size of basic SDE */ |
|---|
| 139 | | - unsigned int dsdes:16; /* 48-63: size of diagnostic SDE */ |
|---|
| 140 | | - }; |
|---|
| 141 | | - unsigned long long flags; /* 0 - 63: All indicators */ |
|---|
| 131 | +union hws_trailer_header { |
|---|
| 132 | + struct { |
|---|
| 133 | + unsigned int f:1; /* 0 - Block Full Indicator */ |
|---|
| 134 | + unsigned int a:1; /* 1 - Alert request control */ |
|---|
| 135 | + unsigned int t:1; /* 2 - Timestamp format */ |
|---|
| 136 | + unsigned int :29; /* 3 - 31: Reserved */ |
|---|
| 137 | + unsigned int bsdes:16; /* 32-47: size of basic SDE */ |
|---|
| 138 | + unsigned int dsdes:16; /* 48-63: size of diagnostic SDE */ |
|---|
| 139 | + unsigned long long overflow; /* 64 - Overflow Count */ |
|---|
| 142 | 140 | }; |
|---|
| 143 | | - unsigned long long overflow; /* 64 - sample Overflow count */ |
|---|
| 141 | + __uint128_t val; |
|---|
| 142 | +}; |
|---|
| 143 | + |
|---|
| 144 | +struct hws_trailer_entry { |
|---|
| 145 | + union hws_trailer_header header; /* 0 - 15 Flags + Overflow Count */ |
|---|
| 144 | 146 | unsigned char timestamp[16]; /* 16 - 31 timestamp */ |
|---|
| 145 | 147 | unsigned long long reserved1; /* 32 -Reserved */ |
|---|
| 146 | 148 | unsigned long long reserved2; /* */ |
|---|
| .. | .. |
|---|
| 287 | 289 | return USEC_PER_SEC * qsi->cpu_speed / rate; |
|---|
| 288 | 290 | } |
|---|
| 289 | 291 | |
|---|
| 290 | | -#define SDB_TE_ALERT_REQ_MASK 0x4000000000000000UL |
|---|
| 291 | | -#define SDB_TE_BUFFER_FULL_MASK 0x8000000000000000UL |
|---|
| 292 | | - |
|---|
| 293 | 292 | /* Return TOD timestamp contained in an trailer entry */ |
|---|
| 294 | 293 | static inline unsigned long long trailer_timestamp(struct hws_trailer_entry *te) |
|---|
| 295 | 294 | { |
|---|
| 296 | 295 | /* TOD in STCKE format */ |
|---|
| 297 | | - if (te->t) |
|---|
| 296 | + if (te->header.t) |
|---|
| 298 | 297 | return *((unsigned long long *) &te->timestamp[1]); |
|---|
| 299 | 298 | |
|---|
| 300 | 299 | /* TOD in STCK format */ |
|---|