Lines Matching full:area
109 struct ptcal_area *area; in cbe_ptcal_enable_on_node() local
116 area = kmalloc(sizeof(*area), GFP_KERNEL); in cbe_ptcal_enable_on_node()
117 if (!area) in cbe_ptcal_enable_on_node()
120 area->nid = nid; in cbe_ptcal_enable_on_node()
121 area->order = order; in cbe_ptcal_enable_on_node()
122 area->pages = __alloc_pages_node(area->nid, in cbe_ptcal_enable_on_node()
124 area->order); in cbe_ptcal_enable_on_node()
126 if (!area->pages) { in cbe_ptcal_enable_on_node()
128 __func__, area->nid); in cbe_ptcal_enable_on_node()
133 * We move the ptcal area to the middle of the allocated in cbe_ptcal_enable_on_node()
137 addr = __pa(page_address(area->pages)) + (PAGE_SIZE >> 1); in cbe_ptcal_enable_on_node()
139 __func__, area->nid, addr); in cbe_ptcal_enable_on_node()
142 if (rtas_call(ptcal_start_tok, 3, 1, NULL, area->nid, in cbe_ptcal_enable_on_node()
150 list_add(&area->list, &ptcal_list); in cbe_ptcal_enable_on_node()
155 __free_pages(area->pages, area->order); in cbe_ptcal_enable_on_node()
157 kfree(area); in cbe_ptcal_enable_on_node()
208 struct ptcal_area *area, *tmp; in cbe_ptcal_disable() local
213 list_for_each_entry_safe(area, tmp, &ptcal_list, list) { in cbe_ptcal_disable()
215 if (rtas_call(ptcal_stop_tok, 1, 1, NULL, area->nid)) { in cbe_ptcal_disable()
218 area->nid); in cbe_ptcal_disable()
223 /* ensure we can access the PTCAL area */ in cbe_ptcal_disable()
224 memset(page_address(area->pages), 0, in cbe_ptcal_disable()
225 1 << (area->order + PAGE_SHIFT)); in cbe_ptcal_disable()
228 list_del(&area->list); in cbe_ptcal_disable()
229 __free_pages(area->pages, area->order); in cbe_ptcal_disable()
230 kfree(area); in cbe_ptcal_disable()