Lines Matching refs:data
59 struct bootstage_data *data = gd->bootstage; in bootstage_relocate() local
64 ptr = (char *)(data + 1); in bootstage_relocate()
70 debug("Relocating %d records\n", data->rec_count); in bootstage_relocate()
71 for (i = 0; i < data->rec_count; i++) { in bootstage_relocate()
72 const char *from = data->record[i].name; in bootstage_relocate()
75 data->record[i].name = ptr; in bootstage_relocate()
82 struct bootstage_record *find_id(struct bootstage_data *data, in find_id() argument
88 for (rec = data->record, end = rec + data->rec_count; rec < end; in find_id()
97 struct bootstage_record *ensure_id(struct bootstage_data *data, in ensure_id() argument
102 rec = find_id(data, id); in ensure_id()
103 if (!rec && data->rec_count < RECORD_COUNT) { in ensure_id()
104 rec = &data->record[data->rec_count++]; in ensure_id()
115 struct bootstage_data *data = gd->bootstage; in bootstage_add_record() local
123 if (!data) in bootstage_add_record()
126 id = data->next_id++; in bootstage_add_record()
129 rec = find_id(data, id); in bootstage_add_record()
130 if (!rec && data->rec_count < RECORD_COUNT) { in bootstage_add_record()
131 rec = &data->record[data->rec_count++]; in bootstage_add_record()
195 struct bootstage_data *data = gd->bootstage; in bootstage_start() local
196 struct bootstage_record *rec = ensure_id(data, id); in bootstage_start()
209 struct bootstage_data *data = gd->bootstage; in bootstage_accum() local
210 struct bootstage_record *rec = ensure_id(data, id); in bootstage_accum()
274 struct bootstage_data *data = gd->bootstage; in add_bootstages_devicetree() local
295 for (recnum = data->rec_count - 1, i = 0; recnum >= 0; recnum--, i++) { in add_bootstages_devicetree()
296 struct bootstage_record *rec = &data->record[recnum]; in add_bootstages_devicetree()
332 struct bootstage_data *data = gd->bootstage; in bootstage_report() local
333 struct bootstage_record *rec = data->record; in bootstage_report()
338 data->rec_count); in bootstage_report()
344 qsort(data->record, data->rec_count, sizeof(*rec), h_compare_record); in bootstage_report()
346 for (i = 1, rec++; i < data->rec_count; i++, rec++) { in bootstage_report()
350 if (data->rec_count > RECORD_COUNT) in bootstage_report()
353 data->rec_count - RECORD_COUNT); in bootstage_report()
356 for (i = 0, rec = data->record; i < data->rec_count; i++, rec++) { in bootstage_report()
373 static void append_data(char **ptrp, char *end, const void *data, int size) in append_data() argument
381 memcpy(ptr, data, size); in append_data()
386 const struct bootstage_data *data = gd->bootstage; in bootstage_stash() local
401 hdr->count = data->rec_count; in bootstage_stash()
404 hdr->next_id = data->next_id; in bootstage_stash()
408 for (rec = data->record, i = 0; i < data->rec_count; i++, rec++) in bootstage_stash()
412 for (rec = data->record, i = 0; i < data->rec_count; i++, rec++) { in bootstage_stash()
435 struct bootstage_data *data = gd->bootstage; in bootstage_unstash() local
472 if (data->rec_count + hdr->count > RECORD_COUNT) { in bootstage_unstash()
475 __func__, hdr->count, RECORD_COUNT - data->rec_count); in bootstage_unstash()
482 rec_size = hdr->count * sizeof(*data->record); in bootstage_unstash()
483 memcpy(data->record + data->rec_count, ptr, rec_size); in bootstage_unstash()
487 for (rec = data->record + data->next_id, i = 0; i < hdr->count; in bootstage_unstash()
498 data->rec_count += hdr->count; in bootstage_unstash()
499 data->next_id = hdr->next_id; in bootstage_unstash()
507 struct bootstage_data *data = gd->bootstage; in bootstage_get_size() local
513 for (rec = data->record, i = 0; i < data->rec_count; in bootstage_get_size()
522 struct bootstage_data *data; in bootstage_init() local
528 data = gd->bootstage; in bootstage_init()
529 memset(data, '\0', size); in bootstage_init()
531 data->next_id = BOOTSTAGE_ID_USER; in bootstage_init()