[PATCH v1 2/6] rqchip/gic-v3-its: use temporary va / pa variables

From: Pavel Tatashin
Date: Mon Aug 26 2019 - 15:01:24 EST


This is a cleanup, that will help later when a variant that does not
require memremap is added.

Signed-off-by: Pavel Tatashin <pasha.tatashin@xxxxxxxxxx>
---
drivers/irqchip/irq-gic-v3-its.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index ada18748ed1c..656b6c6e1bf8 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1668,15 +1668,17 @@ static int gic_reserve_range(phys_addr_t addr, unsigned long size)
static int __init its_setup_lpi_prop_table(void)
{
if (gic_rdists->flags & RDIST_FLAGS_RD_TABLES_PREALLOCATED) {
+ unsigned long pa;
u64 val;
+ void *va;

val = gicr_read_propbaser(gic_data_rdist_rd_base() + GICR_PROPBASER);
lpi_id_bits = (val & GICR_PROPBASER_IDBITS_MASK) + 1;

- gic_rdists->prop_table_pa = val & GENMASK_ULL(51, 12);
- gic_rdists->prop_table_va = memremap(gic_rdists->prop_table_pa,
- LPI_PROPBASE_SZ,
- MEMREMAP_WB);
+ pa = val & GENMASK_ULL(51, 12);
+ va = memremap(pa, LPI_PROPBASE_SZ, MEMREMAP_WB);
+ gic_rdists->prop_table_pa = pa;
+ gic_rdists->prop_table_va = va;
} else {
struct page *page;

--
2.23.0