Zhang Fuxin wrote: > > My irq dispatching code is very simple,it just read the IRR,count the first > irq number and call do_IRQ. > /* > * the first level int-handler will jump here if it is a 8259A irq > */ > asmlinkage void i8259A_irqdispatch(struct pt_regs *regs) > { > int isr, irq; > > isr = inb(0x20); > > irq = ffz (~isr); > > if (irq == 2) { > isr = inb(0xa0); > irq = 8 + ffz(~isr); > } > > do_IRQ(irq,regs); > } > OK, so the problem is not what I was thinking. I don't have much clue here. I remember old i8259As have some timing issues on fast cpus. Hopefully all the bridge chips are set up correctly ... > >It is typically much easier to modify PCI device BARS so that they do coincide > >with the same physical address. You can control that by using the correct > >starting address for PCI MEM space in pci_auto.c resource assignment. > It seems a good way to solve the ioremap problem and X problem.But virt_to_bus > & bus_to_virt problem remains? > What is the virt_to_bus() problem? Is the address beyond 512MB (phy addr)? If PCI mem (BUS) address is identical to phy addr, you should not have problem unless the address is beyond 512MB. BTW, virt_to_bus()/bus_to_virt() are deprecicated. See Documentation/DMA-mapping.txt. Jun