Commit 966e09b1 authored by Thomas Gleixner's avatar Thomas Gleixner

x86/ioapic: Cleanup line breaks

80 character limit is history.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Tested-by: default avatarQiuxu Zhuo <qiuxu.zhuo@intel.com>
Tested-by: default avatarBreno Leitao <leitao@debian.org>
Link: https://lore.kernel.org/all/20240802155441.095653193@linutronix.de
parent 4bcfdf76
...@@ -637,10 +637,8 @@ static int __init find_isa_irq_pin(int irq, int type) ...@@ -637,10 +637,8 @@ static int __init find_isa_irq_pin(int irq, int type)
for (i = 0; i < mp_irq_entries; i++) { for (i = 0; i < mp_irq_entries; i++) {
int lbus = mp_irqs[i].srcbus; int lbus = mp_irqs[i].srcbus;
if (test_bit(lbus, mp_bus_not_pci) && if (test_bit(lbus, mp_bus_not_pci) && (mp_irqs[i].irqtype == type) &&
(mp_irqs[i].irqtype == type) &&
(mp_irqs[i].srcbusirq == irq)) (mp_irqs[i].srcbusirq == irq))
return mp_irqs[i].dstirq; return mp_irqs[i].dstirq;
} }
return -1; return -1;
...@@ -653,8 +651,7 @@ static int __init find_isa_irq_apic(int irq, int type) ...@@ -653,8 +651,7 @@ static int __init find_isa_irq_apic(int irq, int type)
for (i = 0; i < mp_irq_entries; i++) { for (i = 0; i < mp_irq_entries; i++) {
int lbus = mp_irqs[i].srcbus; int lbus = mp_irqs[i].srcbus;
if (test_bit(lbus, mp_bus_not_pci) && if (test_bit(lbus, mp_bus_not_pci) && (mp_irqs[i].irqtype == type) &&
(mp_irqs[i].irqtype == type) &&
(mp_irqs[i].srcbusirq == irq)) (mp_irqs[i].srcbusirq == irq))
break; break;
} }
...@@ -907,8 +904,7 @@ static int alloc_irq_from_domain(struct irq_domain *domain, int ioapic, u32 gsi, ...@@ -907,8 +904,7 @@ static int alloc_irq_from_domain(struct irq_domain *domain, int ioapic, u32 gsi,
return -1; return -1;
} }
return __irq_domain_alloc_irqs(domain, irq, 1, return __irq_domain_alloc_irqs(domain, irq, 1, ioapic_alloc_attr_node(info),
ioapic_alloc_attr_node(info),
info, legacy, NULL); info, legacy, NULL);
} }
...@@ -922,13 +918,12 @@ static int alloc_irq_from_domain(struct irq_domain *domain, int ioapic, u32 gsi, ...@@ -922,13 +918,12 @@ static int alloc_irq_from_domain(struct irq_domain *domain, int ioapic, u32 gsi,
* PIRQs instead of reprogramming the interrupt routing logic. Thus there may be * PIRQs instead of reprogramming the interrupt routing logic. Thus there may be
* multiple pins sharing the same legacy IRQ number when ACPI is disabled. * multiple pins sharing the same legacy IRQ number when ACPI is disabled.
*/ */
static int alloc_isa_irq_from_domain(struct irq_domain *domain, static int alloc_isa_irq_from_domain(struct irq_domain *domain, int irq, int ioapic, int pin,
int irq, int ioapic, int pin,
struct irq_alloc_info *info) struct irq_alloc_info *info)
{ {
struct mp_chip_data *data;
struct irq_data *irq_data = irq_get_irq_data(irq); struct irq_data *irq_data = irq_get_irq_data(irq);
int node = ioapic_alloc_attr_node(info); int node = ioapic_alloc_attr_node(info);
struct mp_chip_data *data;
/* /*
* Legacy ISA IRQ has already been allocated, just add pin to * 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,8 +937,7 @@ static int alloc_isa_irq_from_domain(struct irq_domain *domain,
return -ENOMEM; return -ENOMEM;
} else { } else {
info->flags |= X86_IRQ_ALLOC_LEGACY; info->flags |= X86_IRQ_ALLOC_LEGACY;
irq = __irq_domain_alloc_irqs(domain, irq, 1, node, info, true, irq = __irq_domain_alloc_irqs(domain, irq, 1, node, info, true, NULL);
NULL);
if (irq >= 0) { if (irq >= 0) {
irq_data = irq_domain_get_irq_data(domain, irq); irq_data = irq_domain_get_irq_data(domain, irq);
data = irq_data->chip_data; data = irq_data->chip_data;
...@@ -1121,8 +1115,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin) ...@@ -1121,8 +1115,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
return -1; return -1;
out: out:
return pin_2_irq(best_idx, best_ioapic, mp_irqs[best_idx].dstirq, return pin_2_irq(best_idx, best_ioapic, mp_irqs[best_idx].dstirq, IOAPIC_MAP_ALLOC);
IOAPIC_MAP_ALLOC);
} }
EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector); EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
...@@ -1293,14 +1286,12 @@ void __init enable_IO_APIC(void) ...@@ -1293,14 +1286,12 @@ void __init enable_IO_APIC(void)
* If the interrupt line is enabled and in ExtInt mode I * If the interrupt line is enabled and in ExtInt mode I
* have found the pin where the i8259 is connected. * have found the pin where the i8259 is connected.
*/ */
if (!entry.masked && if (!entry.masked && entry.delivery_mode == APIC_DELIVERY_MODE_EXTINT) {
entry.delivery_mode == APIC_DELIVERY_MODE_EXTINT) {
ioapic_i8259.apic = apic; ioapic_i8259.apic = apic;
ioapic_i8259.pin = pin; ioapic_i8259.pin = pin;
goto found_i8259; break;
} }
} }
found_i8259:
/* /*
* Look to see what if the MP table has reported the ExtINT * Look to see what if the MP table has reported the ExtINT
...@@ -1496,8 +1487,7 @@ static void __init delay_with_tsc(void) ...@@ -1496,8 +1487,7 @@ static void __init delay_with_tsc(void)
do { do {
rep_nop(); rep_nop();
now = rdtsc(); now = rdtsc();
} while ((now - start) < 40000000000ULL / HZ && } while ((now - start) < 40000000000ULL / HZ && time_before_eq(jiffies, end));
time_before_eq(jiffies, end));
} }
static void __init delay_without_tsc(void) static void __init delay_without_tsc(void)
...@@ -1912,20 +1902,17 @@ static inline void init_IO_APIC_traps(void) ...@@ -1912,20 +1902,17 @@ static inline void init_IO_APIC_traps(void)
/* /*
* The local APIC irq-chip implementation: * The local APIC irq-chip implementation:
*/ */
static void mask_lapic_irq(struct irq_data *data) static void mask_lapic_irq(struct irq_data *data)
{ {
unsigned long v; unsigned long v = apic_read(APIC_LVT0);
v = apic_read(APIC_LVT0);
apic_write(APIC_LVT0, v | APIC_LVT_MASKED); apic_write(APIC_LVT0, v | APIC_LVT_MASKED);
} }
static void unmask_lapic_irq(struct irq_data *data) static void unmask_lapic_irq(struct irq_data *data)
{ {
unsigned long v; unsigned long v = apic_read(APIC_LVT0);
v = apic_read(APIC_LVT0);
apic_write(APIC_LVT0, v & ~APIC_LVT_MASKED); apic_write(APIC_LVT0, v & ~APIC_LVT_MASKED);
} }
...@@ -1944,8 +1931,7 @@ static struct irq_chip lapic_chip __read_mostly = { ...@@ -1944,8 +1931,7 @@ static struct irq_chip lapic_chip __read_mostly = {
static void lapic_register_intr(int irq) static void lapic_register_intr(int irq)
{ {
irq_clear_status_flags(irq, IRQ_LEVEL); irq_clear_status_flags(irq, IRQ_LEVEL);
irq_set_chip_and_handler_name(irq, &lapic_chip, handle_edge_irq, irq_set_chip_and_handler_name(irq, &lapic_chip, handle_edge_irq, "edge");
"edge");
} }
/* /*
...@@ -2265,10 +2251,8 @@ static int mp_irqdomain_create(int ioapic) ...@@ -2265,10 +2251,8 @@ static int mp_irqdomain_create(int ioapic)
return -ENOMEM; return -ENOMEM;
} }
if (cfg->type == IOAPIC_DOMAIN_LEGACY || if (cfg->type == IOAPIC_DOMAIN_LEGACY || cfg->type == IOAPIC_DOMAIN_STRICT)
cfg->type == IOAPIC_DOMAIN_STRICT) ioapic_dynirq_base = max(ioapic_dynirq_base, gsi_cfg->gsi_end + 1);
ioapic_dynirq_base = max(ioapic_dynirq_base,
gsi_cfg->gsi_end + 1);
return 0; return 0;
} }
...@@ -2682,8 +2666,7 @@ static int find_free_ioapic_entry(void) ...@@ -2682,8 +2666,7 @@ static int find_free_ioapic_entry(void)
* @gsi_base: base of GSI associated with the IOAPIC * @gsi_base: base of GSI associated with the IOAPIC
* @cfg: configuration information for the IOAPIC * @cfg: configuration information for the IOAPIC
*/ */
int mp_register_ioapic(int id, u32 address, u32 gsi_base, int mp_register_ioapic(int id, u32 address, u32 gsi_base, struct ioapic_domain_cfg *cfg)
struct ioapic_domain_cfg *cfg)
{ {
bool hotplug = !!ioapic_initialized; bool hotplug = !!ioapic_initialized;
struct mp_ioapic_gsi *gsi_cfg; struct mp_ioapic_gsi *gsi_cfg;
...@@ -2835,8 +2818,7 @@ static void mp_irqdomain_get_attr(u32 gsi, struct mp_chip_data *data, ...@@ -2835,8 +2818,7 @@ static void mp_irqdomain_get_attr(u32 gsi, struct mp_chip_data *data,
if (info && info->ioapic.valid) { if (info && info->ioapic.valid) {
data->is_level = info->ioapic.is_level; data->is_level = info->ioapic.is_level;
data->active_low = info->ioapic.active_low; data->active_low = info->ioapic.active_low;
} else if (__acpi_get_override_irq(gsi, &data->is_level, } else if (__acpi_get_override_irq(gsi, &data->is_level, &data->active_low) < 0) {
&data->active_low) < 0) {
/* PCI interrupts are always active low level triggered. */ /* PCI interrupts are always active low level triggered. */
data->is_level = true; data->is_level = true;
data->active_low = true; data->active_low = true;
...@@ -2956,8 +2938,7 @@ void mp_irqdomain_deactivate(struct irq_domain *domain, ...@@ -2956,8 +2938,7 @@ void mp_irqdomain_deactivate(struct irq_domain *domain,
struct irq_data *irq_data) struct irq_data *irq_data)
{ {
/* It won't be called for IRQ with multiple IOAPIC pins associated */ /* It won't be called for IRQ with multiple IOAPIC pins associated */
ioapic_mask_entry(mp_irqdomain_ioapic_idx(domain), ioapic_mask_entry(mp_irqdomain_ioapic_idx(domain), (int)irq_data->hwirq);
(int)irq_data->hwirq);
} }
int mp_irqdomain_ioapic_idx(struct irq_domain *domain) int mp_irqdomain_ioapic_idx(struct irq_domain *domain)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment