• Home
  • Raw
  • Download

Lines Matching refs:entry

43 static ssize_t start_show(struct firmware_map_entry *entry, char *buf);
44 static ssize_t end_show(struct firmware_map_entry *entry, char *buf);
45 static ssize_t type_show(struct firmware_map_entry *entry, char *buf);
56 ssize_t (*show)(struct firmware_map_entry *entry, char *buf);
100 struct firmware_map_entry *entry = to_memmap_entry(kobj); in release_firmware_map_entry() local
102 if (PageReserved(virt_to_page(entry))) { in release_firmware_map_entry()
110 list_add(&entry->list, &map_entries_bootmem); in release_firmware_map_entry()
116 kfree(entry); in release_firmware_map_entry()
144 struct firmware_map_entry *entry) in firmware_map_add_entry() argument
148 entry->start = start; in firmware_map_add_entry()
149 entry->end = end - 1; in firmware_map_add_entry()
150 entry->type = type; in firmware_map_add_entry()
151 INIT_LIST_HEAD(&entry->list); in firmware_map_add_entry()
152 kobject_init(&entry->kobj, &memmap_ktype); in firmware_map_add_entry()
155 list_add_tail(&entry->list, &map_entries); in firmware_map_add_entry()
168 static inline void firmware_map_remove_entry(struct firmware_map_entry *entry) in firmware_map_remove_entry() argument
170 list_del(&entry->list); in firmware_map_remove_entry()
176 static int add_sysfs_fw_map_entry(struct firmware_map_entry *entry) in add_sysfs_fw_map_entry() argument
181 if (entry->kobj.state_in_sysfs) in add_sysfs_fw_map_entry()
190 entry->kobj.kset = mmap_kset; in add_sysfs_fw_map_entry()
191 if (kobject_add(&entry->kobj, NULL, "%d", map_entries_nr++)) in add_sysfs_fw_map_entry()
192 kobject_put(&entry->kobj); in add_sysfs_fw_map_entry()
200 static inline void remove_sysfs_fw_map_entry(struct firmware_map_entry *entry) in remove_sysfs_fw_map_entry() argument
202 kobject_put(&entry->kobj); in remove_sysfs_fw_map_entry()
222 struct firmware_map_entry *entry; in firmware_map_find_entry_in_list() local
224 list_for_each_entry(entry, list, list) in firmware_map_find_entry_in_list()
225 if ((entry->start == start) && (entry->end == end) && in firmware_map_find_entry_in_list()
226 (!strcmp(entry->type, type))) { in firmware_map_find_entry_in_list()
227 return entry; in firmware_map_find_entry_in_list()
284 struct firmware_map_entry *entry; in firmware_map_add_hotplug() local
286 entry = firmware_map_find_entry(start, end - 1, type); in firmware_map_add_hotplug()
287 if (entry) in firmware_map_add_hotplug()
290 entry = firmware_map_find_entry_bootmem(start, end - 1, type); in firmware_map_add_hotplug()
291 if (!entry) { in firmware_map_add_hotplug()
292 entry = kzalloc(sizeof(struct firmware_map_entry), GFP_ATOMIC); in firmware_map_add_hotplug()
293 if (!entry) in firmware_map_add_hotplug()
298 list_del(&entry->list); in firmware_map_add_hotplug()
301 memset(entry, 0, sizeof(*entry)); in firmware_map_add_hotplug()
304 firmware_map_add_entry(start, end, type, entry); in firmware_map_add_hotplug()
306 add_sysfs_fw_map_entry(entry); in firmware_map_add_hotplug()
326 struct firmware_map_entry *entry; in firmware_map_add_early() local
328 entry = memblock_alloc(sizeof(struct firmware_map_entry), in firmware_map_add_early()
330 if (WARN_ON(!entry)) in firmware_map_add_early()
333 return firmware_map_add_entry(start, end, type, entry); in firmware_map_add_early()
348 struct firmware_map_entry *entry; in firmware_map_remove() local
351 entry = firmware_map_find_entry(start, end - 1, type); in firmware_map_remove()
352 if (!entry) { in firmware_map_remove()
357 firmware_map_remove_entry(entry); in firmware_map_remove()
361 remove_sysfs_fw_map_entry(entry); in firmware_map_remove()
370 static ssize_t start_show(struct firmware_map_entry *entry, char *buf) in start_show() argument
373 (unsigned long long)entry->start); in start_show()
376 static ssize_t end_show(struct firmware_map_entry *entry, char *buf) in end_show() argument
379 (unsigned long long)entry->end); in end_show()
382 static ssize_t type_show(struct firmware_map_entry *entry, char *buf) in type_show() argument
384 return snprintf(buf, PAGE_SIZE, "%s\n", entry->type); in type_show()
395 struct firmware_map_entry *entry = to_memmap_entry(kobj); in memmap_attr_show() local
398 return memmap_attr->show(entry, buf); in memmap_attr_show()
411 struct firmware_map_entry *entry; in firmware_memmap_init() local
413 list_for_each_entry(entry, &map_entries, list) in firmware_memmap_init()
414 add_sysfs_fw_map_entry(entry); in firmware_memmap_init()