Lines Matching defs:table_hdr

24 static struct acpi_subtable_header *fetch_pptt_subtable(struct acpi_table_header *table_hdr,
33 if (pptt_ref + sizeof(struct acpi_subtable_header) > table_hdr->length)
36 entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr, pptt_ref);
41 if (pptt_ref + entry->length > table_hdr->length)
47 static struct acpi_pptt_processor *fetch_pptt_node(struct acpi_table_header *table_hdr,
50 return (struct acpi_pptt_processor *)fetch_pptt_subtable(table_hdr, pptt_ref);
53 static struct acpi_pptt_cache *fetch_pptt_cache(struct acpi_table_header *table_hdr,
56 return (struct acpi_pptt_cache *)fetch_pptt_subtable(table_hdr, pptt_ref);
59 static struct acpi_subtable_header *acpi_get_pptt_resource(struct acpi_table_header *table_hdr,
71 return fetch_pptt_subtable(table_hdr, *ref);
82 * @table_hdr: Pointer to the head of the PPTT table
101 static unsigned int acpi_pptt_walk_cache(struct acpi_table_header *table_hdr,
130 cache = fetch_pptt_cache(table_hdr, cache->next_level_of_cache);
136 acpi_find_cache_level(struct acpi_table_header *table_hdr,
148 while ((res = acpi_get_pptt_resource(table_hdr, cpu_node, resource))) {
151 local_level = acpi_pptt_walk_cache(table_hdr, *starting_level,
169 * @table_hdr: Pointer to the head of the PPTT table
180 static int acpi_count_levels(struct acpi_table_header *table_hdr,
186 acpi_find_cache_level(table_hdr, cpu_node, &total_levels, 0, 0);
187 cpu_node = fetch_pptt_node(table_hdr, cpu_node->parent);
195 * @table_hdr: Pointer to the head of the PPTT table
204 static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr,
213 if (table_hdr->revision > 1)
216 table_end = (unsigned long)table_hdr + table_hdr->length;
217 node_entry = ACPI_PTR_DIFF(node, table_hdr);
218 entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,
238 * @table_hdr: Pointer to the head of the PPTT table
250 static struct acpi_pptt_processor *acpi_find_processor_node(struct acpi_table_header *table_hdr,
258 table_end = (unsigned long)table_hdr + table_hdr->length;
259 entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,
273 acpi_pptt_leaf_node(table_hdr, cpu_node)) {
284 static int acpi_find_cache_levels(struct acpi_table_header *table_hdr,
290 cpu = acpi_find_processor_node(table_hdr, acpi_cpu_id);
292 number_of_levels = acpi_count_levels(table_hdr, cpu);
319 static struct acpi_pptt_cache *acpi_find_cache_node(struct acpi_table_header *table_hdr,
333 cpu_node = acpi_find_processor_node(table_hdr, acpi_cpu_id);
336 found = acpi_find_cache_level(table_hdr, cpu_node,
339 cpu_node = fetch_pptt_node(table_hdr, cpu_node->parent);
436 static bool flag_identical(struct acpi_table_header *table_hdr,
442 if (table_hdr->revision < 2)
447 next = fetch_pptt_node(table_hdr, cpu->parent);
458 static struct acpi_pptt_processor *acpi_find_processor_tag(struct acpi_table_header *table_hdr,
467 if (flag_identical(table_hdr, cpu))
472 prev_node = fetch_pptt_node(table_hdr, cpu->parent);