From: awilliam@xenbuild2.aw Date: Mon, 15 Jan 2007 22:15:26 +0000 (-0700) Subject: merge with xen-unstable.hg X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15405 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b5a65552a9fb05b929d6cfe88a9a549c9361afc0;p=xen.git merge with xen-unstable.hg --- b5a65552a9fb05b929d6cfe88a9a549c9361afc0 diff --cc unmodified_drivers/linux-2.6/platform-pci/platform-pci.c index a1b7eafc4e,409783c0c9..321a166d05 --- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c @@@ -179,22 -179,24 +179,29 @@@ static int get_hypercall_stubs(void #define get_hypercall_stubs() (0) #endif - static int get_callback_irq(struct pci_dev *pdev) + static uint64_t get_callback_via(struct pci_dev *pdev) { #ifdef __ia64__ - int irq; + int irq, rid; for (irq = 0; irq < 16; irq++) { if (isa_irq_to_vector(irq) == pdev->irq) return irq; } - return 0; + /* use Requester-ID as callback_irq */ + /* RID: '<#bus(8)><#dev(5)><#func(3)>' (cf. PCI-Express spec) */ + rid = ((pdev->bus->number & 0xff) << 8) | pdev->devfn; + printk(KERN_INFO DRV_NAME ":use Requester-ID(%04x) as callback irq\n", + rid); + return rid | IA64_CALLBACK_IRQ_RID; #else /* !__ia64__ */ - return pdev->irq; + if (pdev->irq < 16) + return pdev->irq; /* ISA IRQ */ + /* We don't know the GSI. Specify the PCI INTx line instead. */ + return (((uint64_t)0x01 << 56) | /* PCI INTx identifier */ + ((uint64_t)pci_domain_nr(pdev->bus) << 32) | + ((uint64_t)pdev->bus->number << 16) | + ((uint64_t)(pdev->devfn & 0xff) << 8) | + ((uint64_t)(pdev->pin - 1) & 3)); #endif }