Lines Matching refs:ent
127 struct kcore_list *ent; in kcore_ram_list() local
129 ent = kmalloc(sizeof(*ent), GFP_KERNEL); in kcore_ram_list()
130 if (!ent) in kcore_ram_list()
132 ent->addr = (unsigned long)__va(0); in kcore_ram_list()
133 ent->size = max_low_pfn << PAGE_SHIFT; in kcore_ram_list()
134 ent->type = KCORE_RAM; in kcore_ram_list()
135 list_add(&ent->list, head); in kcore_ram_list()
144 get_sparsemem_vmemmap_info(struct kcore_list *ent, struct list_head *head) in get_sparsemem_vmemmap_info() argument
146 unsigned long pfn = __pa(ent->addr) >> PAGE_SHIFT; in get_sparsemem_vmemmap_info()
147 unsigned long nr_pages = ent->size >> PAGE_SHIFT; in get_sparsemem_vmemmap_info()
177 get_sparsemem_vmemmap_info(struct kcore_list *ent, struct list_head *head) in get_sparsemem_vmemmap_info() argument
188 struct kcore_list *ent; in kclist_add_private() local
196 ent = kmalloc(sizeof(*ent), GFP_KERNEL); in kclist_add_private()
197 if (!ent) in kclist_add_private()
199 ent->addr = (unsigned long)page_to_virt(p); in kclist_add_private()
200 ent->size = nr_pages << PAGE_SHIFT; in kclist_add_private()
202 if (!virt_addr_valid((void *)ent->addr)) in kclist_add_private()
206 if (ULONG_MAX - ent->addr < ent->size) in kclist_add_private()
207 ent->size = ULONG_MAX - ent->addr; in kclist_add_private()
214 if (VMALLOC_START > ent->addr) { in kclist_add_private()
215 if (VMALLOC_START - ent->addr < ent->size) in kclist_add_private()
216 ent->size = VMALLOC_START - ent->addr; in kclist_add_private()
219 ent->type = KCORE_RAM; in kclist_add_private()
220 list_add_tail(&ent->list, head); in kclist_add_private()
222 if (!get_sparsemem_vmemmap_info(ent, head)) { in kclist_add_private()
223 list_del(&ent->list); in kclist_add_private()
229 kfree(ent); in kclist_add_private()