@@ -637,10 +637,8 @@ static int __init find_isa_irq_pin(int irq, int type)
637
637
for (i = 0 ; i < mp_irq_entries ; i ++ ) {
638
638
int lbus = mp_irqs [i ].srcbus ;
639
639
640
- if (test_bit (lbus , mp_bus_not_pci ) &&
641
- (mp_irqs [i ].irqtype == type ) &&
640
+ if (test_bit (lbus , mp_bus_not_pci ) && (mp_irqs [i ].irqtype == type ) &&
642
641
(mp_irqs [i ].srcbusirq == irq ))
643
-
644
642
return mp_irqs [i ].dstirq ;
645
643
}
646
644
return -1 ;
@@ -653,8 +651,7 @@ static int __init find_isa_irq_apic(int irq, int type)
653
651
for (i = 0 ; i < mp_irq_entries ; i ++ ) {
654
652
int lbus = mp_irqs [i ].srcbus ;
655
653
656
- if (test_bit (lbus , mp_bus_not_pci ) &&
657
- (mp_irqs [i ].irqtype == type ) &&
654
+ if (test_bit (lbus , mp_bus_not_pci ) && (mp_irqs [i ].irqtype == type ) &&
658
655
(mp_irqs [i ].srcbusirq == irq ))
659
656
break ;
660
657
}
@@ -907,8 +904,7 @@ static int alloc_irq_from_domain(struct irq_domain *domain, int ioapic, u32 gsi,
907
904
return -1 ;
908
905
}
909
906
910
- return __irq_domain_alloc_irqs (domain , irq , 1 ,
911
- ioapic_alloc_attr_node (info ),
907
+ return __irq_domain_alloc_irqs (domain , irq , 1 , ioapic_alloc_attr_node (info ),
912
908
info , legacy , NULL );
913
909
}
914
910
@@ -922,13 +918,12 @@ static int alloc_irq_from_domain(struct irq_domain *domain, int ioapic, u32 gsi,
922
918
* PIRQs instead of reprogramming the interrupt routing logic. Thus there may be
923
919
* multiple pins sharing the same legacy IRQ number when ACPI is disabled.
924
920
*/
925
- static int alloc_isa_irq_from_domain (struct irq_domain * domain ,
926
- int irq , int ioapic , int pin ,
921
+ static int alloc_isa_irq_from_domain (struct irq_domain * domain , int irq , int ioapic , int pin ,
927
922
struct irq_alloc_info * info )
928
923
{
929
- struct mp_chip_data * data ;
930
924
struct irq_data * irq_data = irq_get_irq_data (irq );
931
925
int node = ioapic_alloc_attr_node (info );
926
+ struct mp_chip_data * data ;
932
927
933
928
/*
934
929
* Legacy ISA IRQ has already been allocated, just add pin to
@@ -942,8 +937,7 @@ static int alloc_isa_irq_from_domain(struct irq_domain *domain,
942
937
return - ENOMEM ;
943
938
} else {
944
939
info -> flags |= X86_IRQ_ALLOC_LEGACY ;
945
- irq = __irq_domain_alloc_irqs (domain , irq , 1 , node , info , true,
946
- NULL );
940
+ irq = __irq_domain_alloc_irqs (domain , irq , 1 , node , info , true, NULL );
947
941
if (irq >= 0 ) {
948
942
irq_data = irq_domain_get_irq_data (domain , irq );
949
943
data = irq_data -> chip_data ;
@@ -1121,8 +1115,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
1121
1115
return -1 ;
1122
1116
1123
1117
out :
1124
- return pin_2_irq (best_idx , best_ioapic , mp_irqs [best_idx ].dstirq ,
1125
- IOAPIC_MAP_ALLOC );
1118
+ return pin_2_irq (best_idx , best_ioapic , mp_irqs [best_idx ].dstirq , IOAPIC_MAP_ALLOC );
1126
1119
}
1127
1120
EXPORT_SYMBOL (IO_APIC_get_PCI_irq_vector );
1128
1121
@@ -1293,14 +1286,12 @@ void __init enable_IO_APIC(void)
1293
1286
* If the interrupt line is enabled and in ExtInt mode I
1294
1287
* have found the pin where the i8259 is connected.
1295
1288
*/
1296
- if (!entry .masked &&
1297
- entry .delivery_mode == APIC_DELIVERY_MODE_EXTINT ) {
1289
+ if (!entry .masked && entry .delivery_mode == APIC_DELIVERY_MODE_EXTINT ) {
1298
1290
ioapic_i8259 .apic = apic ;
1299
1291
ioapic_i8259 .pin = pin ;
1300
- goto found_i8259 ;
1292
+ break ;
1301
1293
}
1302
1294
}
1303
- found_i8259 :
1304
1295
1305
1296
/*
1306
1297
* Look to see what if the MP table has reported the ExtINT
@@ -1496,8 +1487,7 @@ static void __init delay_with_tsc(void)
1496
1487
do {
1497
1488
rep_nop ();
1498
1489
now = rdtsc ();
1499
- } while ((now - start ) < 40000000000ULL / HZ &&
1500
- time_before_eq (jiffies , end ));
1490
+ } while ((now - start ) < 40000000000ULL / HZ && time_before_eq (jiffies , end ));
1501
1491
}
1502
1492
1503
1493
static void __init delay_without_tsc (void )
@@ -1912,20 +1902,17 @@ static inline void init_IO_APIC_traps(void)
1912
1902
/*
1913
1903
* The local APIC irq-chip implementation:
1914
1904
*/
1915
-
1916
1905
static void mask_lapic_irq (struct irq_data * data )
1917
1906
{
1918
- unsigned long v ;
1907
+ unsigned long v = apic_read ( APIC_LVT0 ) ;
1919
1908
1920
- v = apic_read (APIC_LVT0 );
1921
1909
apic_write (APIC_LVT0 , v | APIC_LVT_MASKED );
1922
1910
}
1923
1911
1924
1912
static void unmask_lapic_irq (struct irq_data * data )
1925
1913
{
1926
- unsigned long v ;
1914
+ unsigned long v = apic_read ( APIC_LVT0 ) ;
1927
1915
1928
- v = apic_read (APIC_LVT0 );
1929
1916
apic_write (APIC_LVT0 , v & ~APIC_LVT_MASKED );
1930
1917
}
1931
1918
@@ -1944,8 +1931,7 @@ static struct irq_chip lapic_chip __read_mostly = {
1944
1931
static void lapic_register_intr (int irq )
1945
1932
{
1946
1933
irq_clear_status_flags (irq , IRQ_LEVEL );
1947
- irq_set_chip_and_handler_name (irq , & lapic_chip , handle_edge_irq ,
1948
- "edge" );
1934
+ irq_set_chip_and_handler_name (irq , & lapic_chip , handle_edge_irq , "edge" );
1949
1935
}
1950
1936
1951
1937
/*
@@ -2265,10 +2251,8 @@ static int mp_irqdomain_create(int ioapic)
2265
2251
return - ENOMEM ;
2266
2252
}
2267
2253
2268
- if (cfg -> type == IOAPIC_DOMAIN_LEGACY ||
2269
- cfg -> type == IOAPIC_DOMAIN_STRICT )
2270
- ioapic_dynirq_base = max (ioapic_dynirq_base ,
2271
- gsi_cfg -> gsi_end + 1 );
2254
+ if (cfg -> type == IOAPIC_DOMAIN_LEGACY || cfg -> type == IOAPIC_DOMAIN_STRICT )
2255
+ ioapic_dynirq_base = max (ioapic_dynirq_base , gsi_cfg -> gsi_end + 1 );
2272
2256
2273
2257
return 0 ;
2274
2258
}
@@ -2682,8 +2666,7 @@ static int find_free_ioapic_entry(void)
2682
2666
* @gsi_base: base of GSI associated with the IOAPIC
2683
2667
* @cfg: configuration information for the IOAPIC
2684
2668
*/
2685
- int mp_register_ioapic (int id , u32 address , u32 gsi_base ,
2686
- struct ioapic_domain_cfg * cfg )
2669
+ int mp_register_ioapic (int id , u32 address , u32 gsi_base , struct ioapic_domain_cfg * cfg )
2687
2670
{
2688
2671
bool hotplug = !!ioapic_initialized ;
2689
2672
struct mp_ioapic_gsi * gsi_cfg ;
@@ -2835,8 +2818,7 @@ static void mp_irqdomain_get_attr(u32 gsi, struct mp_chip_data *data,
2835
2818
if (info && info -> ioapic .valid ) {
2836
2819
data -> is_level = info -> ioapic .is_level ;
2837
2820
data -> active_low = info -> ioapic .active_low ;
2838
- } else if (__acpi_get_override_irq (gsi , & data -> is_level ,
2839
- & data -> active_low ) < 0 ) {
2821
+ } else if (__acpi_get_override_irq (gsi , & data -> is_level , & data -> active_low ) < 0 ) {
2840
2822
/* PCI interrupts are always active low level triggered. */
2841
2823
data -> is_level = true;
2842
2824
data -> active_low = true;
@@ -2956,8 +2938,7 @@ void mp_irqdomain_deactivate(struct irq_domain *domain,
2956
2938
struct irq_data * irq_data )
2957
2939
{
2958
2940
/* It won't be called for IRQ with multiple IOAPIC pins associated */
2959
- ioapic_mask_entry (mp_irqdomain_ioapic_idx (domain ),
2960
- (int )irq_data -> hwirq );
2941
+ ioapic_mask_entry (mp_irqdomain_ioapic_idx (domain ), (int )irq_data -> hwirq );
2961
2942
}
2962
2943
2963
2944
int mp_irqdomain_ioapic_idx (struct irq_domain * domain )
0 commit comments