irqchip/gic-v3-its: Move LPI definitions around

The various LPI definitions are in the middle of the code, and
would be better placed at the beginning, given that we're going
to use some of them much earlier.

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>

+13 -12
+13 -12
drivers/irqchip/irq-gic-v3-its.c
··· 48 49 #define RDIST_FLAGS_PROPBASE_NEEDS_FLUSHING (1 << 0) 50 51 /* 52 * Collection structure - just an ID, and a redistributor address to 53 * ping. We use one per CPU as a bag of interrupts assigned to this ··· 714 715 static unsigned long *lpi_bitmap; 716 static u32 lpi_chunks; 717 - static u32 lpi_id_bits; 718 static DEFINE_SPINLOCK(lpi_lock); 719 720 static int its_lpi_to_chunk(int lpi) ··· 807 kfree(map->lpi_map); 808 kfree(map->col_map); 809 } 810 - 811 - /* 812 - * We allocate memory for PROPBASE to cover 2 ^ lpi_id_bits LPIs to 813 - * deal with (one configuration byte per interrupt). PENDBASE has to 814 - * be 64kB aligned (one bit per LPI, plus 8192 bits for SPI/PPI/SGI). 815 - */ 816 - #define LPI_NRBITS lpi_id_bits 817 - #define LPI_PROPBASE_SZ ALIGN(BIT(LPI_NRBITS), SZ_64K) 818 - #define LPI_PENDBASE_SZ ALIGN(BIT(LPI_NRBITS) / 8, SZ_64K) 819 - 820 - #define LPI_PROP_DEFAULT_PRIO 0xa0 821 822 static int __init its_alloc_lpi_tables(void) 823 {
··· 48 49 #define RDIST_FLAGS_PROPBASE_NEEDS_FLUSHING (1 << 0) 50 51 + static u32 lpi_id_bits; 52 + 53 + /* 54 + * We allocate memory for PROPBASE to cover 2 ^ lpi_id_bits LPIs to 55 + * deal with (one configuration byte per interrupt). PENDBASE has to 56 + * be 64kB aligned (one bit per LPI, plus 8192 bits for SPI/PPI/SGI). 57 + */ 58 + #define LPI_NRBITS lpi_id_bits 59 + #define LPI_PROPBASE_SZ ALIGN(BIT(LPI_NRBITS), SZ_64K) 60 + #define LPI_PENDBASE_SZ ALIGN(BIT(LPI_NRBITS) / 8, SZ_64K) 61 + 62 + #define LPI_PROP_DEFAULT_PRIO 0xa0 63 + 64 /* 65 * Collection structure - just an ID, and a redistributor address to 66 * ping. We use one per CPU as a bag of interrupts assigned to this ··· 701 702 static unsigned long *lpi_bitmap; 703 static u32 lpi_chunks; 704 static DEFINE_SPINLOCK(lpi_lock); 705 706 static int its_lpi_to_chunk(int lpi) ··· 795 kfree(map->lpi_map); 796 kfree(map->col_map); 797 } 798 799 static int __init its_alloc_lpi_tables(void) 800 {