• Home
  • Raw
  • Download

Lines Matching full:entry

95 	struct nvs_page *entry, *next;  in suspend_nvs_register()  local
103 entry = kzalloc(sizeof(struct nvs_page), GFP_KERNEL); in suspend_nvs_register()
104 if (!entry) in suspend_nvs_register()
107 list_add_tail(&entry->node, &nvs_list); in suspend_nvs_register()
108 entry->phys_start = start; in suspend_nvs_register()
110 entry->size = (size < nr_bytes) ? size : nr_bytes; in suspend_nvs_register()
112 start += entry->size; in suspend_nvs_register()
113 size -= entry->size; in suspend_nvs_register()
118 list_for_each_entry_safe(entry, next, &nvs_list, node) { in suspend_nvs_register()
119 list_del(&entry->node); in suspend_nvs_register()
120 kfree(entry); in suspend_nvs_register()
130 struct nvs_page *entry; in suspend_nvs_free() local
132 list_for_each_entry(entry, &nvs_list, node) in suspend_nvs_free()
133 if (entry->data) { in suspend_nvs_free()
134 free_page((unsigned long)entry->data); in suspend_nvs_free()
135 entry->data = NULL; in suspend_nvs_free()
136 if (entry->kaddr) { in suspend_nvs_free()
137 if (entry->unmap) { in suspend_nvs_free()
138 iounmap(entry->kaddr); in suspend_nvs_free()
139 entry->unmap = false; in suspend_nvs_free()
141 acpi_os_unmap_iomem(entry->kaddr, in suspend_nvs_free()
142 entry->size); in suspend_nvs_free()
144 entry->kaddr = NULL; in suspend_nvs_free()
154 struct nvs_page *entry; in suspend_nvs_alloc() local
156 list_for_each_entry(entry, &nvs_list, node) { in suspend_nvs_alloc()
157 entry->data = (void *)__get_free_page(GFP_KERNEL); in suspend_nvs_alloc()
158 if (!entry->data) { in suspend_nvs_alloc()
171 struct nvs_page *entry; in suspend_nvs_save() local
175 list_for_each_entry(entry, &nvs_list, node) in suspend_nvs_save()
176 if (entry->data) { in suspend_nvs_save()
177 unsigned long phys = entry->phys_start; in suspend_nvs_save()
178 unsigned int size = entry->size; in suspend_nvs_save()
180 entry->kaddr = acpi_os_get_iomem(phys, size); in suspend_nvs_save()
181 if (!entry->kaddr) { in suspend_nvs_save()
182 entry->kaddr = acpi_os_ioremap(phys, size); in suspend_nvs_save()
183 entry->unmap = !!entry->kaddr; in suspend_nvs_save()
185 if (!entry->kaddr) { in suspend_nvs_save()
189 memcpy(entry->data, entry->kaddr, entry->size); in suspend_nvs_save()
203 struct nvs_page *entry; in suspend_nvs_restore() local
207 list_for_each_entry(entry, &nvs_list, node) in suspend_nvs_restore()
208 if (entry->data) in suspend_nvs_restore()
209 memcpy(entry->kaddr, entry->data, entry->size); in suspend_nvs_restore()