diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-12-22 14:16:38 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-01-05 15:27:44 +1100 |
commit | e2a9e78a89c15844513a560d757e263406c3ba67 (patch) | |
tree | 87df6e0c656e487e59e8773d3f4e7d920271a014 /hw | |
parent | 406b25cdda90e29e6afe276a8c8df6a7cd90125d (diff) | |
download | skiboot-e2a9e78a89c15844513a560d757e263406c3ba67.zip skiboot-e2a9e78a89c15844513a560d757e263406c3ba67.tar.gz skiboot-e2a9e78a89c15844513a560d757e263406c3ba67.tar.bz2 |
xive: Keep track of which interrupts were ever enabled
In order to speed up xive reset
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xive.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -381,6 +381,11 @@ struct xive { uint32_t int_hw_bot; /* Bottom of HW allocation */ uint32_t int_ipi_top; /* Highest IPI handed out so far + 1 */ + /* We keep track of which interrupts were ever enabled to + * speed up xive_reset + */ + bitmap_t *int_enabled_map; + /* Embedded source IPIs */ struct xive_src ipis; }; @@ -2123,6 +2128,12 @@ static int64_t xive_set_irq_targetting(uint32_t isn, uint32_t target, /* Unmasking */ new_ive = ive->w & ~IVE_MASKED; xive_vdbg(x, "ISN %x unmasked !\n", isn); + + /* For normal interrupt sources, keep track of which ones + * we ever enabled since the last reset + */ + if (!is_escalation) + bitmap_set_bit(*x->int_enabled_map, GIRQ_TO_IDX(isn)); } /* Re-target the IVE. First find the EQ @@ -2399,8 +2410,11 @@ static void init_one_xive(struct dt_node *np) if (x->int_ipi_top < 0x10) x->int_ipi_top = 0x10; + /* Allocate a few bitmaps */ x->eq_map = zalloc(BITMAP_BYTES(MAX_EQ_COUNT >> 3)); assert(x->eq_map); + x->int_enabled_map = zalloc(BITMAP_BYTES(MAX_INT_ENTRIES)); + assert(x->int_enabled_map); xive_dbg(x, "Handling interrupts [%08x..%08x]\n", x->int_base, x->int_max - 1); |