On Mon, Mar 25, 2013 at 12:17:39PM +, Peter Maydell wrote:
> On 25 March 2013 12:12, Michael S. Tsirkin wrote:
> > On Sun, Mar 24, 2013 at 11:32:37AM +, Peter Maydell wrote:
> >> +return (PCI_SLOT(d->devfn) + irq_num - 2) % PCI_NUM_PINS;
> >
> > It seems this can be a bit shorter:
> >
On Sun, Mar 24, 2013 at 11:32:37AM +, Peter Maydell wrote:
> Implement the correct IRQ mapping for the Versatile PCI controller; it
> differs between realview and versatile boards, but the previous QEMU
> implementation was correct only for the first PCI card on a versatile
> board, since we we
On 25 March 2013 12:12, Michael S. Tsirkin wrote:
> On Sun, Mar 24, 2013 at 11:32:37AM +, Peter Maydell wrote:
>> +return (PCI_SLOT(d->devfn) + irq_num - 2) % PCI_NUM_PINS;
>
> It seems this can be a bit shorter:
> pci_swizzle_map_irq_fn(d, irq_num - 2)
> and below irq_num - 1 ?
Y
Implement the correct IRQ mapping for the Versatile PCI controller; it
differs between realview and versatile boards, but the previous QEMU
implementation was correct only for the first PCI card on a versatile
board, since we weren't swizzling IRQs based on the slot number.
Note that this change w