Lines Matching refs:table_hdr
24 static struct acpi_subtable_header *fetch_pptt_subtable(struct acpi_table_header *table_hdr, in fetch_pptt_subtable() argument
33 if (pptt_ref + sizeof(struct acpi_subtable_header) > table_hdr->length) in fetch_pptt_subtable()
36 entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr, pptt_ref); in fetch_pptt_subtable()
41 if (pptt_ref + entry->length > table_hdr->length) in fetch_pptt_subtable()
47 static struct acpi_pptt_processor *fetch_pptt_node(struct acpi_table_header *table_hdr, in fetch_pptt_node() argument
50 return (struct acpi_pptt_processor *)fetch_pptt_subtable(table_hdr, pptt_ref); in fetch_pptt_node()
53 static struct acpi_pptt_cache *fetch_pptt_cache(struct acpi_table_header *table_hdr, in fetch_pptt_cache() argument
56 return (struct acpi_pptt_cache *)fetch_pptt_subtable(table_hdr, pptt_ref); in fetch_pptt_cache()
59 static struct acpi_subtable_header *acpi_get_pptt_resource(struct acpi_table_header *table_hdr, in acpi_get_pptt_resource() argument
71 return fetch_pptt_subtable(table_hdr, *ref); in acpi_get_pptt_resource()
102 static unsigned int acpi_pptt_walk_cache(struct acpi_table_header *table_hdr, in acpi_pptt_walk_cache() argument
119 cache = fetch_pptt_cache(table_hdr, cache->next_level_of_cache); in acpi_pptt_walk_cache()
141 cache = fetch_pptt_cache(table_hdr, cache->next_level_of_cache); in acpi_pptt_walk_cache()
147 acpi_find_cache_level(struct acpi_table_header *table_hdr, in acpi_find_cache_level() argument
159 while ((res = acpi_get_pptt_resource(table_hdr, cpu_node, resource))) { in acpi_find_cache_level()
162 local_level = acpi_pptt_walk_cache(table_hdr, *starting_level, in acpi_find_cache_level()
195 static void acpi_count_levels(struct acpi_table_header *table_hdr, in acpi_count_levels() argument
200 acpi_find_cache_level(table_hdr, cpu_node, levels, split_levels, 0, 0); in acpi_count_levels()
201 cpu_node = fetch_pptt_node(table_hdr, cpu_node->parent); in acpi_count_levels()
216 static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr, in acpi_pptt_leaf_node() argument
225 if (table_hdr->revision > 1) in acpi_pptt_leaf_node()
228 table_end = (unsigned long)table_hdr + table_hdr->length; in acpi_pptt_leaf_node()
229 node_entry = ACPI_PTR_DIFF(node, table_hdr); in acpi_pptt_leaf_node()
230 entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr, in acpi_pptt_leaf_node()
262 static struct acpi_pptt_processor *acpi_find_processor_node(struct acpi_table_header *table_hdr, in acpi_find_processor_node() argument
270 table_end = (unsigned long)table_hdr + table_hdr->length; in acpi_find_processor_node()
271 entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr, in acpi_find_processor_node()
285 acpi_pptt_leaf_node(table_hdr, cpu_node)) { in acpi_find_processor_node()
318 static struct acpi_pptt_cache *acpi_find_cache_node(struct acpi_table_header *table_hdr, in acpi_find_cache_node() argument
332 cpu_node = acpi_find_processor_node(table_hdr, acpi_cpu_id); in acpi_find_cache_node()
335 found = acpi_find_cache_level(table_hdr, cpu_node, in acpi_find_cache_node()
338 cpu_node = fetch_pptt_node(table_hdr, cpu_node->parent); in acpi_find_cache_node()
446 static bool flag_identical(struct acpi_table_header *table_hdr, in flag_identical() argument
452 if (table_hdr->revision < 2) in flag_identical()
457 next = fetch_pptt_node(table_hdr, cpu->parent); in flag_identical()
468 static struct acpi_pptt_processor *acpi_find_processor_tag(struct acpi_table_header *table_hdr, in acpi_find_processor_tag() argument
477 if (flag_identical(table_hdr, cpu)) in acpi_find_processor_tag()
482 prev_node = fetch_pptt_node(table_hdr, cpu->parent); in acpi_find_processor_tag()