@@ -384,12 +384,12 @@ static void io_apic_modify_irq(struct mp_chip_data *data, bool masked,
384384 }
385385}
386386
387+ /*
388+ * Synchronize the IO-APIC and the CPU by doing a dummy read from the
389+ * IO-APIC
390+ */
387391static void io_apic_sync (struct irq_pin_list * entry )
388392{
389- /*
390- * Synchronize the IO-APIC and the CPU by doing
391- * a dummy read from the IO-APIC
392- */
393393 struct io_apic __iomem * io_apic ;
394394
395395 io_apic = io_apic_base (entry -> apic );
@@ -442,17 +442,13 @@ static void __eoi_ioapic_pin(int apic, int pin, int vector)
442442
443443 entry = entry1 = __ioapic_read_entry (apic , pin );
444444
445- /*
446- * Mask the entry and change the trigger mode to edge.
447- */
445+ /* Mask the entry and change the trigger mode to edge. */
448446 entry1 .masked = true;
449447 entry1 .is_level = false;
450448
451449 __ioapic_write_entry (apic , pin , entry1 );
452450
453- /*
454- * Restore the previous level triggered entry.
455- */
451+ /* Restore the previous level triggered entry. */
456452 __ioapic_write_entry (apic , pin , entry );
457453 }
458454}
@@ -1012,16 +1008,12 @@ static int pin_2_irq(int idx, int ioapic, int pin, unsigned int flags)
10121008{
10131009 u32 gsi = mp_pin_to_gsi (ioapic , pin );
10141010
1015- /*
1016- * Debugging check, we are in big trouble if this message pops up!
1017- */
1011+ /* Debugging check, we are in big trouble if this message pops up! */
10181012 if (mp_irqs [idx ].dstirq != pin )
10191013 pr_err ("broken BIOS or MPTABLE parser, ayiee!!\n" );
10201014
10211015#ifdef CONFIG_X86_32
1022- /*
1023- * PCI IRQ command line redirection. Yes, limits are hardcoded.
1024- */
1016+ /* PCI IRQ command line redirection. Yes, limits are hardcoded. */
10251017 if ((pin >= 16 ) && (pin <= 23 )) {
10261018 if (pirq_entries [pin - 16 ] != -1 ) {
10271019 if (!pirq_entries [pin - 16 ]) {
@@ -1296,8 +1288,9 @@ void __init enable_IO_APIC(void)
12961288 /* See if any of the pins is in ExtINT mode */
12971289 struct IO_APIC_route_entry entry = ioapic_read_entry (apic , pin );
12981290
1299- /* If the interrupt line is enabled and in ExtInt mode
1300- * I have found the pin where the i8259 is connected.
1291+ /*
1292+ * If the interrupt line is enabled and in ExtInt mode I
1293+ * have found the pin where the i8259 is connected.
13011294 */
13021295 if (!entry .masked &&
13031296 entry .delivery_mode == APIC_DELIVERY_MODE_EXTINT ) {
@@ -1307,8 +1300,11 @@ void __init enable_IO_APIC(void)
13071300 }
13081301 }
13091302 found_i8259 :
1310- /* Look to see what if the MP table has reported the ExtINT */
1311- /* If we could not find the appropriate pin by looking at the ioapic
1303+
1304+ /*
1305+ * Look to see what if the MP table has reported the ExtINT
1306+ *
1307+ * If we could not find the appropriate pin by looking at the ioapic
13121308 * the i8259 probably is not connected the ioapic but give the
13131309 * mptable a chance anyway.
13141310 */
@@ -1348,9 +1344,7 @@ void native_restore_boot_irq_mode(void)
13481344 entry .destid_0_7 = apic_id & 0xFF ;
13491345 entry .virt_destid_8_14 = apic_id >> 8 ;
13501346
1351- /*
1352- * Add it to the IO-APIC irq-routing table:
1353- */
1347+ /* Add it to the IO-APIC irq-routing table */
13541348 ioapic_write_entry (ioapic_i8259 .apic , ioapic_i8259 .pin , entry );
13551349 }
13561350
@@ -1427,8 +1421,8 @@ static void __init setup_ioapic_ids_from_mpc_nocheck(void)
14271421 }
14281422
14291423 /*
1430- * We need to adjust the IRQ routing table
1431- * if the ID changed.
1424+ * We need to adjust the IRQ routing table if the ID
1425+ * changed.
14321426 */
14331427 if (old_id != mpc_ioapic_id (ioapic_idx ))
14341428 for (i = 0 ; i < mp_irq_entries ; i ++ )
@@ -1437,8 +1431,8 @@ static void __init setup_ioapic_ids_from_mpc_nocheck(void)
14371431 = mpc_ioapic_id (ioapic_idx );
14381432
14391433 /*
1440- * Update the ID register according to the right value
1441- * from the MPC table if they are different.
1434+ * Update the ID register according to the right value from
1435+ * the MPC table if they are different.
14421436 */
14431437 if (mpc_ioapic_id (ioapic_idx ) == reg_00 .bits .ID )
14441438 continue ;
@@ -1562,21 +1556,17 @@ static int __init timer_irq_works(void)
15621556 * so we 'resend' these IRQs via IPIs, to the same CPU. It's much
15631557 * better to do it this way as thus we do not have to be aware of
15641558 * 'pending' interrupts in the IRQ path, except at this point.
1565- */
1566- /*
1567- * Edge triggered needs to resend any interrupt
1568- * that was delayed but this is now handled in the device
1569- * independent code.
1570- */
1571-
1572- /*
1573- * Starting up a edge-triggered IO-APIC interrupt is
1574- * nasty - we need to make sure that we get the edge.
1575- * If it is already asserted for some reason, we need
1576- * return 1 to indicate that is was pending.
15771559 *
1578- * This is not complete - we should be able to fake
1579- * an edge even if it isn't on the 8259A...
1560+ *
1561+ * Edge triggered needs to resend any interrupt that was delayed but this
1562+ * is now handled in the device independent code.
1563+ *
1564+ * Starting up a edge-triggered IO-APIC interrupt is nasty - we need to
1565+ * make sure that we get the edge. If it is already asserted for some
1566+ * reason, we need return 1 to indicate that is was pending.
1567+ *
1568+ * This is not complete - we should be able to fake an edge even if it
1569+ * isn't on the 8259A...
15801570 */
15811571static unsigned int startup_ioapic_irq (struct irq_data * data )
15821572{
@@ -1627,7 +1617,8 @@ static inline bool ioapic_prepare_move(struct irq_data *data)
16271617static inline void ioapic_finish_move (struct irq_data * data , bool moveit )
16281618{
16291619 if (unlikely (moveit )) {
1630- /* Only migrate the irq if the ack has been received.
1620+ /*
1621+ * Only migrate the irq if the ack has been received.
16311622 *
16321623 * On rare occasions the broadcast level triggered ack gets
16331624 * delayed going to ioapics, and if we reprogram the
@@ -1904,14 +1895,13 @@ static inline void init_IO_APIC_traps(void)
19041895 cfg = irq_cfg (irq );
19051896 if (IO_APIC_IRQ (irq ) && cfg && !cfg -> vector ) {
19061897 /*
1907- * Hmm.. We don't have an entry for this,
1908- * so default to an old-fashioned 8259
1909- * interrupt if we can. .
1898+ * Hmm.. We don't have an entry for this, so
1899+ * default to an old-fashioned 8259 interrupt if we
1900+ * can. Otherwise set the dummy interrupt chip .
19101901 */
19111902 if (irq < nr_legacy_irqs ())
19121903 legacy_pic -> make_irq (irq );
19131904 else
1914- /* Strange. Oh, well.. */
19151905 irq_set_chip (irq , & no_irq_chip );
19161906 }
19171907 }
@@ -2307,9 +2297,7 @@ void __init setup_IO_APIC(void)
23072297 for_each_ioapic (ioapic )
23082298 BUG_ON (mp_irqdomain_create (ioapic ));
23092299
2310- /*
2311- * Set up IO-APIC IRQ routing.
2312- */
2300+ /* Set up IO-APIC IRQ routing. */
23132301 x86_init .mpparse .setup_ioapic_ids ();
23142302
23152303 sync_Arb_IDs ();
0 commit comments