Lines Matching refs:record
130 struct pstore_record *record)
149 record->type = prz->type;
150 record->id = id;
188 static ssize_t ramoops_pstore_read(struct pstore_record *record)
191 struct ramoops_context *cxt = record->psi->data;
201 record->time.tv_sec = 0;
202 record->time.tv_nsec = 0;
203 record->compressed = false;
208 record);
212 &record->time,
213 &record->compressed);
214 /* Clear and skip this DMESG record if it has no valid header */
223 prz = ramoops_get_next_prz(&cxt->cprz, 0 /* single */, record);
226 prz = ramoops_get_next_prz(&cxt->mprz, 0 /* single */, record);
229 prz = ramoops_get_next_prz(&cxt->bprz, 0 /* single */, record);
236 record);
239 * Build a new dummy record which combines all the
253 cxt->ftrace_read_cnt++, record);
271 record->id = 0;
283 record->ecc_notice_size = persistent_ram_ecc_string(prz, NULL, 0);
285 record->buf = kmalloc(size + record->ecc_notice_size + 1, GFP_KERNEL);
286 if (record->buf == NULL) {
291 memcpy(record->buf, (char *)persistent_ram_old(prz) + header_length,
294 persistent_ram_ecc_string(prz, record->buf + size,
295 record->ecc_notice_size + 1);
307 struct pstore_record *record)
314 (time64_t)record->time.tv_sec,
315 record->time.tv_nsec / 1000,
316 record->compressed ? 'C' : 'D');
322 static int notrace ramoops_pstore_write(struct pstore_record *record)
324 struct ramoops_context *cxt = record->psi->data;
328 if (record->type == PSTORE_TYPE_CONSOLE) {
331 persistent_ram_write(cxt->cprz, record->buf, record->size);
333 } else if (record->type == PSTORE_TYPE_FTRACE) {
346 persistent_ram_write(cxt->fprzs[zonenum], record->buf,
347 record->size);
349 } else if (record->type == PSTORE_TYPE_PMSG) {
352 } else if (record->type == PSTORE_TYPE_BLACKBOX) {
355 persistent_ram_write(cxt->bprz, record->buf, record->size);
359 if (record->type != PSTORE_TYPE_DMESG)
363 * We could filter on record->reason here if we wanted to (which
378 if (record->part != 1)
397 /* Build header and append record contents. */
398 hlen = ramoops_write_kmsg_hdr(prz, record);
402 size = record->size;
405 persistent_ram_write(prz, record->buf, size);
412 static int notrace ramoops_pstore_write_user(struct pstore_record *record,
415 if (record->type == PSTORE_TYPE_PMSG) {
416 struct ramoops_context *cxt = record->psi->data;
420 return persistent_ram_write_user(cxt->mprz, buf, record->size);
426 static int ramoops_pstore_erase(struct pstore_record *record)
428 struct ramoops_context *cxt = record->psi->data;
431 switch (record->type) {
433 if (record->id >= cxt->max_dump_cnt)
435 prz = cxt->dprzs[record->id];
441 if (record->id >= cxt->max_ftrace_cnt)
443 prz = cxt->fprzs[record->id];
514 * If we have a negative record size, calculate it based on
515 * mem_sz / *cnt. If we have a positive record size, calculate
523 dev_err(dev, "%s record size == 0 (%zu / %u)\n",
530 dev_err(dev, "%s record count == 0 (%zu / %zu)\n",
693 parse_u32("record-size", pdata->record_size, 0);
706 * console_size and pmsg_size to the record size since that's
766 pr_err("The memory size and the record/console size must be "
858 * must match the size of the dprz record (after PRZ header