mirror of https://gitee.com/openkylin/linux.git
x86: io-apic - code style cleaning for setup_IO_APIC_irqs
By changing printout form we are able to shrink (and clean up) code a bit. Former printout example: init IO_APIC IRQs IO-APIC (apicid-pin) 1-1, 1-2, 1-3 not connected. IO-APIC (apicid-pin) 2-1, 2-2, 2-3 not connected. New printout example: init IO_APIC IRQs 1-1 1-2 1-3 (apicid-pin) not connected 2-1 2-2 2-3 (apicid-pin) not connected Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
26afe5f2fb
commit
3c2cbd2490
|
@ -1518,41 +1518,44 @@ static void setup_IO_APIC_irq(int apic, int pin, unsigned int irq,
|
||||||
|
|
||||||
static void __init setup_IO_APIC_irqs(void)
|
static void __init setup_IO_APIC_irqs(void)
|
||||||
{
|
{
|
||||||
int apic, pin, idx, irq, first_notcon = 1;
|
int apic, pin, idx, irq;
|
||||||
|
int notcon = 0;
|
||||||
|
|
||||||
apic_printk(APIC_VERBOSE, KERN_DEBUG "init IO_APIC IRQs\n");
|
apic_printk(APIC_VERBOSE, KERN_DEBUG "init IO_APIC IRQs\n");
|
||||||
|
|
||||||
for (apic = 0; apic < nr_ioapics; apic++) {
|
for (apic = 0; apic < nr_ioapics; apic++) {
|
||||||
for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {
|
for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {
|
||||||
|
|
||||||
idx = find_irq_entry(apic,pin,mp_INT);
|
idx = find_irq_entry(apic, pin, mp_INT);
|
||||||
if (idx == -1) {
|
if (idx == -1) {
|
||||||
if (first_notcon) {
|
apic_printk(APIC_VERBOSE,
|
||||||
apic_printk(APIC_VERBOSE, KERN_DEBUG " IO-APIC (apicid-pin) %d-%d", mp_ioapics[apic].mp_apicid, pin);
|
KERN_DEBUG " %d-%d",
|
||||||
first_notcon = 0;
|
mp_ioapics[apic].mp_apicid, pin);
|
||||||
} else
|
if (!notcon)
|
||||||
apic_printk(APIC_VERBOSE, ", %d-%d", mp_ioapics[apic].mp_apicid, pin);
|
notcon = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!first_notcon) {
|
|
||||||
apic_printk(APIC_VERBOSE, " not connected.\n");
|
|
||||||
first_notcon = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
irq = pin_2_irq(idx, apic, pin);
|
irq = pin_2_irq(idx, apic, pin);
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
if (multi_timer_check(apic, irq))
|
if (multi_timer_check(apic, irq))
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
add_pin_to_irq(irq, apic, pin);
|
add_pin_to_irq(irq, apic, pin);
|
||||||
|
|
||||||
setup_IO_APIC_irq(apic, pin, irq,
|
setup_IO_APIC_irq(apic, pin, irq,
|
||||||
irq_trigger(idx), irq_polarity(idx));
|
irq_trigger(idx), irq_polarity(idx));
|
||||||
}
|
}
|
||||||
|
if (notcon) {
|
||||||
|
apic_printk(APIC_VERBOSE,
|
||||||
|
KERN_DEBUG " (apicid-pin) not connected\n");
|
||||||
|
notcon = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!first_notcon)
|
if (notcon)
|
||||||
apic_printk(APIC_VERBOSE, " not connected.\n");
|
apic_printk(APIC_VERBOSE,
|
||||||
|
KERN_DEBUG " (apicid-pin) not connected\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue