Lines Matching full:entry
97 struct nvs_page *entry, *next; in suspend_nvs_register() local
105 entry = kzalloc(sizeof(struct nvs_page), GFP_KERNEL); in suspend_nvs_register()
106 if (!entry) in suspend_nvs_register()
109 list_add_tail(&entry->node, &nvs_list); in suspend_nvs_register()
110 entry->phys_start = start; in suspend_nvs_register()
112 entry->size = (size < nr_bytes) ? size : nr_bytes; in suspend_nvs_register()
114 start += entry->size; in suspend_nvs_register()
115 size -= entry->size; in suspend_nvs_register()
120 list_for_each_entry_safe(entry, next, &nvs_list, node) { in suspend_nvs_register()
121 list_del(&entry->node); in suspend_nvs_register()
122 kfree(entry); in suspend_nvs_register()
132 struct nvs_page *entry; in suspend_nvs_free() local
134 list_for_each_entry(entry, &nvs_list, node) in suspend_nvs_free()
135 if (entry->data) { in suspend_nvs_free()
136 free_page((unsigned long)entry->data); in suspend_nvs_free()
137 entry->data = NULL; in suspend_nvs_free()
138 if (entry->kaddr) { in suspend_nvs_free()
139 if (entry->unmap) { in suspend_nvs_free()
140 iounmap(entry->kaddr); in suspend_nvs_free()
141 entry->unmap = false; in suspend_nvs_free()
143 acpi_os_unmap_iomem(entry->kaddr, in suspend_nvs_free()
144 entry->size); in suspend_nvs_free()
146 entry->kaddr = NULL; in suspend_nvs_free()
156 struct nvs_page *entry; in suspend_nvs_alloc() local
158 list_for_each_entry(entry, &nvs_list, node) { in suspend_nvs_alloc()
159 entry->data = (void *)__get_free_page(GFP_KERNEL); in suspend_nvs_alloc()
160 if (!entry->data) { in suspend_nvs_alloc()
173 struct nvs_page *entry; in suspend_nvs_save() local
177 list_for_each_entry(entry, &nvs_list, node) in suspend_nvs_save()
178 if (entry->data) { in suspend_nvs_save()
179 unsigned long phys = entry->phys_start; in suspend_nvs_save()
180 unsigned int size = entry->size; in suspend_nvs_save()
182 entry->kaddr = acpi_os_get_iomem(phys, size); in suspend_nvs_save()
183 if (!entry->kaddr) { in suspend_nvs_save()
184 entry->kaddr = acpi_os_ioremap(phys, size); in suspend_nvs_save()
185 entry->unmap = !!entry->kaddr; in suspend_nvs_save()
187 if (!entry->kaddr) { in suspend_nvs_save()
191 memcpy(entry->data, entry->kaddr, entry->size); in suspend_nvs_save()
205 struct nvs_page *entry; in suspend_nvs_restore() local
209 list_for_each_entry(entry, &nvs_list, node) in suspend_nvs_restore()
210 if (entry->data) in suspend_nvs_restore()
211 memcpy(entry->kaddr, entry->data, entry->size); in suspend_nvs_restore()