Skip to content

Commit 966e09b

Browse files
committed
x86/ioapic: Cleanup line breaks
80 character limit is history. Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Qiuxu Zhuo <[email protected]> Tested-by: Breno Leitao <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 4bcfdf7 commit 966e09b

File tree

1 file changed

+18
-37
lines changed

1 file changed

+18
-37
lines changed

arch/x86/kernel/apic/io_apic.c

Lines changed: 18 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -637,10 +637,8 @@ static int __init find_isa_irq_pin(int irq, int type)
637637
for (i = 0; i < mp_irq_entries; i++) {
638638
int lbus = mp_irqs[i].srcbus;
639639

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) &&
642641
(mp_irqs[i].srcbusirq == irq))
643-
644642
return mp_irqs[i].dstirq;
645643
}
646644
return -1;
@@ -653,8 +651,7 @@ static int __init find_isa_irq_apic(int irq, int type)
653651
for (i = 0; i < mp_irq_entries; i++) {
654652
int lbus = mp_irqs[i].srcbus;
655653

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) &&
658655
(mp_irqs[i].srcbusirq == irq))
659656
break;
660657
}
@@ -907,8 +904,7 @@ static int alloc_irq_from_domain(struct irq_domain *domain, int ioapic, u32 gsi,
907904
return -1;
908905
}
909906

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),
912908
info, legacy, NULL);
913909
}
914910

@@ -922,13 +918,12 @@ static int alloc_irq_from_domain(struct irq_domain *domain, int ioapic, u32 gsi,
922918
* PIRQs instead of reprogramming the interrupt routing logic. Thus there may be
923919
* multiple pins sharing the same legacy IRQ number when ACPI is disabled.
924920
*/
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,
927922
struct irq_alloc_info *info)
928923
{
929-
struct mp_chip_data *data;
930924
struct irq_data *irq_data = irq_get_irq_data(irq);
931925
int node = ioapic_alloc_attr_node(info);
926+
struct mp_chip_data *data;
932927

933928
/*
934929
* 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,
942937
return -ENOMEM;
943938
} else {
944939
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);
947941
if (irq >= 0) {
948942
irq_data = irq_domain_get_irq_data(domain, irq);
949943
data = irq_data->chip_data;
@@ -1121,8 +1115,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
11211115
return -1;
11221116

11231117
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);
11261119
}
11271120
EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
11281121

@@ -1293,14 +1286,12 @@ void __init enable_IO_APIC(void)
12931286
* If the interrupt line is enabled and in ExtInt mode I
12941287
* have found the pin where the i8259 is connected.
12951288
*/
1296-
if (!entry.masked &&
1297-
entry.delivery_mode == APIC_DELIVERY_MODE_EXTINT) {
1289+
if (!entry.masked && entry.delivery_mode == APIC_DELIVERY_MODE_EXTINT) {
12981290
ioapic_i8259.apic = apic;
12991291
ioapic_i8259.pin = pin;
1300-
goto found_i8259;
1292+
break;
13011293
}
13021294
}
1303-
found_i8259:
13041295

13051296
/*
13061297
* Look to see what if the MP table has reported the ExtINT
@@ -1496,8 +1487,7 @@ static void __init delay_with_tsc(void)
14961487
do {
14971488
rep_nop();
14981489
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));
15011491
}
15021492

15031493
static void __init delay_without_tsc(void)
@@ -1912,20 +1902,17 @@ static inline void init_IO_APIC_traps(void)
19121902
/*
19131903
* The local APIC irq-chip implementation:
19141904
*/
1915-
19161905
static void mask_lapic_irq(struct irq_data *data)
19171906
{
1918-
unsigned long v;
1907+
unsigned long v = apic_read(APIC_LVT0);
19191908

1920-
v = apic_read(APIC_LVT0);
19211909
apic_write(APIC_LVT0, v | APIC_LVT_MASKED);
19221910
}
19231911

19241912
static void unmask_lapic_irq(struct irq_data *data)
19251913
{
1926-
unsigned long v;
1914+
unsigned long v = apic_read(APIC_LVT0);
19271915

1928-
v = apic_read(APIC_LVT0);
19291916
apic_write(APIC_LVT0, v & ~APIC_LVT_MASKED);
19301917
}
19311918

@@ -1944,8 +1931,7 @@ static struct irq_chip lapic_chip __read_mostly = {
19441931
static void lapic_register_intr(int irq)
19451932
{
19461933
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");
19491935
}
19501936

19511937
/*
@@ -2265,10 +2251,8 @@ static int mp_irqdomain_create(int ioapic)
22652251
return -ENOMEM;
22662252
}
22672253

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);
22722256

22732257
return 0;
22742258
}
@@ -2682,8 +2666,7 @@ static int find_free_ioapic_entry(void)
26822666
* @gsi_base: base of GSI associated with the IOAPIC
26832667
* @cfg: configuration information for the IOAPIC
26842668
*/
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)
26872670
{
26882671
bool hotplug = !!ioapic_initialized;
26892672
struct mp_ioapic_gsi *gsi_cfg;
@@ -2835,8 +2818,7 @@ static void mp_irqdomain_get_attr(u32 gsi, struct mp_chip_data *data,
28352818
if (info && info->ioapic.valid) {
28362819
data->is_level = info->ioapic.is_level;
28372820
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) {
28402822
/* PCI interrupts are always active low level triggered. */
28412823
data->is_level = true;
28422824
data->active_low = true;
@@ -2956,8 +2938,7 @@ void mp_irqdomain_deactivate(struct irq_domain *domain,
29562938
struct irq_data *irq_data)
29572939
{
29582940
/* 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);
29612942
}
29622943

29632944
int mp_irqdomain_ioapic_idx(struct irq_domain *domain)

0 commit comments

Comments
 (0)