[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190826190056.27854-2-pasha.tatashin@soleen.com>
Date: Mon, 26 Aug 2019 15:00:51 -0400
From: Pavel Tatashin <pasha.tatashin@...een.com>
To: pasha.tatashin@...een.com, jmorris@...ei.org, sashal@...nel.org,
kexec@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, marc.zyngier@....com,
james.morse@....com, vladimir.murzin@....com, mark.rutland@....com
Subject: [PATCH v1 1/6] rqchip/gic-v3-its: reset prop table outside of allocation
In preparation of adding another variant of allocation, move
the resetting outside of the current allocator.
Signed-off-by: Pavel Tatashin <pasha.tatashin@...een.com>
---
drivers/irqchip/irq-gic-v3-its.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 1b5c3672aea2..ada18748ed1c 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1621,15 +1621,7 @@ static void gic_reset_prop_table(void *va)
static struct page *its_allocate_prop_table(gfp_t gfp_flags)
{
- struct page *prop_page;
-
- prop_page = alloc_pages(gfp_flags, get_order(LPI_PROPBASE_SZ));
- if (!prop_page)
- return NULL;
-
- gic_reset_prop_table(page_address(prop_page));
-
- return prop_page;
+ return alloc_pages(gfp_flags, get_order(LPI_PROPBASE_SZ));
}
static void its_free_prop_table(struct page *prop_page)
@@ -1685,7 +1677,6 @@ static int __init its_setup_lpi_prop_table(void)
gic_rdists->prop_table_va = memremap(gic_rdists->prop_table_pa,
LPI_PROPBASE_SZ,
MEMREMAP_WB);
- gic_reset_prop_table(gic_rdists->prop_table_va);
} else {
struct page *page;
@@ -1703,6 +1694,7 @@ static int __init its_setup_lpi_prop_table(void)
WARN_ON(gic_reserve_range(gic_rdists->prop_table_pa,
LPI_PROPBASE_SZ));
}
+ gic_reset_prop_table(gic_rdists->prop_table_va);
pr_info("GICv3: using LPI property table @%pa\n",
&gic_rdists->prop_table_pa);
@@ -3079,6 +3071,7 @@ static int its_vpe_irq_domain_alloc(struct irq_domain *domain, unsigned int virq
its_lpi_free(bitmap, base, nr_ids);
return -ENOMEM;
}
+ gic_reset_prop_table(page_address(vprop_page));
vm->db_bitmap = bitmap;
vm->db_lpi_base = base;
--
2.23.0
Powered by blists - more mailing lists