Lines Matching refs:vi
540 static void iosapic_rd_irt_entry(struct vector_info *vi , u32 *dp0, u32 *dp1) in iosapic_rd_irt_entry() argument
542 struct iosapic_info *isp = vi->iosapic; in iosapic_rd_irt_entry()
543 u8 idx = vi->irqline; in iosapic_rd_irt_entry()
550 static void iosapic_wr_irt_entry(struct vector_info *vi, u32 dp0, u32 dp1) in iosapic_wr_irt_entry() argument
552 struct iosapic_info *isp = vi->iosapic; in iosapic_wr_irt_entry()
555 vi->irqline, isp->isi_hpa, dp0, dp1); in iosapic_wr_irt_entry()
557 iosapic_write(isp->addr, IOSAPIC_IRDT_ENTRY(vi->irqline), dp0); in iosapic_wr_irt_entry()
562 iosapic_write(isp->addr, IOSAPIC_IRDT_ENTRY_HI(vi->irqline), dp1); in iosapic_wr_irt_entry()
574 iosapic_set_irt_data( struct vector_info *vi, u32 *dp0, u32 *dp1) in iosapic_set_irt_data() argument
577 struct irt_entry *p = vi->irte; in iosapic_set_irt_data()
590 *dp0 = mode | (u32) vi->txn_data; in iosapic_set_irt_data()
601 *dp1 = (u32) (vi->txn_addr); in iosapic_set_irt_data()
610 *dp1 = (((u32)vi->txn_addr & 0x0ff00000) >> 4) | in iosapic_set_irt_data()
611 (((u32)vi->txn_addr & 0x000ff000) << 12); in iosapic_set_irt_data()
620 struct vector_info *vi = irq_data_get_irq_chip_data(d); in iosapic_mask_irq() local
624 iosapic_rd_irt_entry(vi, &d0, &d1); in iosapic_mask_irq()
626 iosapic_wr_irt_entry(vi, d0, d1); in iosapic_mask_irq()
632 struct vector_info *vi = irq_data_get_irq_chip_data(d); in iosapic_unmask_irq() local
636 WARN_ON(vi->txn_irq == 0); in iosapic_unmask_irq()
638 iosapic_set_irt_data(vi, &d0, &d1); in iosapic_unmask_irq()
639 iosapic_wr_irt_entry(vi, d0, d1); in iosapic_unmask_irq()
643 u32 *t = (u32 *) ((ulong) vi->eoi_addr & ~0xffUL); in iosapic_unmask_irq()
644 printk("iosapic_enable_irq(): regs %p", vi->eoi_addr); in iosapic_unmask_irq()
645 for ( ; t < vi->eoi_addr; t++) in iosapic_unmask_irq()
652 struct iosapic_info *isp = vi->iosapic; in iosapic_unmask_irq()
669 vi->eoi_addr, vi->eoi_data); in iosapic_unmask_irq()
670 iosapic_eoi(vi->eoi_addr, vi->eoi_data); in iosapic_unmask_irq()
675 struct vector_info *vi = irq_data_get_irq_chip_data(d); in iosapic_eoi_irq() local
677 iosapic_eoi(vi->eoi_addr, vi->eoi_data); in iosapic_eoi_irq()
685 struct vector_info *vi = irq_data_get_irq_chip_data(d); in iosapic_set_affinity_irq() local
695 vi->txn_addr = txn_affinity_addr(d->irq, dest_cpu); in iosapic_set_affinity_irq()
700 iosapic_rd_irt_entry(vi, &d0, &d1); in iosapic_set_affinity_irq()
701 iosapic_set_irt_data(vi, &dummy_d0, &d1); in iosapic_set_affinity_irq()
702 iosapic_wr_irt_entry(vi, d0, d1); in iosapic_set_affinity_irq()
724 struct vector_info *vi; in iosapic_fixup_irq() local
772 vi = isi->isi_vector + isi_line; in iosapic_fixup_irq()
773 DBG_IRT("iosapic_fixup_irq: line %d vi 0x%p\n", isi_line, vi); in iosapic_fixup_irq()
776 if (vi->irte) in iosapic_fixup_irq()
779 vi->irte = irte; in iosapic_fixup_irq()
790 vi->txn_irq = txn_alloc_irq(8); in iosapic_fixup_irq()
792 if (vi->txn_irq < 0) in iosapic_fixup_irq()
796 vi->txn_addr = txn_alloc_addr(vi->txn_irq); in iosapic_fixup_irq()
797 vi->txn_data = txn_alloc_data(vi->txn_irq); in iosapic_fixup_irq()
799 vi->eoi_addr = isi->addr + IOSAPIC_REG_EOI; in iosapic_fixup_irq()
800 vi->eoi_data = cpu_to_le32(vi->txn_data); in iosapic_fixup_irq()
802 cpu_claim_irq(vi->txn_irq, &iosapic_interrupt_type, vi); in iosapic_fixup_irq()
805 pcidev->irq = vi->txn_irq; in iosapic_fixup_irq()
821 struct vector_info *vi; in iosapic_serial_irq() local
840 vi = isi->isi_vector + isi_line; in iosapic_serial_irq()
841 DBG_IRT("iosapic_serial_irq: line %d vi 0x%p\n", isi_line, vi); in iosapic_serial_irq()
844 if (vi->irte) in iosapic_serial_irq()
847 vi->irte = irte; in iosapic_serial_irq()
858 vi->txn_irq = txn_alloc_irq(8); in iosapic_serial_irq()
860 if (vi->txn_irq < 0) in iosapic_serial_irq()
864 vi->txn_addr = txn_alloc_addr(vi->txn_irq); in iosapic_serial_irq()
865 vi->txn_data = txn_alloc_data(vi->txn_irq); in iosapic_serial_irq()
867 vi->eoi_addr = isi->addr + IOSAPIC_REG_EOI; in iosapic_serial_irq()
868 vi->eoi_data = cpu_to_le32(vi->txn_data); in iosapic_serial_irq()
870 cpu_claim_irq(vi->txn_irq, &iosapic_interrupt_type, vi); in iosapic_serial_irq()
874 return vi->txn_irq; in iosapic_serial_irq()
968 iosapic_prt_vi(struct vector_info *vi) in iosapic_prt_vi() argument
970 printk(KERN_DEBUG MODULE_NAME ": vector_info[%d] is at %p\n", vi->irqline, vi); in iosapic_prt_vi()
971 printk(KERN_DEBUG "\t\tstatus: %.4x\n", vi->status); in iosapic_prt_vi()
972 printk(KERN_DEBUG "\t\ttxn_irq: %d\n", vi->txn_irq); in iosapic_prt_vi()
973 printk(KERN_DEBUG "\t\ttxn_addr: %lx\n", vi->txn_addr); in iosapic_prt_vi()
974 printk(KERN_DEBUG "\t\ttxn_data: %lx\n", vi->txn_data); in iosapic_prt_vi()
975 printk(KERN_DEBUG "\t\teoi_addr: %p\n", vi->eoi_addr); in iosapic_prt_vi()
976 printk(KERN_DEBUG "\t\teoi_data: %x\n", vi->eoi_data); in iosapic_prt_vi()