Lines Matching +full:suspend +full:- +full:address

1 // SPDX-License-Identifier: GPL-2.0-only
4 * FPDT support for exporting boot and suspend/resume performance data
19 * performance data fields, for boot or suspend or resume phase.
31 u64 address; /* physical address of the S3PT/FBPT table */ member
83 return sprintf(buf, "%llu\n", record_##phase->name); \
90 FPDT_ATTR(suspend, suspend_start);
91 FPDT_ATTR(suspend, suspend_end);
101 return sprintf(buf, "%u\n", record_resume->resume_count); in resume_count_show()
127 .name = "suspend",
148 static bool fpdt_address_valid(u64 address) in fpdt_address_valid() argument
152 * with unsuppored high address bits set, check for this. in fpdt_address_valid()
154 return !(address >> boot_cpu_data.x86_phys_bits); in fpdt_address_valid()
157 static bool fpdt_address_valid(u64 address) in fpdt_address_valid() argument
163 static int fpdt_process_subtable(u64 address, u32 subtable_type) in fpdt_process_subtable() argument
171 if (!fpdt_address_valid(address)) { in fpdt_process_subtable()
172 pr_info(FW_BUG "invalid physical address: 0x%llx!\n", address); in fpdt_process_subtable()
173 return -EINVAL; in fpdt_process_subtable()
176 subtable_header = acpi_os_map_memory(address, sizeof(*subtable_header)); in fpdt_process_subtable()
178 return -ENOMEM; in fpdt_process_subtable()
180 if (strncmp((char *)&subtable_header->signature, signature, 4)) { in fpdt_process_subtable()
182 return -EINVAL; in fpdt_process_subtable()
185 length = subtable_header->length; in fpdt_process_subtable()
188 subtable_header = acpi_os_map_memory(address, length); in fpdt_process_subtable()
190 return -ENOMEM; in fpdt_process_subtable()
195 offset += record_header->length; in fpdt_process_subtable()
197 if (!record_header->length) { in fpdt_process_subtable()
198 pr_err(FW_BUG "Zero-length record found in FPTD.\n"); in fpdt_process_subtable()
199 result = -EINVAL; in fpdt_process_subtable()
203 switch (record_header->type) { in fpdt_process_subtable()
207 record_header->type, signature); in fpdt_process_subtable()
208 result = -EINVAL; in fpdt_process_subtable()
223 record_header->type, signature); in fpdt_process_subtable()
227 pr_err("Duplicate suspend performance record found.\n"); in fpdt_process_subtable()
238 record_header->type, signature); in fpdt_process_subtable()
239 result = -EINVAL; in fpdt_process_subtable()
287 result = -ENOMEM; in acpi_init_fpdt()
291 while (offset < header->length) { in acpi_init_fpdt()
293 switch (subtable->type) { in acpi_init_fpdt()
296 result = fpdt_process_subtable(subtable->address, in acpi_init_fpdt()
297 subtable->type); in acpi_init_fpdt()