@@ -264,12 +264,14 @@ static __attribute_const__ struct io_apic __iomem *io_apic_base(int idx)
264
264
static inline void io_apic_eoi (unsigned int apic , unsigned int vector )
265
265
{
266
266
struct io_apic __iomem * io_apic = io_apic_base (apic );
267
+
267
268
writel (vector , & io_apic -> eoi );
268
269
}
269
270
270
271
unsigned int native_io_apic_read (unsigned int apic , unsigned int reg )
271
272
{
272
273
struct io_apic __iomem * io_apic = io_apic_base (apic );
274
+
273
275
writel (reg , & io_apic -> index );
274
276
return readl (& io_apic -> data );
275
277
}
@@ -880,9 +882,9 @@ static bool mp_check_pin_attr(int irq, struct irq_alloc_info *info)
880
882
static int alloc_irq_from_domain (struct irq_domain * domain , int ioapic , u32 gsi ,
881
883
struct irq_alloc_info * info )
882
884
{
885
+ int type = ioapics [ioapic ].irqdomain_cfg .type ;
883
886
bool legacy = false;
884
887
int irq = -1 ;
885
- int type = ioapics [ioapic ].irqdomain_cfg .type ;
886
888
887
889
switch (type ) {
888
890
case IOAPIC_DOMAIN_LEGACY :
@@ -951,11 +953,11 @@ static int alloc_isa_irq_from_domain(struct irq_domain *domain, int irq, int ioa
951
953
static int mp_map_pin_to_irq (u32 gsi , int idx , int ioapic , int pin ,
952
954
unsigned int flags , struct irq_alloc_info * info )
953
955
{
954
- int irq ;
955
- bool legacy = false;
956
+ struct irq_domain * domain = mp_ioapic_irqdomain (ioapic );
956
957
struct irq_alloc_info tmp ;
957
958
struct mp_chip_data * data ;
958
- struct irq_domain * domain = mp_ioapic_irqdomain (ioapic );
959
+ bool legacy = false;
960
+ int irq ;
959
961
960
962
if (!domain )
961
963
return - ENOSYS ;
@@ -1269,8 +1271,7 @@ static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
1269
1271
1270
1272
void __init enable_IO_APIC (void )
1271
1273
{
1272
- int i8259_apic , i8259_pin ;
1273
- int apic , pin ;
1274
+ int i8259_apic , i8259_pin , apic , pin ;
1274
1275
1275
1276
if (ioapic_is_disabled )
1276
1277
nr_ioapics = 0 ;
@@ -1943,9 +1944,9 @@ static void lapic_register_intr(int irq)
1943
1944
*/
1944
1945
static inline void __init unlock_ExtINT_logic (void )
1945
1946
{
1946
- int apic , pin , i ;
1947
- struct IO_APIC_route_entry entry0 , entry1 ;
1948
1947
unsigned char save_control , save_freq_select ;
1948
+ struct IO_APIC_route_entry entry0 , entry1 ;
1949
+ int apic , pin , i ;
1949
1950
u32 apic_id ;
1950
1951
1951
1952
pin = find_isa_irq_pin (8 , mp_INT );
@@ -2211,11 +2212,11 @@ static inline void __init check_timer(void)
2211
2212
2212
2213
static int mp_irqdomain_create (int ioapic )
2213
2214
{
2214
- struct irq_domain * parent ;
2215
+ struct mp_ioapic_gsi * gsi_cfg = mp_ioapic_gsi_routing ( ioapic ) ;
2215
2216
int hwirqs = mp_ioapic_pin_count (ioapic );
2216
2217
struct ioapic * ip = & ioapics [ioapic ];
2217
2218
struct ioapic_domain_cfg * cfg = & ip -> irqdomain_cfg ;
2218
- struct mp_ioapic_gsi * gsi_cfg = mp_ioapic_gsi_routing ( ioapic ) ;
2219
+ struct irq_domain * parent ;
2219
2220
struct fwnode_handle * fn ;
2220
2221
struct irq_fwspec fwspec ;
2221
2222
@@ -2491,8 +2492,8 @@ static struct resource *ioapic_resources;
2491
2492
2492
2493
static struct resource * __init ioapic_setup_resources (void )
2493
2494
{
2494
- unsigned long n ;
2495
2495
struct resource * res ;
2496
+ unsigned long n ;
2496
2497
char * mem ;
2497
2498
int i ;
2498
2499
0 commit comments