Lines Matching defs:rcd

1041 	struct cper_pstore_record *rcd;
1042 size_t rcd_len = sizeof(*rcd) + erst_info.bufsize;
1047 rcd = kmalloc(rcd_len, GFP_KERNEL);
1048 if (!rcd) {
1063 len = erst_read_record(record_id, &rcd->hdr, rcd_len, sizeof(*rcd),
1076 memcpy(record->buf, rcd->data, len - sizeof(*rcd));
1080 if (guid_equal(&rcd->sec_hdr.section_type, &CPER_SECTION_TYPE_DMESG_Z)) {
1083 } else if (guid_equal(&rcd->sec_hdr.section_type, &CPER_SECTION_TYPE_DMESG))
1085 else if (guid_equal(&rcd->sec_hdr.section_type, &CPER_SECTION_TYPE_MCE))
1090 if (rcd->hdr.validation_bits & CPER_VALID_TIMESTAMP)
1091 record->time.tv_sec = rcd->hdr.timestamp;
1097 kfree(rcd);
1098 return (rc < 0) ? rc : (len - sizeof(*rcd));
1103 struct cper_pstore_record *rcd = (struct cper_pstore_record *)
1104 (erst_info.buf - sizeof(*rcd));
1107 memset(rcd, 0, sizeof(*rcd));
1108 memcpy(rcd->hdr.signature, CPER_SIG_RECORD, CPER_SIG_SIZE);
1109 rcd->hdr.revision = CPER_RECORD_REV;
1110 rcd->hdr.signature_end = CPER_SIG_END;
1111 rcd->hdr.section_count = 1;
1112 rcd->hdr.error_severity = CPER_SEV_FATAL;
1114 rcd->hdr.validation_bits = CPER_VALID_TIMESTAMP;
1115 rcd->hdr.timestamp = ktime_get_real_seconds();
1116 rcd->hdr.record_length = sizeof(*rcd) + record->size;
1117 rcd->hdr.creator_id = CPER_CREATOR_PSTORE;
1118 rcd->hdr.notification_type = CPER_NOTIFY_MCE;
1119 rcd->hdr.record_id = cper_next_record_id();
1120 rcd->hdr.flags = CPER_HW_ERROR_FLAGS_PREVERR;
1122 rcd->sec_hdr.section_offset = sizeof(*rcd);
1123 rcd->sec_hdr.section_length = record->size;
1124 rcd->sec_hdr.revision = CPER_SEC_REV;
1126 rcd->sec_hdr.validation_bits = 0;
1127 rcd->sec_hdr.flags = CPER_SEC_PRIMARY;
1131 rcd->sec_hdr.section_type = CPER_SECTION_TYPE_DMESG_Z;
1133 rcd->sec_hdr.section_type = CPER_SECTION_TYPE_DMESG;
1136 rcd->sec_hdr.section_type = CPER_SECTION_TYPE_MCE;
1141 rcd->sec_hdr.section_severity = CPER_SEV_FATAL;
1143 ret = erst_write(&rcd->hdr);
1144 record->id = rcd->hdr.record_id;