Lines Matching +full:zero +full:- +full:initialised

1 // SPDX-License-Identifier: GPL-2.0-only
7 * Ubuntu project, hibernation support for mach-dove
11 * https://lists.linux-foundation.org/pipermail/linux-pm/2010-June/027422.html
57 /* hyp-stub vectors, used to restore el2 during resume from hibernate. */
61 * The logical cpu number we should resume on, initialised to a non-cpu
64 static int sleep_cpu = -EINVAL;
85 * re-configure el2.
95 memcpy(i->uts_version, init_utsname()->version, sizeof(i->uts_version)); in arch_hdr_invariants()
101 unsigned long nosave_end_pfn = sym_to_pfn(&__nosave_end - 1); in pfn_is_nosave()
121 return -EOVERFLOW; in arch_hibernation_header_save()
123 arch_hdr_invariants(&hdr->invariants); in arch_hibernation_header_save()
124 hdr->ttbr1_el1 = __pa_symbol(swapper_pg_dir); in arch_hibernation_header_save()
125 hdr->reenter_kernel = _cpu_resume; in arch_hibernation_header_save()
129 hdr->__hyp_stub_vectors = __pa_symbol(__hyp_stub_vectors); in arch_hibernation_header_save()
131 hdr->__hyp_stub_vectors = 0; in arch_hibernation_header_save()
136 return -ENODEV; in arch_hibernation_header_save()
138 hdr->sleep_cpu_mpidr = cpu_logical_map(sleep_cpu); in arch_hibernation_header_save()
140 hdr->sleep_cpu_mpidr); in arch_hibernation_header_save()
153 if (memcmp(&hdr->invariants, &invariants, sizeof(invariants))) { in arch_hibernation_header_restore()
155 return -EINVAL; in arch_hibernation_header_restore()
158 sleep_cpu = get_logical_index(hdr->sleep_cpu_mpidr); in arch_hibernation_header_restore()
160 hdr->sleep_cpu_mpidr); in arch_hibernation_header_restore()
163 sleep_cpu = -EINVAL; in arch_hibernation_header_restore()
164 return -EINVAL; in arch_hibernation_header_restore()
169 sleep_cpu = -EINVAL; in arch_hibernation_header_restore()
210 return -ENOMEM; in create_safe_exec_page()
223 * For a real hibernate/resume cycle TTBR0 currently points to a zero in create_safe_exec_page()
224 * page, but TLBs may contain stale ASID-tagged entries (e.g. for EFI in create_safe_exec_page()
225 * runtime services), while for a userspace-driven test_resume cycle it in create_safe_exec_page()
226 * points to userspace page tables (and we must point it at a zero page in create_safe_exec_page()
253 return -ENOMEM; in save_tags()
294 for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++) { in swsusp_mte_save_tags()
300 if (!test_bit(PG_mte_tagged, &page->flags)) in swsusp_mte_save_tags()
331 * at this point since the tags stored in page->flags are in swsusp_mte_restore_tags()
367 return -EBUSY; in swsusp_arch_suspend()
409 sleep_cpu = -EINVAL; in swsusp_arch_suspend()
455 * We need a zero page that is zero before & after resume in order to in swsusp_arch_resume()
460 pr_err("Failed to allocate zero page.\n"); in swsusp_arch_resume()
461 return -ENOMEM; in swsusp_arch_resume()
464 exit_size = __hibernate_exit_text_end - __hibernate_exit_text_start; in swsusp_arch_resume()
478 * be executed at el2 with the mmu off in order to reload hyp-stub. in swsusp_arch_resume()
491 el2_vectors += hibernate_el2_vectors - in swsusp_arch_resume()
508 return -ENODEV; in hibernate_resume_nonboot_cpu_disable()