WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-ia64-devel] [Patch] Issue about interrupt for PV-on-HVM on IPF

To: Alex Williamson <alex.williamson@xxxxxx>
Subject: Re: [Xen-ia64-devel] [Patch] Issue about interrupt for PV-on-HVM on IPF
From: DOI Tsunehisa <Doi.Tsunehisa@xxxxxxxxxxxxxx>
Date: Tue, 21 Nov 2006 09:21:55 +0900
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 20 Nov 2006 16:22:54 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1164041707.5536.29.camel@lappy>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <455C2DEB.9010504@xxxxxxxxxxxxxx> <1163985915.9305.10.camel@lappy> <200611200137.kAK1bSF02521@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <200611200217.kAK2HBF03282@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <1164041707.5536.29.camel@lappy>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.8 (Windows/20061025)
Hi Alex,

Alex Williamson wrote:
>    Ok, if you change "isa_irq_to_vector_map[irq] == pdev->irq" to
> "isa_irq_to_vector(irq) == pdev->irq" then I'll sign-off on it.  All
> other accesses in the kernel are via the isa_irq_to_vector() macro, so
> we should be consistent.  Lets submit this first patch to xen-devel it
> modifies common code, and I can add the follow-ic.patch to the xen-ia64
> tree.  Thanks,

  Thank you. I've modified pvdrv.patch with your suggestion.
Is it OK ?  If you agree it, I'll submit to xen-devel.

Thanks,
- Tsunehisa Doi
# HG changeset patch
# User Doi.Tsunehisa@xxxxxxxxxxxxxx
# Node ID 1fa4ce7c60125319243add108604a066e4fe6b0c
# Parent  ac5330d4945a6eb388424ba8cf76f494ad9df47a
Change callback_irq spec of PV-on-HVM for IPF

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@xxxxxxxxxxxxxx>
Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>

diff -r ac5330d4945a -r 1fa4ce7c6012 
unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c  Wed Nov 15 
12:15:34 2006 -0700
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c  Thu Nov 16 
15:29:28 2006 +0900
@@ -179,10 +179,24 @@ static int get_hypercall_stubs(void)
 #define get_hypercall_stubs()  (0)
 #endif
 
+static int get_callback_irq(struct pci_dev *pdev)
+{
+#ifdef __ia64__
+       int irq;
+       for (irq = 0; irq < 16; irq++) {
+               if (isa_irq_to_vector(irq) == pdev->irq)
+                       return irq;
+       }
+       return 0;
+#else /* !__ia64__ */
+       return pdev->irq;
+#endif
+}
+
 static int __devinit platform_pci_init(struct pci_dev *pdev,
                                       const struct pci_device_id *ent)
 {
-       int i, ret;
+       int i, ret, callback_irq;
        long ioaddr, iolen;
        long mmio_addr, mmio_len;
 
@@ -196,7 +210,9 @@ static int __devinit platform_pci_init(s
        mmio_addr = pci_resource_start(pdev, 1);
        mmio_len = pci_resource_len(pdev, 1);
 
-       if (mmio_addr == 0 || ioaddr == 0) {
+       callback_irq = get_callback_irq(pdev);
+
+       if (mmio_addr == 0 || ioaddr == 0 || callback_irq == 0) {
                printk(KERN_WARNING DRV_NAME ":no resources found\n");
                return -ENOENT;
        }
@@ -231,7 +247,7 @@ static int __devinit platform_pci_init(s
                goto out;
        }
 
-       if ((ret = set_callback_irq(pdev->irq)))
+       if ((ret = set_callback_irq(callback_irq)))
                goto out;
 
  out:
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel