Lines Matching refs:rcd

977 	struct cper_pstore_record *rcd;
978 size_t rcd_len = sizeof(*rcd) + erst_info.bufsize;
983 rcd = kmalloc(rcd_len, GFP_KERNEL);
984 if (!rcd) {
999 len = erst_read(record_id, &rcd->hdr, rcd_len);
1003 else if (len < 0 || len < sizeof(*rcd)) {
1007 if (!guid_equal(&rcd->hdr.creator_id, &CPER_CREATOR_PSTORE))
1015 memcpy(record->buf, rcd->data, len - sizeof(*rcd));
1019 if (guid_equal(&rcd->sec_hdr.section_type, &CPER_SECTION_TYPE_DMESG_Z)) {
1022 } else if (guid_equal(&rcd->sec_hdr.section_type, &CPER_SECTION_TYPE_DMESG))
1024 else if (guid_equal(&rcd->sec_hdr.section_type, &CPER_SECTION_TYPE_MCE))
1029 if (rcd->hdr.validation_bits & CPER_VALID_TIMESTAMP)
1030 record->time.tv_sec = rcd->hdr.timestamp;
1036 kfree(rcd);
1037 return (rc < 0) ? rc : (len - sizeof(*rcd));
1042 struct cper_pstore_record *rcd = (struct cper_pstore_record *)
1043 (erst_info.buf - sizeof(*rcd));
1046 memset(rcd, 0, sizeof(*rcd));
1047 memcpy(rcd->hdr.signature, CPER_SIG_RECORD, CPER_SIG_SIZE);
1048 rcd->hdr.revision = CPER_RECORD_REV;
1049 rcd->hdr.signature_end = CPER_SIG_END;
1050 rcd->hdr.section_count = 1;
1051 rcd->hdr.error_severity = CPER_SEV_FATAL;
1053 rcd->hdr.validation_bits = CPER_VALID_TIMESTAMP;
1054 rcd->hdr.timestamp = ktime_get_real_seconds();
1055 rcd->hdr.record_length = sizeof(*rcd) + record->size;
1056 rcd->hdr.creator_id = CPER_CREATOR_PSTORE;
1057 rcd->hdr.notification_type = CPER_NOTIFY_MCE;
1058 rcd->hdr.record_id = cper_next_record_id();
1059 rcd->hdr.flags = CPER_HW_ERROR_FLAGS_PREVERR;
1061 rcd->sec_hdr.section_offset = sizeof(*rcd);
1062 rcd->sec_hdr.section_length = record->size;
1063 rcd->sec_hdr.revision = CPER_SEC_REV;
1065 rcd->sec_hdr.validation_bits = 0;
1066 rcd->sec_hdr.flags = CPER_SEC_PRIMARY;
1070 rcd->sec_hdr.section_type = CPER_SECTION_TYPE_DMESG_Z;
1072 rcd->sec_hdr.section_type = CPER_SECTION_TYPE_DMESG;
1075 rcd->sec_hdr.section_type = CPER_SECTION_TYPE_MCE;
1080 rcd->sec_hdr.section_severity = CPER_SEV_FATAL;
1082 ret = erst_write(&rcd->hdr);
1083 record->id = rcd->hdr.record_id;