@@ -1999,15 +1999,7 @@ static void gic_reset_pending_table(void *va)
static struct page *its_allocate_pending_table(gfp_t gfp_flags)
{
- struct page *pend_page;
-
- pend_page = alloc_pages(gfp_flags, get_order(LPI_PENDBASE_SZ));
- if (!pend_page)
- return NULL;
-
- gic_reset_pending_table(page_address(pend_page));
-
- return pend_page;
+ return alloc_pages(gfp_flags, get_order(LPI_PENDBASE_SZ));
}
static void its_free_pending_table(struct page *pt)
@@ -2064,6 +2056,7 @@ static int __init allocate_lpi_tables(void)
pr_err("Failed to allocate PENDBASE for CPU%d\n", cpu);
return -ENOMEM;
}
+ gic_reset_pending_table(page_address(pend_page));
gic_data_rdist_cpu(cpu)->pend_page = pend_page;
}
@@ -3007,6 +3000,7 @@ static int its_vpe_init(struct its_vpe *vpe)
its_vpe_id_free(vpe_id);
return -ENOMEM;
}
+ gic_reset_pending_table(page_address(vpt_page));
if (!its_alloc_vpe_table(vpe_id)) {
its_vpe_id_free(vpe_id);
Again, in preparation of adding a new allocator, move the reset function outside of the current allocator. Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com> --- drivers/irqchip/irq-gic-v3-its.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)