Lines Matching refs:data
59 struct bootstage_data *data; in bootstage_relocate() local
65 data = gd->bootstage = to; in bootstage_relocate()
68 ptr = (char *)(data + 1); in bootstage_relocate()
74 debug("Relocating %d records\n", data->rec_count); in bootstage_relocate()
75 for (i = 0; i < data->rec_count; i++) { in bootstage_relocate()
76 const char *from = data->record[i].name; in bootstage_relocate()
79 data->record[i].name = ptr; in bootstage_relocate()
86 struct bootstage_record *find_id(struct bootstage_data *data, in find_id() argument
92 for (rec = data->record, end = rec + data->rec_count; rec < end; in find_id()
101 struct bootstage_record *ensure_id(struct bootstage_data *data, in ensure_id() argument
106 rec = find_id(data, id); in ensure_id()
107 if (!rec && data->rec_count < RECORD_COUNT) { in ensure_id()
108 rec = &data->record[data->rec_count++]; in ensure_id()
119 struct bootstage_data *data = gd->bootstage; in bootstage_add_record() local
127 if (!data) in bootstage_add_record()
130 id = data->next_id++; in bootstage_add_record()
133 rec = find_id(data, id); in bootstage_add_record()
135 if (data->rec_count < RECORD_COUNT) { in bootstage_add_record()
136 rec = &data->record[data->rec_count++]; in bootstage_add_record()
197 struct bootstage_data *data = gd->bootstage; in bootstage_start() local
198 struct bootstage_record *rec = ensure_id(data, id); in bootstage_start()
211 struct bootstage_data *data = gd->bootstage; in bootstage_accum() local
212 struct bootstage_record *rec = ensure_id(data, id); in bootstage_accum()
271 struct bootstage_data *data = gd->bootstage; in add_bootstages_devicetree() local
292 for (recnum = data->rec_count - 1, i = 0; recnum >= 0; recnum--, i++) { in add_bootstages_devicetree()
293 struct bootstage_record *rec = &data->record[recnum]; in add_bootstages_devicetree()
329 struct bootstage_data *data = gd->bootstage; in bootstage_report() local
330 struct bootstage_record *rec = data->record; in bootstage_report()
335 data->rec_count); in bootstage_report()
340 for (i = 1, rec++; i < data->rec_count; i++, rec++) { in bootstage_report()
344 if (data->rec_count > RECORD_COUNT) in bootstage_report()
347 data->rec_count - RECORD_COUNT); in bootstage_report()
350 for (i = 0, rec = data->record; i < data->rec_count; i++, rec++) { in bootstage_report()
367 static void append_data(char **ptrp, char *end, const void *data, int size) in append_data() argument
375 memcpy(ptr, data, size); in append_data()
380 const struct bootstage_data *data = gd->bootstage; in bootstage_stash() local
395 hdr->count = data->rec_count; in bootstage_stash()
398 hdr->next_id = data->next_id; in bootstage_stash()
402 for (rec = data->record, i = 0; i < data->rec_count; i++, rec++) in bootstage_stash()
406 for (rec = data->record, i = 0; i < data->rec_count; i++, rec++) { in bootstage_stash()
429 struct bootstage_data *data = gd->bootstage; in bootstage_unstash() local
466 if (data->rec_count + hdr->count > RECORD_COUNT) { in bootstage_unstash()
469 __func__, hdr->count, RECORD_COUNT - data->rec_count); in bootstage_unstash()
476 rec_size = hdr->count * sizeof(*data->record); in bootstage_unstash()
477 memcpy(data->record + data->rec_count, ptr, rec_size); in bootstage_unstash()
481 for (rec = data->record + data->next_id, i = 0; i < hdr->count; in bootstage_unstash()
492 data->rec_count += hdr->count; in bootstage_unstash()
493 data->next_id = hdr->next_id; in bootstage_unstash()
521 struct bootstage_data *data = gd->bootstage; in bootstage_get_size() local
525 for (rec = data->record, i = 0; i < data->rec_count; i++, rec++) in bootstage_get_size()
534 struct bootstage_data *data; in bootstage_init() local
540 data = gd->bootstage; in bootstage_init()
541 memset(data, '\0', size); in bootstage_init()
543 data->next_id = BOOTSTAGE_ID_USER; in bootstage_init()